19#ifndef INC_TOUCHPAD_DRIVER_H_
20#define INC_TOUCHPAD_DRIVER_H_
The touchpads class implements some easier ways to work with the MCU's capacitive touch architecture.
Definition: touchpad_driver.h:28
TSC_IOConfigTypeDef io4
Bit mask to activate the third pin in each TSC group.
Definition: touchpad_driver.h:38
TSC_IOConfigTypeDef io1
Bit mask to activate the first pin in each TSC group.
Definition: touchpad_driver.h:34
touchpads(TSC_HandleTypeDef *htsc)
Definition: touchpad_driver.h:66
uint32_t discern_press(uint32_t tsc_readings[14])
discern_press() compares capacitive touch readings with the calibration values in order to discern if...
Definition: touchpad_driver.cpp:349
struct touchpads::calibrationvalues_t calibration_values
uint32_t read_touchpads(uint32_t tsc_readings[14])
read_touchpads() checks if someone is touching the capacitive touch pads.
Definition: touchpad_driver.cpp:187
TSC_HandleTypeDef * touch
Touch sensor object type (defined by the HAL)
Definition: touchpad_driver.h:41
TSC_IOConfigTypeDef io2
Bit mask to activate the second pin in each TSC group.
Definition: touchpad_driver.h:36
TSC_IOConfigTypeDef all_ios
Bit mask to activate all TSC pins.
Definition: touchpad_driver.h:32
void init()
The init function essentially runs the read_touchpads function and places the readings into a calibra...
Definition: touchpad_driver.cpp:26
TSC_HandleTypeDef htsc
Definition: main.cpp:68
This file contains all the functions prototypes for the HAL module driver.
TSC handle Structure definition.
Definition: stm32f3xx_hal_tsc.h:114
TSC IOs configuration structure definition.
Definition: stm32f3xx_hal_tsc.h:100
Struct containing calibration thresholds for each touchpad.
Definition: touchpad_driver.h:44
uint32_t pad4
Definition: touchpad_driver.h:48
uint32_t pad6
Definition: touchpad_driver.h:50
uint32_t pad7
Definition: touchpad_driver.h:51
uint32_t pad5
Definition: touchpad_driver.h:49
uint32_t pad11
Definition: touchpad_driver.h:55
uint32_t pad10
Definition: touchpad_driver.h:54
uint32_t pad3
Definition: touchpad_driver.h:47
uint32_t pad9
Definition: touchpad_driver.h:53
uint32_t pad1
Definition: touchpad_driver.h:45
uint32_t pad14
Definition: touchpad_driver.h:58
uint32_t pad2
Definition: touchpad_driver.h:46
uint32_t pad12
Definition: touchpad_driver.h:56
uint32_t pad13
Definition: touchpad_driver.h:57
uint32_t pad8
Definition: touchpad_driver.h:52