MSP430™CapTIvateSoftwareLibraryAPIGuide 1_70_00_03

Data Fields
tI2CSlavePort Struct Reference
I2CSlave

`#include <I2CSlave.h>`

## Data Fields
bool(* | pbReceiveCallback )(uint16_t)
void(* | pvErrorCallback )(uint8_t)
uint16_t | ui16ReceiveBufferSize
uint8_t * | pReceiveBuffer
bool | bSendReadLengthFirst

## Detailed Description

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.

## Field Documentation

## § pbReceiveCallback

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.

## § pvErrorCallback

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.

## § ui16ReceiveBufferSize

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.

## § pReceiveBuffer

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.

## § bSendReadLengthFirst

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.

The documentation for this struct was generated from the following file:

- I2CSlave.h

© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale