namespace Unosquare.RaspberryIO.Abstractions
{
///
/// Interfaces a SPI buses on the GPIO.
///
public interface ISpiChannel
{
///
/// Gets the standard initialization file descriptor.
/// anything negative means error.
///
///
/// The file descriptor.
///
int FileDescriptor { get; }
///
/// Gets the channel.
///
int Channel { get; }
///
/// Gets the frequency.
///
int Frequency { get; }
///
/// Sends data and simultaneously receives the data in the return buffer.
///
/// The buffer.
/// The read bytes from the ring-style bus.
byte[] SendReceive(byte[] buffer);
///
/// Writes the specified buffer the the underlying FileDescriptor.
/// Do not use this method if you expect data back.
/// This method is efficient if used in a fire-and-forget scenario
/// like sending data over to those long RGB LED strips.
///
/// The buffer.
void Write(byte[] buffer);
}
}