Helper APIs

Last modified by Microchip on 2026/02/10 14:29

DO_NOT_REMOVE

The Application Programming Interfaces (APIs) defined in this sections are not mandatory to use. These APIs can be used to get or set touch library specific state or data.

get_sensor_node_signal

uint16_t get_sensor_node_signal(uint16_t sensor_node)

Description: Returns the signal value of the node.

 

update_sensor_node_signal

void update_sensor_node_signal(uint16_t sensor_node, uint16_t new_signal)

Description: Updates the signal value of the node with the new_signal value.

 

get_sensor_node_reference

uint16_t get_sensor_node_reference(uint16_t sensor_node)

Description: Returns the reference value of the node.

 

update_sensor_node_reference

void update_sensor_node_reference(uint16_t sensor_node, uint16_t new_reference)

Description: Updates the reference value of the node with the new_reference value.

 

Back to Top

get_sensor_cc_val

uint16_t get_sensor_cc_val(uint16_t sensor_node)

Description: Returns the CC value (a representation of sensor capacitance) of the node.

 

Back to Top

update_sensor_cc_val

void update_sensor_cc_val(uint16_t sensor_node, uint16_t new_cc_value)

Description: Updates the CC value of the node with the new_cc_value value.

 

Back to Top

get_sensor_state

uint8_t get_sensor_state(uint16_t sensor_node)

Description: Returns the sensor state of the node.

 

Back to Top

update_sensor_state

void update_sensor_state(uint16_t sensor_node, uint8_t new_state)

Description: Updates the sensor state of the node with the new_state value.

 

Back to Top

calibrate_node

void calibrate_node(uint16_t sensor_node)

Description: Configures the sensor_node for calibration. Actual calibration processes will start in the next measurement cycle.

 

Back to Top

get_scroller_state

uint8_t get_scroller_state(uint16_t scroller_num)

Description: Returns the scroller status of scroller number passed.

 

Back to Top

get_scroller_position

uint16_t get_scroller_position(uint16_t scroller_num)

Description: Returns the scroller position of scroller number passed.

 

Back to Top

get_surface_state

uint8_t get_surface_state(uint16_t num)

Description: Returns the surface status of scroller number passed.

 

Back to Top

get_surface_position

uint16_t get_surface_position(uint16_t ver_or_hor)

Description: Returns the surface's vertical or horizontal position based on input value.

 

Back to Top

get_surface_position

uint16_t get_surface_position(uint16_t ver_or_hor, uint8_t contact)

Description: Returns the surface's vertical or horizontal position based on input value. The value contact determines whether it is first position or second position.

 

Back to Top