This is the high-level communications interface module.
More...
This is the high-level communications interface module.
CAPT_CommConfig.h This file configures the Captivate COMM stack.
- Version
- VERSION Released on RELEASE_DATE
These functions provide the interfaces between the application level, protocol layer, and the low-level serial interface.
- Version
- VERSION Released on RELEASE_DATE
§ __CAPT_NO_INTERFACE__
#define __CAPT_NO_INTERFACE__ (0) |
def CAPT_NO_INTERFACE disables the communications module.
def CAPT_UART_INTERFACE sets the interface to UART. def CAPT_BULKI2C_INTERFACE sets the interface to I2C Bulk. def CAPT_REGISTERI2C_INTERFACE sets the interface to I2C Register.
§ __CAPT_UART_INTERFACE__
#define __CAPT_UART_INTERFACE__ (1) |
§ __CAPT_BULKI2C_INTERFACE__
#define __CAPT_BULKI2C_INTERFACE__ (2) |
§ __CAPT_REGISTERI2C_INTERFACE__
#define __CAPT_REGISTERI2C_INTERFACE__ (3) |
§ CAPT_TRANSMIT_BUFFER_SIZE
#define CAPT_TRANSMIT_BUFFER_SIZE (48) |
def CAPT_TRANSMIT_BUFFER_SIZE defines the size of the transmit buffer. Note that 2x this size will be allocated, since ping-pong buffering is used. This should be at least 2x the size of the largest packet, to allow for byte stuffing.
§ CAPT_QUEUE_BUFFER_SIZE
#define CAPT_QUEUE_BUFFER_SIZE (256) |
def CAPT_QUEUE_BUFFER_SIZE defines the size of the receive queue buffer.
§ CAPT_I2C_RECEIVE_BUFFER_SIZE
#define CAPT_I2C_RECEIVE_BUFFER_SIZE (32) |
def CAPT_REGISTER_I2C_BUFFER_SIZE defines the size of the I2C Rx buffer.
§ CAPT_I2C_REGISTER_RW_BUFFER_SIZE
#define CAPT_I2C_REGISTER_RW_BUFFER_SIZE (32) |
def CAPT_I2C_REGISTER_RW_BUFFER_SIZE defines the size of the I2C register mode working buffer.
§ I2CSLAVE__REQ_POUT
#define I2CSLAVE__REQ_POUT (P1OUT) |
§ I2CSLAVE__REQ_PDIR
#define I2CSLAVE__REQ_PDIR (P1DIR) |
§ I2CSLAVE__REQ_MASK
#define I2CSLAVE__REQ_MASK (BIT1) |
§ CAPT_initCommInterface()
Initialize TL communications as a whole. This API will start the low-level serial driver.
- Parameters
-
pApp | is a pointer to the application to link to |
- Returns
- none
Referenced by CAPT_initUI().
§ CAPT_writeElementData()
bool CAPT_writeElementData |
( |
uint8_t |
ui8SensorID | ) |
|
Transmit all element data for a given sensor.
- Parameters
-
ui8SensorID | indicates which sensor's data to transmit. |
- Returns
- true if data transmitting, else false.
Referenced by CAPT_updateUI().
§ CAPT_writeSensorData()
bool CAPT_writeSensorData |
( |
uint8_t |
ui8SensorID | ) |
|
Transmit all sensor-specific data for a given sensor.
- Parameters
-
ui8SensorID | indicates which sensor's data to transmit. |
- Returns
- true if data transmitting, else false.
Referenced by CAPT_updateUI().
§ CAPT_writeGeneralPurposeData()
bool CAPT_writeGeneralPurposeData |
( |
uint16_t * |
pData, |
|
|
uint8_t |
ui8Cnt |
|
) |
| |
Transmit generic, unsigned integer formatted data for logging or plotting.
- Parameters
-
pData | is a pointer to the data to send. |
ui8Cnt | is the number of entries pointed to by pData; the max is 29. |
- Returns
- true if data transmitting, else false.
§ CAPT_writeString()
bool CAPT_writeString |
( |
const char * |
pSrcString | ) |
|
Transmit a C string.
- Parameters
-
pSrcString | is a pointer to the first character of the string to send. The string must be null terminated. |
- Returns
- true if data transmitting, else false.
§ CAPT_writeTrackPadData()
bool CAPT_writeTrackPadData |
( |
uint8_t |
ui8SensorID | ) |
|
Transmit TrackPad specific X,Y position and Gesture data.
- Parameters
-
ui8SensorID | indicates which sensor's data to transmit. |
- Returns
- true if data transmitting, else false.
§ CAPT_checkForInboundPacket()
bool CAPT_checkForInboundPacket |
( |
void |
| ) |
|
Call into the protocol layer to determine if any parameter packets have been received. THis API should be called periodically in the background by the application layer.
- Parameters
- none
- Returns
- true if packet received, else false.
§ CAPT_checkForRecalibrationRequest()
bool CAPT_checkForRecalibrationRequest |
( |
void |
| ) |
|
Check if a sensor re-calibration was requested by the host.
- Parameters
- none
- Returns
- true if re-cal required, else false