|
Firmware SDK
|
Driver for CY8CMBR3102. More...
Typedefs | |
| typedef struct twr_cy8cmbr3102_t | twr_cy8cmbr3102_t |
| TCA9534A instance. | |
Enumerations | |
| enum | twr_cy8cmbr3102_event_t { TWR_CY8CMBR3102_EVENT_ERROR = 0 , TWR_CY8CMBR3102_EVENT_TOUCH = 1 } |
| Callback events. More... | |
Functions | |
| bool | twr_cy8cmbr3102_init (twr_cy8cmbr3102_t *self, twr_i2c_channel_t i2c_channel, uint8_t i2c_address) |
| Initialize CY8CMBR3102. More... | |
| void | twr_cy8cmbr3102_set_event_handler (twr_cy8cmbr3102_t *self, void(*event_handler)(twr_cy8cmbr3102_t *, twr_cy8cmbr3102_event_t, void *), void *event_param) |
| Set callback function. More... | |
| void | twr_cy8cmbr3102_set_scan_interval (twr_cy8cmbr3102_t *self, twr_tick_t scan_interval) |
| Set scan interval. More... | |
| bool | twr_cy8cmbr3102_get_proximity (twr_cy8cmbr3102_t *self, uint16_t value) |
| Get proximity (Capacitive sensor difference count signal.) More... | |
| bool | twr_cy8cmbr3102_is_touch (twr_cy8cmbr3102_t *self, bool *is_touch) |
| Is touch. More... | |
Driver for CY8CMBR3102.
Callback events.
| Enumerator | |
|---|---|
| TWR_CY8CMBR3102_EVENT_ERROR | Error event. |
| TWR_CY8CMBR3102_EVENT_TOUCH | Update event. |
Definition at line 13 of file twr_cy8cmbr3102.h.
| bool twr_cy8cmbr3102_get_proximity | ( | twr_cy8cmbr3102_t * | self, |
| uint16_t | value | ||
| ) |
Get proximity (Capacitive sensor difference count signal.)
| [in] | self | Instance |
| [out] | value |
Definition at line 57 of file twr_cy8cmbr3102.c.

| bool twr_cy8cmbr3102_init | ( | twr_cy8cmbr3102_t * | self, |
| twr_i2c_channel_t | i2c_channel, | ||
| uint8_t | i2c_address | ||
| ) |
Initialize CY8CMBR3102.
| [in] | self | Instance |
| [in] | i2c_channel | I2C channel |
| [in] | i2c_address | I2C device address |
Definition at line 28 of file twr_cy8cmbr3102.c.

| bool twr_cy8cmbr3102_is_touch | ( | twr_cy8cmbr3102_t * | self, |
| bool * | is_touch | ||
| ) |
Is touch.
| [in] | self | Instance |
| [out] | is_touch |
Definition at line 62 of file twr_cy8cmbr3102.c.

| void twr_cy8cmbr3102_set_event_handler | ( | twr_cy8cmbr3102_t * | self, |
| void(*)(twr_cy8cmbr3102_t *, twr_cy8cmbr3102_event_t, void *) | event_handler, | ||
| void * | event_param | ||
| ) |
Set callback function.
| [in] | self | Instance |
| [in] | event_handler | Function address |
| [in] | event_param | Optional event parameter (can be NULL) |
Definition at line 44 of file twr_cy8cmbr3102.c.
| void twr_cy8cmbr3102_set_scan_interval | ( | twr_cy8cmbr3102_t * | self, |
| twr_tick_t | scan_interval | ||
| ) |
Set scan interval.
| [in] | self | Instance |
| [in] | scan_interval | Desired scan interval in ticks |
Definition at line 50 of file twr_cy8cmbr3102.c.
