VSF Documented
|
Functions | |
void | I2C_txStart (MPS2_I2C_TypeDef *i2c) |
void | I2C_txStop (MPS2_I2C_TypeDef *i2c) |
void | I2C_txBit (MPS2_I2C_TypeDef *i2c, uint8_t bit) |
uint8_t | I2C_rxBit (MPS2_I2C_TypeDef *i2c) |
uint32_t | I2C_rxAck (MPS2_I2C_TypeDef *i2c) |
void | I2C_txAck (MPS2_I2C_TypeDef *i2c, uint8_t ack) |
void | I2C_txByte (MPS2_I2C_TypeDef *i2c, uint8_t data) |
uint8_t | I2C_rxByte (MPS2_I2C_TypeDef *i2c) |
void | I2C_tx (MPS2_I2C_TypeDef *i2c, uint8_t sadr, uint8_t *data, uint8_t num, bool xferPending) |
void | I2C_rx (MPS2_I2C_TypeDef *i2c, uint8_t sadr, uint8_t *data, uint8_t num, bool xferPending) |
int32_t | Touch_Initialize (void) |
Initialize touchscreen. | |
int32_t | Touch_Uninitialize (void) |
De-initialize touchscreen. | |
int32_t | Touch_GetState (TOUCH_STATE *pState) |
Get touchscreen state. | |
#define TSC_I2C_ADDR 0x41 /* 7-bit I2C address */ |
#define TSC_I2C_CID 0x0811 |
#define STMPE811_CHIP_ID 0x00 |
#define STMPE811_ID_VER 0x02 |
#define STMPE811_SYS_CTRL1 0x03 |
#define STMPE811_SYS_CTRL2 0x04 |
#define STMPE811_SPI_CFG 0x08 |
#define STMPE811_INT_CTRL 0x09 |
#define STMPE811_INT_EN 0x0A |
#define STMPE811_INT_STA 0x0B |
#define STMPE811_GPIO_EN 0x0C |
#define STMPE811_GPIO_INT_STA 0x0D |
#define STMPE811_ADC_INT_EN 0x0E |
#define STMPE811_ADC_INT_STA 0x0F |
#define STMPE811_GPIO_SET_PIN 0x10 |
#define STMPE811_GPIO_CLR_PIN 0x11 |
#define STMPE811_GPIO_MP_STA 0x12 |
#define STMPE811_GPIO_DIR 0x13 |
#define STMPE811_GPIO_ED 0x14 |
#define STMPE811_GPIO_RE 0x15 |
#define STMPE811_GPIO_FE 0x16 |
#define STMPE811_GPIO_AF 0x17 |
#define STMPE811_ADC_CTRL1 0x20 |
#define STMPE811_ADC_CTRL2 0x21 |
#define STMPE811_ADC_CAPT 0x22 |
#define STMPE811_ADC_DATA_CH0 0x30 |
#define STMPE811_ADC_DATA_CH1 0x32 |
#define STMPE811_ADC_DATA_CH2 0x34 |
#define STMPE811_ADC_DATA_CH3 0x36 |
#define STMPE811_ADC_DATA_CH4 0x38 |
#define STMPE811_ADC_DATA_CH5 0x3A |
#define STMPE811_ADC_DATA_CH6 0x3C |
#define STMPE811_ADC_DATA_CH7 0x3E |
#define STMPE811_TSC_CTRL 0x40 |
#define STMPE811_TSC_CFG 0x41 |
#define STMPE811_WDW_TR_X 0x42 |
#define STMPE811_WDW_TR_Y 0x44 |
#define STMPE811_WDW_BL_X 0x46 |
#define STMPE811_WDW_BL_Y 0x48 |
#define STMPE811_FIFO_TH 0x4A |
#define STMPE811_FIFO_STA 0x4B |
#define STMPE811_FIFO_SIZE 0x4C |
#define STMPE811_TSC_DATA_X 0x4D |
#define STMPE811_TSC_DATA_Y 0x4F |
#define STMPE811_TSC_DATA_Z 0x51 |
#define STMPE811_TSC_FRACTION_Z 0x56 |
#define STMPE811_TSC_DATA_XYZ 0x57 |
#define STMPE811_TSC_DATA 0xD7 |
#define STMPE811_TSC_I_DRIVE 0x58 |
#define STMPE811_TSC_SHIELD 0x59 |
#define STMPE811_TEMP_CTRL 0x60 |
#define STMPE811_TEMP_DATA 0x61 |
#define STMPE811_TEMP_TH 0x62 |
#define MPS2_FPGAIO_PORT MPS2_FPGAIO |
#define MPS2_I2C_PORT MPS2_I2C0 |
#define SDA (1 << 1) |
#define SCL (1 << 0) |
#define TSC_TSU 15 /* Setup delay 600nS min */ |
#define I2C_HIGH | ( | pin | ) | (i2c->CONTROLS = pin) |
#define I2C_LOW | ( | pin | ) | (i2c->CONTROLC = pin) |
#define I2C_GET | ( | pin | ) | ((i2c->CONTROL >> (pin - 1)) & 0x01) |
#define I2C_DLY | ( | ) | I2C_delay(TSC_TSU) |
void I2C_txStart | ( | MPS2_I2C_TypeDef * | i2c | ) |
void I2C_txStop | ( | MPS2_I2C_TypeDef * | i2c | ) |
void I2C_txBit | ( | MPS2_I2C_TypeDef * | i2c, |
uint8_t | bit | ||
) |
uint8_t I2C_rxBit | ( | MPS2_I2C_TypeDef * | i2c | ) |
uint32_t I2C_rxAck | ( | MPS2_I2C_TypeDef * | i2c | ) |
void I2C_txAck | ( | MPS2_I2C_TypeDef * | i2c, |
uint8_t | ack | ||
) |
void I2C_txByte | ( | MPS2_I2C_TypeDef * | i2c, |
uint8_t | data | ||
) |
uint8_t I2C_rxByte | ( | MPS2_I2C_TypeDef * | i2c | ) |
void I2C_tx | ( | MPS2_I2C_TypeDef * | i2c, |
uint8_t | sadr, | ||
uint8_t * | data, | ||
uint8_t | num, | ||
bool | xferPending | ||
) |
void I2C_rx | ( | MPS2_I2C_TypeDef * | i2c, |
uint8_t | sadr, | ||
uint8_t * | data, | ||
uint8_t | num, | ||
bool | xferPending | ||
) |
int32_t Touch_Initialize | ( | void | ) |
Initialize touchscreen.
int32_t Touch_Uninitialize | ( | void | ) |
De-initialize touchscreen.
int32_t Touch_GetState | ( | TOUCH_STATE * | pState | ) |
Get touchscreen state.
[out] | pState | pointer to TOUCH_STATE structure |