Skip to content

InvisibleWrench/spidev.dart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spidev

A dart package for SPI using the linux spidev interface. Uses FFI internally. Has no dependencies on flutter whatsoever.

Example

/// Create a [Spidev] instance from the spidev's bus and device number.
/// That spidev may not exist. ([Spidev] is actually just a data class)
final spidev = Spidev.fromBusDevNrs(0, 0);

/// Open the spidev, so you can use it.
final handle = spidev.open();

print("mode: ${handle.mode}");
print("bitsPerWord: ${handle.bitsPerWord}");
print("maxSpeed: ${handle.maxSpeed}");

final typedData = Uint8List(4)

spidev.transferSingleTypedData()

handle.close();

About

Dart package for accessing SPI on Linux using the spidev interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dart 89.4%
  • C 9.3%
  • Shell 1.3%