Class GrpcClientSpiDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.internal.provider.remote.grpc.GrpcClientSpiDevice
-
- All Implemented Interfaces:
DeviceInterface,SpiDeviceInterface,InternalDeviceInterface,InternalSpiDeviceInterface,AutoCloseable
public class GrpcClientSpiDevice extends AbstractDevice implements InternalSpiDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description GrpcClientSpiDevice(GrpcClientDeviceFactory deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
-
Method Summary
All Methods Instance Methods Concrete Methods 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, isOpen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.diozero.api.DeviceInterface
close
-
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isOpen
-
-
-
-
Constructor Detail
-
GrpcClientSpiDevice
public GrpcClientSpiDevice(GrpcClientDeviceFactory deviceFactory, String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
-
-
Method Detail
-
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
public byte[] writeAndRead(byte... txBuffer) throws RuntimeIOException- Specified by:
writeAndReadin interfaceSpiDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
protected void closeDevice() throws RuntimeIOException- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-
-