Synaptics Touchpad driver.
More...
Synaptics Touchpad driver.
#define TOUCHPAD_INT_STATUS 0x14 |
Interrupt status register.
Touchpad register addresses.
Operational states
Enumerator |
---|
SleepmodeNormal |
Normal operation.
|
SleepmodeSensorSleep |
Low power operation.
|
bool touchpad_init |
( |
uint8_t |
device_address | ) |
|
Function for Touchpad initialization.
- Parameters
-
device_address | TWI address of the device in bits [6:0] |
- Return values
-
true | Touchpad was successfully identified and initialized |
false | Unexpected product ID or communication failure |
bool touchpad_interrupt_status_read |
( |
uint8_t * |
interrupt_status | ) |
|
Function for reading the interrupt status register of the device. This clears all interrupts.
- Parameters
-
interrupt_status | Address to store interrupt status to. |
- Return values
-
true | Register contents read successfully to interrupt_status |
false | Reading failed |
bool touchpad_product_id_read |
( |
uint8_t * |
product_id, |
|
|
uint8_t |
product_id_bytes |
|
) |
| |
Function for writing touchpad register contents over TWI. Writes one or more consecutive registers.
- Parameters
-
[out] | product_id | Pointer to a address to store product ID. Memory must be allocated for product_id_bytes number of bytes. |
[in] | product_id_bytes | Number of bytes to read |
- Return values
-
true | Product ID read succeeded |
false | Product ID read failed |
bool touchpad_product_id_verify |
( |
void |
| ) |
|
Function for reading and verifying touchpad's product ID.
- Return values
-
true | Product ID is what was expected |
false | Product ID was not what was expected |
bool touchpad_read_register |
( |
uint8_t |
register_address, |
|
|
uint8_t * |
value |
|
) |
| |
Function for reading a touchpad register contents over TWI.
- Parameters
-
[in] | register_address | Register address |
[out] | value | Pointer to a data buffer where read data will be stored |
- Return values
-
true | Register read succeeded |
false | Register read failed |
bool touchpad_reset |
( |
void |
| ) |
|
Function for attempting to soft-reset the device.
- Return values
-
true | Reset succeeded |
false | Reset failed |
Function for sleep mode configuration.
- Note
- In low power mode the touchpad do not generate interrupts from touch sensing.
- Parameters
-
- Return values
-
true | Sleep mode set successfully |
false | Sleep mode setting failed |
bool touchpad_write_register |
( |
uint8_t |
register_address, |
|
|
uint8_t |
value |
|
) |
| |
Function for writing a touchpad register contents over TWI.
- Parameters
-
[in] | register_address | Register address |
[in] | value | Value to write to register |
- Return values
-
true | Register write succeeded |
false | Register write failed |