![]() |
![]() |
|
MSP430™CapTIvateSoftwareLibraryAPIGuide
1_70_00_03
|
#include <I2CSlave.h>
Data Fields | |
| bool(* | pbReceiveCallback )(uint16_t) |
| void(* | pvErrorCallback )(uint8_t) |
| uint16_t | ui16ReceiveBufferSize |
| uint8_t * | pReceiveBuffer |
| bool | bSendReadLengthFirst |
typedef tI2CSlavePort defines the port definition that the user must provide when instantiating this driver. This structure is read-only from the context of the driver, and may be placed in read-only memory, such as the C CONST section, if desired.
| bool(* tI2CSlavePort::pbReceiveCallback) (uint16_t) |
Receive Callback. This function will be called after each I2C write operation is completed (a write is data sent from the bus master to a slave, such as this port). If the callback returns true, the ISR exits awake.
| void(* tI2CSlavePort::pvErrorCallback) (uint8_t) |
Error Callback. This function will be called after a failed transmission. The passed tI2CSlaveErrors parameter indicates what caused the failure.
| uint16_t tI2CSlavePort::ui16ReceiveBufferSize |
Receive Buffer Size (Bytes). This indicates the amount of buffer space available to the driver during a receive (I2C write) transaction.
| uint8_t* tI2CSlavePort::pReceiveBuffer |
Receive Buffer Head Pointer. This pointer indicates the address of the buffer space available to the I2C driver during an I2C write operation.
| bool tI2CSlavePort::bSendReadLengthFirst |
If bSendReadLengthFirst is true, when the master reads from this device the first byte it reads out will be a length byte, indicating how many additional bytes exist to be read.