MSP430™CapTIvateSoftwareLibraryAPIGuide 1_70_00_03

Data Structures | Macros | Typedefs | Enumerations | Functions
CAPT_Protocol.h File Reference
`#include <stdio.h>`
`#include <stdbool.h>`
`#include "CAPT_ByteQueue.h"`
`#include "CAPT_Type.h"`
Include dependency graph for CAPT_Protocol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | tTLProtocolProcessingVariables
union | tParameterPacket

## Macros
#define | TL_PROTOCOL_SYNC (0x55)
| CapTIvate™ Protocol Control Bytes. More...
#define | TL_PROTOCOL_BLANK (0xAA)
#define | TL_PROTOCOL_READ (0x00)
#define | TL_PROTOCOL_WRITE (0x01)
#define | TL_SENSOR_PACKET_CMD (0x00)
#define | TL_CYCLE_PACKET_CMD (0x01)
#define | TL_TRACKPAD_PACKET_CMD (0x02)
#define | TL_GENERAL_PURPOSE_PACKET_CMD (0x10)
#define | TL_STRING_PACKET_CMD (0x3E)
#define | TL_PARAM_CMD_GENERIC_MASK (0x80)
#define | TL_PARAM_CMD_SLIDER_WHEEL_MASK (0x90)
#define | TL_PARAM_CMD_TP_MASK (0xA0)
#define | TL_PARAM_CMD_DYCAL_MASK (0xB0)
#define | TL_PARAM_CMD_CTRL_MASK (0xC0)
#define | TL_PARAM_CMD_SPECIAL_MASK (0xD0)
#define | TL_PARAM_CMD_INVALID_MASK (0xF0)
#define | TL_PARAM_CMD_TRACKPADFILTEREN (0x60)
#define | TL_PARAM_CMD_TRACKPADFILTERBETA (0x61)
#define | TL_PARAM_CMD_BETATOPSPEED (0x63)
#define | TL_PARAM_CMD_BETABOTTOMSPEED (0x64)
#define | TL_PARAM_CMD_LOWERBETA (0x65)
#define | TL_PARAM_CMD_TRACKPADFILTERTYPE (0x66)
#define | TL_PARAM_CMD_RESOLUTION_X (0x67)
#define | TL_PARAM_CMD_RESOLUTION_Y (0x68)
#define | TL_PARAM_CMD_LOWERTRIM_X (0x69)
#define | TL_PARAM_CMD_UPPERTRIM_X (0x6A)
#define | TL_PARAM_CMD_LOWERTRIM_Y (0x6B)
#define | TL_PARAM_CMD_UPPERTRIM_Y (0x6C)
#define | TL_PARAM_CMD_CENTERTRIM_X (0x6D)
#define | TL_PARAM_CMD_CENTERTRIM_Y (0x6E)
#define | TL_PARAM_CMD_CIRCLERADIUS (0x6F)
#define | TL_PARAM_CMD_TAPTIME_MIN (0x70)
#define | TL_PARAM_CMD_TAPTIME_MAX (0x71)
#define | TL_PARAM_CMD_SWIPETIME_MAX (0x72)
#define | TL_PARAM_CMD_DBLTAPTIME_MAX (0x73)
#define | TL_PARAM_CMD_TAPHOLDTIME_MIN (0x74)
#define | TL_PARAM_CMD_SWIPEDISTANCE_MIN (0x75)
#define | TL_PARAM_CMD_DBLTAPENABLE (0x76)
#define | TL_PARAM_CMD_SWIPEENABLE (0x77)
#define | TL_PARAM_CMD_CIRCLEENABLE (0x78)
#define | TL_PARAM_CMD_ENDTRACKPAD (0x7F)
#define | TL_PARAM_CMD_CONVERSIONGAIN (0x80)
#define | TL_PARAM_CMD_CONVERSIONCOUNT (0x81)
#define | TL_PARAM_CMD_PROX_THRESH (0x82)
#define | TL_PARAM_CMD_TOUCH_THRESH (0x83)
#define | TL_PARAM_CMD_PROX_DBIN (0x84)
#define | TL_PARAM_CMD_PROX_DBOUT (0x85)
#define | TL_PARAM_CMD_TOUCH_DBIN (0x86)
#define | TL_PARAM_CMD_TOUCH_DBOUT (0x87)
#define | TL_PARAM_CMD_TIMEOUT (0x88)
#define | TL_PARAM_CMD_COUNTFILTEN (0x89)
#define | TL_PARAM_CMD_COUNTFILTBETA (0x8A)
#define | TL_PARAM_CMD_LTAFILTBETA (0x8B)
#define | TL_PARAM_CMD_LTAFILTERHALT (0x8C)
#define | TL_PARAM_CMD_DRIFTRECALENABLE (0x8D)
#define | TL_PARAM_CMD_FORCERECALIBRATE (0x8E)
#define | TL_PARAM_CMD_BIAS_CURRENT (0x8F)
#define | TL_PARAM_CMD_CS_DISCHARGE (0x95)
#define | TL_PARAM_CMD_MODENABLE (0x96)
#define | TL_PARAM_CMD_FREQDIV (0x97)
#define | TL_PARAM_CMD_CPLEN (0x98)
#define | TL_PARAM_CMD_TPLEN (0x99)
#define | TL_PARAM_CMD_ERROR_THRESH (0x9A)
#define | TL_PARAM_CMD_NEG_TOUCH_THRESH (0x9B)
#define | TL_PARAM_CMD_IDLE_STATE (0x9C)
#define | TL_PARAM_CMD_INPUT_SYNC (0x9D)
#define | TL_PARAM_CMD_TIMER_SYNC (0x9E)
#define | TL_PARAM_CMD_LPMCTRL (0x9F)
#define | TL_PARAM_CMD_LTA_SENSOR_PTHALT (0xA0)
#define | TL_PARAM_CMD_LTA_ELEMENT_PTHALT (0xA1)
#define | TL_PARAM_CMD_COARSE_GAIN_RATIO (0xA2)
#define | TL_PARAM_CMD_FINE_GAIN_RATIO (0xA3)
#define | TL_PARAM_CMD_OFFSET_SUBTRACTION (0xA4)
#define | TL_PARAM_CMD_OFFSET_SCALE (0xD0)
#define | TL_PARAM_CMD_OFFSET_LEVEL (0xD1)
#define | TL_PARAM_CMD_SLIDER_FILTEREN (0x90)
#define | TL_PARAM_CMD_SLIDER_FILTERBETA (0x91)
#define | TL_PARAM_CMD_SLIDER_RES (0x92)
#define | TL_PARAM_CMD_SLIDER_LTRIM (0x93)
#define | TL_PARAM_CMD_SLIDER_UTRIM (0x94)
#define | TL_PARAM_CMD_CTRL_ELEMENTTXEN (0xC0)
#define | TL_PARAM_CMD_CTRL_SENSORTXEN (0xC1)
#define | TL_PARAM_CMD_CTRL_REPORTRATE_ACTIVE (0xC2)
#define | TL_PARAM_CMD_CTRL_REPORTRATE_AUTO (0xC3)
#define | TL_PARAM_CMD_CTRL_WAKEINTERVAL_AUTO (0xC4)
#define | TL_PARAM_CMD_CTRL_TIMEOUT_ACTIVE (0xC5)
#define | TL_PCKT_SERIAL_OVRHD_LENGTH (0x03)
| CapTIvate™ Protocol Length Bytes. More...
#define | TL_PCKT_CHKSUM_LENGTH (0x02)
#define | TL_CYCLE_STATE_OFFSET (0x06)
#define | TL_CYCLE_STATE_LEN (0x03)
#define | TL_CYCLE_LEN_PER_ELEMENT (0x04)
#define | TL_CYCLE_OVRHD_LEN (0x06)
#define | TL_SENSOR_PACKET_LENGTH (0x0B)
#define | TL_PARAMETER_PACKET_LENGTH (0x0C)
#define | TL_PARAMETER_DATA_LENGTH (0x07)
#define | TL_GENERAL_PURPOSE_MAX_CNT (0x1D)
#define | TL_STRING_MAX_CNT (0x3A)
#define | TL_PCKT_CMD_FIELD (0x03)
| CapTIvate™ Protocol Field Offsets. More...
#define | TL_SENSOR_PCKT_ID_FIELD (0x04)
#define | TL_CYCLE_PCKT_ID_FIELD (0x04)
#define | TL_CYCLE_PCKT_CYCLE_FIELD (0x05)
#define | TL_PARAM_PCKT_RW_FIELD (0x04)
#define | TL_PARAM_PCKT_ID_FIELD (0x05)
#define | TL_TRACKPAD_PACKET_BASE_LENGTH (0x09)
| Low level protocol packet builder for trackpad. More...

## Typedefs
typedef uint8_t | tTLParameterAccessResult

## Enumerations
enum | { eInvalidSensor = 0x00, eInvalidCmd = 0x01, eValidCmd = 0x02, eValidCmdWithReCalibrate = 0x03 }

## Functions
tTLParameterAccessResult | CAPT_accessTrackPadSensorParameter (tSensor **sensorArray, tParameterPacket *pPacket)
| Access a special CapTIvate™ TL structure variable for a TrackPad sensor. More...
uint16_t | CAPT_getCyclePacket (tSensor **sensorArray, uint8_t ui8SensorID, uint8_t ui8Cycle, uint8_t *pBuffer)
uint16_t | CAPT_getSensorPacket (tSensor **sensorArray, uint8_t ui8SensorID, uint8_t *pBuffer)
uint16_t | CAPT_getGeneralPurposePacket (uint16_t *pData, uint8_t ui8Cnt, uint8_t *pBuffer)
uint16_t | CAPT_getStringPacket (const char *pSrcString, uint8_t *pBuffer)
uint16_t | CAPT_getTrackPadPacket (tSensor *pSensor, uint8_t ui8SensorID, uint8_t *pBuffer)
uint16_t | CAPT_getTrackPadSensorStatusPacket (tSensor **sensorArray, uint8_t ui8SensorID, uint8_t *pBuffer)
uint16_t | CAPT_getChecksum (const uint8_t *pBuffer, const uint16_t ui16Length)
| This API calculate the checksum of a byte buffer of given length. More...
bool | CAPT_verifyChecksum (const uint8_t *pBuffer, const uint16_t ui16Length, const uint16_t ui16Checksum)
| This API verifies the checksum of a byte buffer of given length. More...
uint16_t | CAPT_stuffSyncBytes (uint8_t *pBuffer, uint16_t ui16Length)
bool | CAPT_processReceivedData (tByteQueue *pReceiveQueue, tParameterPacket *pPacket, tTLProtocolProcessingVariables *pVariables)
tTLParameterAccessResult | CAPT_accessSensorParameter (tSensor **sensorArray, tParameterPacket *pPacket)
tTLParameterAccessResult | CAPT_accessSpecialSensorParameter (tSensor **sensorArray, tParameterPacket *pPacket)

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