Class RemoteSpiDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.provider.remote.devicefactory.RemoteSpiDevice
- All Implemented Interfaces:
DeviceInterface,SpiDeviceInterface,Closeable,AutoCloseable
public class RemoteSpiDevice extends AbstractDevice implements SpiDeviceInterface
-
Constructor Summary
Constructors Constructor Description RemoteSpiDevice(RemoteDeviceFactory deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst) -
Method Summary
Modifier and Type Method Description protected voidcloseDevice()intgetChipSelect()intgetController()voidwrite(byte... txBuffer)voidwrite(byte[] txBuffer, int txOffset, int length)byte[]writeAndRead(byte... txBuffer)Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isOpenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.api.DeviceInterface
close, getKey, isOpen
-
Constructor Details
-
RemoteSpiDevice
public RemoteSpiDevice(RemoteDeviceFactory deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
-
-
Method Details
-
getController
public int getController()- Specified by:
getControllerin interfaceSpiDeviceInterface
-
getChipSelect
public int getChipSelect()- Specified by:
getChipSelectin interfaceSpiDeviceInterface
-
write
public void write(byte... txBuffer)- Specified by:
writein interfaceSpiDeviceInterface
-
write
public void write(byte[] txBuffer, int txOffset, int length)- Specified by:
writein interfaceSpiDeviceInterface
-
writeAndRead
- Specified by:
writeAndReadin interfaceSpiDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-