|
SNAKE_STM32F3
|
Joystick handling module based on ADC (STM32 HAL). More...


Go to the source code of this file.
Functions | |
| void | joystick_init (ADC_HandleTypeDef *adc_handler) |
| Initializes joystick handling by passing given ADC handler and starting ADC. | |
| vec2_t | joystick_read (void) |
| Reads current joystick position from ADC. | |
| bool | joystick_check_tilt (void) |
| Checks if joystick is tilted past the defined dead zone. | |
| direction_t | joystick_get_direction (void) |
| interprets current joystick state as one of 4 directions or NONE. | |
Joystick handling module based on ADC (STM32 HAL).
SPDX-License-Identifier: MIT
| bool joystick_check_tilt | ( | void | ) |
Checks if joystick is tilted past the defined dead zone.

| direction_t joystick_get_direction | ( | void | ) |
interprets current joystick state as one of 4 directions or NONE.

| void joystick_init | ( | ADC_HandleTypeDef * | adc_handler | ) |
Initializes joystick handling by passing given ADC handler and starting ADC.
| adc_handler | pointer to ADC handler of choice. |