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
13
typedef
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
;
31
extern
car_t
g_car;
32
33
typedef
struct
{
34
int16_t front_right;
35
int16_t front_left;
36
int16_t rear_left;
37
int16_t rear_right;
38
}
torque_request_t
;
39
extern
torque_request_t
g_torque_request;
40
41
void
fsm_periodic();
42
void
car_init();
43
void
update_SDC();
44
45
#endif
// MAIN_H
amk.h
Modernized AMK driver.
AMK_t
Definition
amk.h:24
car_t
Definition
main.h:13
torque_request_t
Definition
main.h:33
source
main_module
main.h
Generated by
1.12.0