Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TOUCH - QT1081 QTouch sensor

The QT1081 sensor is operated by GPIOs and this driver provides a wrapper for the GPIO accesses.

Functions

static __always_inline int is_touch_sensor_0 (void)
 This function tests if touch sensor 0 was touched. More...
 
static __always_inline int is_touch_sensor_1 (void)
 This function tests if touch sensor 1 was touched. More...
 
static __always_inline int is_touch_sensor_2 (void)
 This function tests if touch sensor 2 was touched. More...
 
static __always_inline int is_touch_sensor_3 (void)
 This function tests if touch sensor 3 was touched. More...
 
static __always_inline int is_touch_sensor_4 (void)
 This function tests if touch sensor 4 was touched. More...
 
static __always_inline void qt1081_power_down (void)
 Puts the QT1081 into low power mode. More...
 
static __always_inline void qt1081_power_up (void)
 Puts the QT1081 into low power mode. More...
 

static __always_inline int is_touch_sensor_0 ( void  )
static

This function tests if touch sensor 0 was touched.

Returns
true if the sensor is touched, otherwise 0.

References gpio_get_pin_value(), QT1081_TOUCH_SENSOR_0, and QT1081_TOUCH_SENSOR_0_PRESSED.

Referenced by is_joystick_up().

static __always_inline int is_touch_sensor_1 ( void  )
static

This function tests if touch sensor 1 was touched.

Returns
true if the sensor is touched, otherwise 0.

References gpio_get_pin_value(), QT1081_TOUCH_SENSOR_1, and QT1081_TOUCH_SENSOR_1_PRESSED.

Referenced by is_joystick_down().

static __always_inline int is_touch_sensor_2 ( void  )
static

This function tests if touch sensor 2 was touched.

Returns
true if the sensor is touched, otherwise 0.

References gpio_get_pin_value(), QT1081_TOUCH_SENSOR_2, and QT1081_TOUCH_SENSOR_2_PRESSED.

Referenced by is_joystick_right().

static __always_inline int is_touch_sensor_3 ( void  )
static

This function tests if touch sensor 3 was touched.

Returns
true if the sensor is touched, otherwise 0.

References gpio_get_pin_value(), QT1081_TOUCH_SENSOR_3, and QT1081_TOUCH_SENSOR_3_PRESSED.

Referenced by is_joystick_left().

static __always_inline int is_touch_sensor_4 ( void  )
static

This function tests if touch sensor 4 was touched.

Returns
true if the sensor is touched, otherwise 0.

References gpio_get_pin_value(), QT1081_TOUCH_SENSOR_4, and QT1081_TOUCH_SENSOR_4_PRESSED.

Referenced by is_joystick_pressed().

static __always_inline void qt1081_power_down ( void  )
static

Puts the QT1081 into low power mode.

References gpio_set_gpio_pin(), and QT1081_LP_MODE.

static __always_inline void qt1081_power_up ( void  )
static

Puts the QT1081 into low power mode.

References gpio_clr_gpio_pin(), and QT1081_LP_MODE.