Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_cy8cmbr3102

Driver for CY8CMBR3102. More...

Typedefs

typedef struct bc_cy8cmbr3102_t bc_cy8cmbr3102_t
 TCA9534A instance.
 

Enumerations

enum  bc_cy8cmbr3102_event_t {
  BC_CY8CMBR3102_EVENT_ERROR = 0,
  BC_CY8CMBR3102_EVENT_TOUCH = 1
}
 Callback events. More...
 

Functions

bool bc_cy8cmbr3102_init (bc_cy8cmbr3102_t *self, bc_i2c_channel_t i2c_channel, uint8_t i2c_address)
 Initialize CY8CMBR3102. More...
 
void bc_cy8cmbr3102_set_event_handler (bc_cy8cmbr3102_t *self, void(*event_handler)(bc_cy8cmbr3102_t *, bc_cy8cmbr3102_event_t, void *), void *event_param)
 Set callback function. More...
 
void bc_cy8cmbr3102_set_scan_interval (bc_cy8cmbr3102_t *self, bc_tick_t scan_interval)
 Set scan interval. More...
 
bool bc_cy8cmbr3102_get_proximity (bc_cy8cmbr3102_t *self, uint16_t value)
 Get proximity (Capacitive sensor difference count signal.) More...
 
bool bc_cy8cmbr3102_is_touch (bc_cy8cmbr3102_t *self, bool *is_touch)
 Is touch. More...
 

Detailed Description

Driver for CY8CMBR3102.

Enumeration Type Documentation

Callback events.

Enumerator
BC_CY8CMBR3102_EVENT_ERROR 

Error event.

BC_CY8CMBR3102_EVENT_TOUCH 

Update event.

Definition at line 13 of file bc_cy8cmbr3102.h.

Function Documentation

bool bc_cy8cmbr3102_get_proximity ( bc_cy8cmbr3102_t self,
uint16_t  value 
)

Get proximity (Capacitive sensor difference count signal.)

Parameters
[in]selfInstance
[out]value
Returns
true On success
false On failure

Definition at line 57 of file bc_cy8cmbr3102.c.

Here is the call graph for this function:

bool bc_cy8cmbr3102_init ( bc_cy8cmbr3102_t self,
bc_i2c_channel_t  i2c_channel,
uint8_t  i2c_address 
)

Initialize CY8CMBR3102.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel
[in]i2c_addressI2C device address

Definition at line 28 of file bc_cy8cmbr3102.c.

Here is the call graph for this function:

bool bc_cy8cmbr3102_is_touch ( bc_cy8cmbr3102_t self,
bool *  is_touch 
)

Is touch.

Parameters
[in]selfInstance
[out]is_touch
Returns
true On success
false On failure

Definition at line 62 of file bc_cy8cmbr3102.c.

Here is the call graph for this function:

void bc_cy8cmbr3102_set_event_handler ( bc_cy8cmbr3102_t self,
void(*)(bc_cy8cmbr3102_t *, bc_cy8cmbr3102_event_t, void *)  event_handler,
void *  event_param 
)

Set callback function.

Parameters
[in]selfInstance
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)

Definition at line 44 of file bc_cy8cmbr3102.c.

void bc_cy8cmbr3102_set_scan_interval ( bc_cy8cmbr3102_t self,
bc_tick_t  scan_interval 
)

Set scan interval.

Parameters
[in]selfInstance
[in]scan_intervalDesired scan interval in ticks

Definition at line 50 of file bc_cy8cmbr3102.c.

Here is the call graph for this function: