Documentation ¶
Index ¶
- type Device
- func (dev *Device) BitsPerWord() (int, error)
- func (dev *Device) Close() error
- func (dev *Device) LSBFirst() (bool, error)
- func (dev *Device) MaxSpeed() (int, error)
- func (dev *Device) Mode() (uint8, error)
- func (dev *Device) SetBitsPerWord(n int) error
- func (dev *Device) SetLSBFirst(lsb bool) error
- func (dev *Device) SetMaxSpeed(n int) error
- func (dev *Device) SetMode(mode uint8) error
- func (dev *Device) Transfer(snd, rcv []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device represents an SPI device.
func Open ¶
Open opens the given SPI device at the specified speed (in Hertz) If customCS in not zero, that pin number is used as a custom chip-select.
func (*Device) BitsPerWord ¶
BitsPerWord returns the word size of the SPI device.
func (*Device) SetBitsPerWord ¶
SetBitsPerWord sets the word size of the SPI device.
func (*Device) SetLSBFirst ¶
SetLSBFirst sets the bit order of the SPI device.
func (*Device) SetMaxSpeed ¶
SetMaxSpeed sets the maximum speed of the SPI device, in Hertz.
Click to show internal directories.
Click to hide internal directories.