Reference I2C port functions for PSOC Edge E84.
Functions | |
| uint32_t | touchpad_i2c_init (void) |
| Initializes the I2C interface for the touchpad. | |
| uint32_t | touchpad_i2c_read (uint16_t subaddress, uint8_t *data, uint16_t length, void *intf_ptr) |
| Reads data from the touchpad device over I2C. | |
| uint32_t | touchpad_i2c_write (uint16_t subaddress, uint8_t *data, uint16_t length, void *intf_ptr) |
| Writes data to the touchpad device over I2C. | |
| uint32_t touchpad_i2c_init | ( | void | ) |
Initializes the I2C interface for the touchpad.
This function initializes the I2C peripheral and configures it for communication with the touchpad device. It must be called before any read or write operations are performed.
| uint32_t touchpad_i2c_read | ( | uint16_t | subaddress, |
| uint8_t * | data, | ||
| uint16_t | length, | ||
| void * | intf_ptr ) |
Reads data from the touchpad device over I2C.
This function reads a specified number of bytes from the given subaddress (register) of the touchpad device and stores the data in the provided buffer.
| [in] | subaddress | : Register address to read from. |
| [out] | data | : Pointer to buffer where read data will be stored. |
| [in] | length | : Number of bytes to read. |
| [in] | intf_ptr | : Pointer to interface-specific context (e.g., I2C handle or slave address). |
| uint32_t touchpad_i2c_write | ( | uint16_t | subaddress, |
| uint8_t * | data, | ||
| uint16_t | length, | ||
| void * | intf_ptr ) |
Writes data to the touchpad device over I2C.
This function writes a specified number of bytes to the given subaddress (register) of the touchpad device using the provided data buffer.
| [in] | subaddress | : Register address to write to. |
| [in] | data | : Pointer to buffer containing data to be written. |
| [in] | length | : Number of bytes to write. |
| [in] | intf_ptr | : Pointer to interface-specific context (e.g., I2C handle or slave address). |