public class SysFsSpiDevice extends AbstractDevice implements SpiDeviceInterface
Constructor and Description |
---|
SysFsSpiDevice(DeviceFactoryInterface deviceFactory,
String key,
int controller,
int chipSelect,
int frequency,
SpiClockMode spiClockMode,
boolean lsbFirst) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDevice() |
int |
getChipSelect() |
int |
getController() |
void |
write(byte[] txBuffer) |
void |
write(byte[] txBuffer,
int txOffset,
int length) |
byte[] |
writeAndRead(byte[] txBuffer) |
close, getDeviceFactory, getKey, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getKey, isOpen
public SysFsSpiDevice(DeviceFactoryInterface deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
protected void closeDevice() throws RuntimeIOException
closeDevice
in class AbstractDevice
RuntimeIOException
public int getController()
getController
in interface SpiDeviceInterface
public int getChipSelect()
getChipSelect
in interface SpiDeviceInterface
public void write(byte[] txBuffer)
write
in interface SpiDeviceInterface
public void write(byte[] txBuffer, int txOffset, int length)
write
in interface SpiDeviceInterface
public byte[] writeAndRead(byte[] txBuffer) throws RuntimeIOException
writeAndRead
in interface SpiDeviceInterface
RuntimeIOException
Copyright © 2016–2018 mattjlewis. All rights reserved.