|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.wagner_ibw.iow.spi.SPI
Implementation of the SPI special mode function.
Field Summary |
Fields inherited from interface de.wagner_ibw.iow.SpecialModeFunction |
SMF_CPS_ID, SMF_I2C_ID, SMF_LCD_ID, SMF_LED_ID, SMF_RC5_ID, SMF_SMX_ID, SMF_SPI_ID |
Constructor Summary | |
SPI(int mode)
Constructor for IO-Warrior 24. |
|
SPI(int mode,
int clock)
Constructor for IO-Warrior 56. |
Method Summary | |
java.lang.String |
checkCompatibility(int id,
int Revision,
int specialModes)
Checks if it is possible to activate this special mode function. |
int[] |
getDisableReport()
Returns the report that disables the special mode function. |
int[] |
getEnableReport()
Returns the report that enables the special mode function. |
int[] |
getIowSpecialBits(int deviceIdentifier)
Returns an array of bitmask(s) for port 0...1, 0...3 or 0...6 if this special mode function runs on this iow device. |
java.lang.String |
getName()
Returns the name of the special mode function. |
int[] |
getReportIds()
Returns the report id(s) which the implementation is interested in. |
int |
getSpecialModeFuncionId()
Returns the special mode function id for this implementation. |
boolean |
matchReportId(int reportId)
Checks if this implementation is interested in this report. |
void |
removeSPIDevice()
Removes the spi device implementation. |
void |
reportReceived(int[] readBuffer)
Callback method is called when a matching report was received. |
void |
setIowDevice(AbstractIowDevice iow)
Sets the reference to the underlying iow device for write report operations. |
void |
setSPIDevice(AbstractSPIDevice dev)
Adds the spi device implementation (e.g. an instance of M95020.java). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SPI(int mode)
mode
- SPI special mode function mode byte.public SPI(int mode, int clock)
mode
- SPI special mode function mode byte.clock
- SPI sepcial mode function clock byte.Method Detail |
public void setSPIDevice(AbstractSPIDevice dev)
dev
- Instance of an spi device implemenation.public void removeSPIDevice()
public java.lang.String toString()
toString
in class java.lang.Object
public int[] getDisableReport()
SpecialModeFunction
getDisableReport
in interface SpecialModeFunction
public int[] getEnableReport()
SpecialModeFunction
getEnableReport
in interface SpecialModeFunction
public int[] getIowSpecialBits(int deviceIdentifier)
SpecialModeFunction
getIowSpecialBits
in interface SpecialModeFunction
deviceIdentifier
- Iow device identifier (AbstractIowDevice.IOW24ID<(code>,
AbstractIowDevice.IOW24ID
or AbstractIowDevice.IOW56ID
).
- Returns:
- Array of int that contains bitmask(s) for special mode function bits.
public int[] getReportIds()
SpecialModeFunction
getReportIds
in interface SpecialModeFunction
public int getSpecialModeFuncionId()
SpecialModeFunction
getSpecialModeFuncionId
in interface SpecialModeFunction
public boolean matchReportId(int reportId)
SpecialModeFunction
matchReportId
in interface SpecialModeFunction
reportId
- Report id of the received report.
public void reportReceived(int[] readBuffer)
SpecialModeFunction
reportReceived
in interface SpecialModeFunction
readBuffer
- Read buffer from a received report.public void setIowDevice(AbstractIowDevice iow)
SpecialModeFunction
setIowDevice
in interface SpecialModeFunction
iow
- Instance of an iow device.public java.lang.String checkCompatibility(int id, int Revision, int specialModes)
SpecialModeFunction
checkCompatibility
in interface SpecialModeFunction
id
- Id of the current IO-Warrior device.Revision
- Rev of the current IO-Warrior device.specialModes
- Special modes from the current IO-Warrior device.
public java.lang.String getName()
SpecialModeFunction
getName
in interface SpecialModeFunction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |