2.2 Helper APIs

The 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.

uint16_t get_sensor_node_signal(uint16_t sensor_node)

Description: Returns the signal value of the node.

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.

uint16_t get_sensor_node_reference(uint16_t sensor_node)

Description: Returns the Reference value of the node.

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.

uint16_t get_sensor_cc_val(uint16_t sensor_node)

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

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.

uint8_t get_sensor_state(uint16_t sensor_node)

Description: Returns the sensor state of the node.

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.

void calibrate_node(uint16_t sensor_node)

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

uint8_t get_scroller_state(uint16_t scroller_num)

Description: Returns the scroller status of scroller number passed. value.

uint16_t get_scroller_position(uint16_t scroller_num)

Description: Returns the scroller position of scroller number passed. value.

uint8_t get_surface_state(uint16_t num)

Description: Returns the surface status of scroller number passed. value.

uint16_t get_surface_position(uint16_t ver_or_hor)

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

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 whehter it is 1st position or 2nd position.