PER Firmware
Loading...
Searching...
No Matches
main.h
Go to the documentation of this file.
1#ifndef MAIN_H
2#define MAIN_H
3
11#include "common/amk/amk.h"
12
13typedef struct {
14 car_state_t current_state;
15 car_state_t next_state;
16 AMK_t front_right; // INVA
17 AMK_t front_left; // INVB
18 AMK_t rear_left; // INVC
19 AMK_t rear_right; // INVD
20
21 // internal state variables
22 uint32_t buzzer_start_time;
23 bool last_start_button_state;
24 bool brake_light;
25 bool tsal_green_enable;
26 bool tsal_red_enable;
27 bool buzzer_enable;
28
29 bool is_precharge_complete; // AMKs are pointed to this variable
30} car_t;
31extern car_t g_car;
32
33typedef struct {
34 int16_t front_right;
35 int16_t front_left;
36 int16_t rear_left;
37 int16_t rear_right;
39extern torque_request_t g_torque_request;
40
41void fsm_periodic();
42void car_init();
43void update_SDC();
44
45#endif // MAIN_H
Modernized AMK driver.
Definition amk.h:24
Definition main.h:13
Definition main.h:33