USB Device - Joystick/Mouse
1.0
|
Macros | |
#define | _delay_ delay /* !< Default _delay_ function with less precise timing */ |
Uncomment the line below to enable verfying each written byte in write operation. More... | |
#define | IOE_I2C I2C1 |
I2C port definitions. | |
#define | IOE_I2C_CLK RCC_APB1Periph_I2C1 |
#define | IOE_I2C_SCL_PIN GPIO_Pin_6 |
#define | IOE_I2C_SCL_GPIO_PORT GPIOB |
#define | IOE_I2C_SCL_GPIO_CLK RCC_AHB1Periph_GPIOB |
#define | IOE_I2C_SCL_SOURCE GPIO_PinSource6 |
#define | IOE_I2C_SCL_AF GPIO_AF_I2C1 |
#define | IOE_I2C_SDA_PIN GPIO_Pin_9 |
#define | IOE_I2C_SDA_GPIO_PORT GPIOB |
#define | IOE_I2C_SDA_GPIO_CLK RCC_AHB1Periph_GPIOB |
#define | IOE_I2C_SDA_SOURCE GPIO_PinSource9 |
#define | IOE_I2C_SDA_AF GPIO_AF_I2C1 |
#define | IOE_I2C_DR ((uint32_t)0x40005410) |
#define | I2C_SPEED 100000 |
#define | IOE_DMA_CLK RCC_AHB1Periph_DMA1 |
IOE DMA definitions. | |
#define | IOE_DMA_CHANNEL DMA_Channel_1 |
#define | IOE_DMA_TX_STREAM DMA1_Stream6 |
#define | IOE_DMA_TX_TCFLAG DMA_FLAG_TCIF6 |
#define | IOE_DMA_RX_STREAM DMA1_Stream0 |
#define | IOE_DMA_RX_TCFLAG DMA_FLAG_TCIF0 |
#define | IOE_IT_PIN GPIO_Pin_2 |
IO Expander Interrupt line on EXTI. | |
#define | IOE_IT_GPIO_PORT GPIOI |
#define | IOE_IT_GPIO_CLK RCC_AHB1Periph_GPIOI |
#define | IOE_IT_EXTI_PORT_SOURCE EXTI_PortSourceGPIOI |
#define | IOE_IT_EXTI_PIN_SOURCE EXTI_PinSource2 |
#define | IOE_IT_EXTI_LINE EXTI_Line2 |
#define | IOE_IT_EXTI_IRQn EXTI2_IRQn |
#define | AUDIO_RESET_PIN IO_Pin_2 /* IO_Exapnader_2 */ /* Output */ |
Eval Board IO Pins definition. | |
#define | MII_INT_PIN IO_Pin_0 /* IO_Exapnader_2 */ /* Output */ |
#define | VBAT_DIV_PIN IO_Pin_0 /* IO_Exapnader_1 */ /* Output */ |
#define | MEMS_INT1_PIN IO_Pin_3 /* IO_Exapnader_1 */ /* Input */ |
#define | MEMS_INT2_PIN IO_Pin_2 /* IO_Exapnader_1 */ /* Input */ |
#define | IO1_IN_ALL_PINS (uint32_t)(MEMS_INT1_PIN | MEMS_INT2_PIN) |
Eval Board both IO Exapanders Pins definition. | |
#define | IO2_IN_ALL_PINS (uint32_t)(JOY_IO_PINS) |
#define | IO1_OUT_ALL_PINS (uint32_t)(VBAT_DIV_PIN) |
#define | IO2_OUT_ALL_PINS (uint32_t)(AUDIO_RESET_PIN | MII_INT_PIN) |
#define | IOE_1_ADDR 0x82 |
The 7 bits IO Expanders adresses and chip IDs. | |
#define | IOE_2_ADDR 0x88 |
#define | STMPE811_ID 0x0811 |
#define | IOE_ADC_FCT 0x01 |
IO Expander Functionalities definitions. | |
#define | IOE_TS_FCT 0x02 |
#define | IOE_IO_FCT 0x04 |
#define | IOE_TEMPSENS_FCT 0x08 |
#define | IOE_ITSRC_TSC 0x01 /* IO_Exapnder 1 */ |
Interrupt source configuration definitons. | |
#define | IOE_ITSRC_INMEMS 0x02 /* IO_Exapnder 1 */ |
#define | IOE_ITSRC_JOYSTICK 0x04 /* IO_Exapnder 2 */ |
#define | IOE_ITSRC_TEMPSENS 0x08 /* IO_Exapnder 2 */ |
#define | IOE_GIT_GPIO 0x80 |
Glaobal Interrupts definitions. | |
#define | IOE_GIT_ADC 0x40 |
#define | IOE_GIT_TEMP 0x20 |
#define | IOE_GIT_FE 0x10 |
#define | IOE_GIT_FF 0x08 |
#define | IOE_GIT_FOV 0x04 |
#define | IOE_GIT_FTH 0x02 |
#define | IOE_GIT_TOUCH 0x01 |
#define | IOE_REG_CHP_ID 0x00 |
Identification registers. | |
#define | IOE_REG_ID_VER 0x02 |
#define | IOE_REG_SYS_CTRL1 0x03 |
General Control Registers. | |
#define | IOE_REG_SYS_CTRL2 0x04 |
#define | IOE_REG_SPI_CFG 0x08 |
#define | IOE_REG_INT_CTRL 0x09 |
Interrupt Control register. | |
#define | IOE_REG_INT_EN 0x0A |
#define | IOE_REG_INT_STA 0x0B |
#define | IOE_REG_GPIO_INT_EN 0x0C |
#define | IOE_REG_GPIO_INT_STA 0x0D |
#define | IOE_REG_GPIO_SET_PIN 0x10 |
GPIO Registers. | |
#define | IOE_REG_GPIO_CLR_PIN 0x11 |
#define | IOE_REG_GPIO_MP_STA 0x12 |
#define | IOE_REG_GPIO_DIR 0x13 |
#define | IOE_REG_GPIO_ED 0x14 |
#define | IOE_REG_GPIO_RE 0x15 |
#define | IOE_REG_GPIO_FE 0x16 |
#define | IOE_REG_GPIO_AF 0x17 |
#define | IOE_REG_ADC_INT_EN 0x0E |
ADC Registers. | |
#define | IOE_REG_ADC_INT_STA 0x0F |
#define | IOE_REG_ADC_CTRL1 0x20 |
#define | IOE_REG_ADC_CTRL2 0x21 |
#define | IOE_REG_ADC_CAPT 0x22 |
#define | IOE_REG_ADC_DATA_CH0 0x30 /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH1 0x32 /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH2 0x34 /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH3 0x36 /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH4 0x38 /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH5 0x3A /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH6 0x3B /* 16-Bit register */ |
#define | IOE_REG_ADC_DATA_CH7 0x3C /* 16-Bit register */ |
#define | IOE_REG_TSC_CTRL 0x40 |
TouchScreen Registers. | |
#define | IOE_REG_TSC_CFG 0x41 |
#define | IOE_REG_WDM_TR_X 0x42 |
#define | IOE_REG_WDM_TR_Y 0x44 |
#define | IOE_REG_WDM_BL_X 0x46 |
#define | IOE_REG_WDM_BL_Y 0x48 |
#define | IOE_REG_FIFO_TH 0x4A |
#define | IOE_REG_FIFO_STA 0x4B |
#define | IOE_REG_FIFO_SIZE 0x4C |
#define | IOE_REG_TSC_DATA_X 0x4D |
#define | IOE_REG_TSC_DATA_Y 0x4F |
#define | IOE_REG_TSC_DATA_Z 0x51 |
#define | IOE_REG_TSC_DATA_XYZ 0x52 |
#define | IOE_REG_TSC_FRACT_XYZ 0x56 |
#define | IOE_REG_TSC_DATA 0x57 |
#define | IOE_REG_TSC_I_DRIVE 0x58 |
#define | IOE_REG_TSC_SHIELD 0x59 |
#define | IOE_REG_TEMP_CTRL 0x60 |
Temperature Sensor registers. | |
#define | IOE_REG_TEMP_DATA 0x61 |
#define | IOE_REG_TEMP_TH 0x62 |
#define | TOUCH_YD IO_Pin_1 /* IO_Exapnader_1 */ /* Input */ |
Touch Screen Pins definition. | |
#define | TOUCH_XD IO_Pin_2 /* IO_Exapnader_1 */ /* Input */ |
#define | TOUCH_YU IO_Pin_3 /* IO_Exapnader_1 */ /* Input */ |
#define | TOUCH_XU IO_Pin_4 /* IO_Exapnader_1 */ /* Input */ |
#define | TOUCH_IO_ALL (uint32_t)(IO_Pin_1 | IO_Pin_2 | IO_Pin_3 | IO_Pin_4) |
#define | JOY_IO_SEL IO_Pin_7 |
JOYSTICK Pins definition. | |
#define | JOY_IO_DOWN IO_Pin_6 |
#define | JOY_IO_LEFT IO_Pin_5 |
#define | JOY_IO_RIGHT IO_Pin_4 |
#define | JOY_IO_UP IO_Pin_3 |
#define | JOY_IO_NONE JOY_IO_PINS |
#define | JOY_IO_PINS (uint32_t)(IO_Pin_3 | IO_Pin_4 | IO_Pin_5 | IO_Pin_6 | IO_Pin_7) |
#define | IO_Pin_0 0x01 |
IO Pins. | |
#define | IO_Pin_1 0x02 |
#define | IO_Pin_2 0x04 |
#define | IO_Pin_3 0x08 |
#define | IO_Pin_4 0x10 |
#define | IO_Pin_5 0x20 |
#define | IO_Pin_6 0x40 |
#define | IO_Pin_7 0x80 |
#define | IO_Pin_ALL 0xFF |
#define | Direction_IN 0x00 |
IO Pin directions. | |
#define | Direction_OUT 0x01 |
#define | Polarity_Low 0x00 |
Interrupt Line output parameters. | |
#define | Polarity_High 0x04 |
#define | Type_Level 0x00 |
#define | Type_Edge 0x02 |
#define | IO_IT_0 0x01 |
IO Interrupts. | |
#define | IO_IT_1 0x02 |
#define | IO_IT_2 0x04 |
#define | IO_IT_3 0x08 |
#define | IO_IT_4 0x10 |
#define | IO_IT_5 0x20 |
#define | IO_IT_6 0x40 |
#define | IO_IT_7 0x80 |
#define | ALL_IT 0xFF |
#define | IOE_JOY_IT (uint8_t)(IO_IT_3 | IO_IT_4 | IO_IT_5 | IO_IT_6 | IO_IT_7) |
#define | IOE_TS_IT (uint8_t)(IO_IT_0 | IO_IT_1 | IO_IT_2) |
#define | IOE_INMEMS_IT (uint8_t)(IO_IT_2 | IO_IT_3) |
#define | EDGE_FALLING 0x01 |
Edge detection value. | |
#define | EDGE_RISING 0x02 |
#define | IOE_GIT_EN 0x01 |
Global interrupt Enable bit. | |
#define _delay_ delay /* !< Default _delay_ function with less precise timing */ |
Uncomment the line below to enable verfying each written byte in write operation.
The I2C_WriteDeviceRegister() function will then compare the written and read data and return error status if a mismatch occurs. Uncomment the line below if you want to use user timeout callback. Function prototypes is declared in this file but function body may be implemented into user application. Uncomment the line below if you want to use user defined Delay function (for precise timing), otherwise default delay function defined within this driver is used (less precise timing).