thread to manage driver-facing LCD, buttons, LEDs
More...
#include "driver_interface.h"
#include "fault_library/faults_common.h"
#include "can_library/generated/DASHBOARD.h"
#include "can_library/generated/can_types.h"
#include "rtos/rtos.h"
#include "heartbeat/heartbeat.h"
#include "phal_G4/exti/exti.h"
#include "phal_G4/gpio/gpio.h"
#include "watchdog/watchdog.h"
#include "utils/countof.h"
#include "lap_timer.h"
#include "lcd.h"
#include "main.h"
#include "pages/vcu.h"
thread to manage driver-facing LCD, buttons, LEDs
- Author
- Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
◆ ACTION_QUEUE_LENGTH
| #define ACTION_QUEUE_LENGTH (10) |
◆ action_dispatcher()
| void action_dispatcher |
( |
void | | ) |
|
◆ driver_interface_periodic()
| void driver_interface_periodic |
( |
void | | ) |
|
◆ enqueue_button_action()
◆ HardFault_Handler()
| void HardFault_Handler |
( |
void | | ) |
|
|
extern |
◆ init_buttons()
| static void init_buttons |
( |
void | | ) |
|
|
static |
◆ PHAL_EXTI_callback()
| void PHAL_EXTI_callback |
( |
GPIO_TypeDef * | bank, |
|
|
uint8_t | pin ) |
Weak callback invoked for each pending GPIO EXTI line.
Called from an EXTI interrupt handler. Keep overrides short and non-blocking. For both-edge triggers, sample the GPIO input to determine its current level. The default implementation does nothing.
- Parameters
-
| bank | GPIO port that generated the interrupt |
| pin | Pin number, 0-15 |
◆ RTOS_DEFINE_QUEUE()
◆ set_external_leds()
| void set_external_leds |
( |
void | | ) |
|
◆ button_exti_config
Initial value:= {
}
#define TV1_MINUS_PIN
Definition main.h:87
#define START_BUTTON_PORT
Definition main.h:58
#define LEFT_BUTTON_PIN
Definition main.h:53
#define MARK_DATA_PORT
Definition main.h:78
#define SELECT_BUTTON_PIN
Definition main.h:57
#define LEFT_BUTTON_PORT
Definition main.h:52
#define DOWN_BUTTON_PORT
Definition main.h:50
#define DOWN_BUTTON_PIN
Definition main.h:51
#define SELECT_BUTTON_PORT
Definition main.h:56
#define UP_BUTTON_PORT
Definition main.h:48
#define TV1_MINUS_PORT
Definition main.h:86
#define LAP_SET_PORT
Definition main.h:84
#define REGEN_TOGGLE_PORT
Definition main.h:76
#define REGEN_TOGGLE_PIN
Definition main.h:77
#define LAP_SET_PIN
Definition main.h:85
#define RIGHT_BUTTON_PORT
Definition main.h:54
#define EBB_PLUS_PIN
Definition main.h:83
#define EBB_MINUS_PIN
Definition main.h:81
#define EBB_PLUS_PORT
Definition main.h:82
#define RIGHT_BUTTON_PIN
Definition main.h:55
#define EBB_MINUS_PORT
Definition main.h:80
#define START_BUTTON_PIN
Definition main.h:59
#define MARK_DATA_PIN
Definition main.h:79
#define UP_BUTTON_PIN
Definition main.h:49
static constexpr uint32_t BUTTON_EXTI_IRQ_PRIORITY
Definition driver_interface.c:35
@ PHAL_EXTI_TRIGGER_FALLING
Definition exti.h:19
◆ BUTTON_EXTI_IRQ_PRIORITY
| uint32_t BUTTON_EXTI_IRQ_PRIORITY = 7U |
|
staticconstexpr |
◆ data_mark_index
| volatile uint16_t data_mark_index = 0 |
◆ di_state
◆ INTERRUPT_DEBOUNCE_MS
| uint32_t INTERRUPT_DEBOUNCE_MS = 150 |
|
staticconstexpr |
◆ next_di_state
◆ status_leds