2024-09-20 12:15:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
2019-07-24 06:07:06 +08:00
|
|
|
// ******************** Prototypes ********************
|
2022-11-30 14:55:10 +08:00
|
|
|
void print(const char *a);
|
2019-07-24 06:07:06 +08:00
|
|
|
void puth(unsigned int i);
|
|
|
|
void puth2(unsigned int i);
|
2021-09-26 12:46:19 +08:00
|
|
|
void puth4(unsigned int i);
|
2022-11-10 10:46:20 +08:00
|
|
|
void hexdump(const void *a, int l);
|
2019-07-24 06:07:06 +08:00
|
|
|
typedef struct board board;
|
|
|
|
typedef struct harness_configuration harness_configuration;
|
2021-07-14 05:12:07 +08:00
|
|
|
void pwm_init(TIM_TypeDef *TIM, uint8_t channel);
|
|
|
|
void pwm_set(TIM_TypeDef *TIM, uint8_t channel, uint8_t percentage);
|
2019-07-24 06:07:06 +08:00
|
|
|
|
|
|
|
// ********************* Globals **********************
|
2024-09-20 12:15:08 +08:00
|
|
|
extern uint8_t hw_type;
|
|
|
|
extern board *current_board;
|
|
|
|
extern uint32_t uptime_cnt;
|
|
|
|
extern bool green_led_enabled;
|
2021-09-08 06:19:42 +08:00
|
|
|
|
|
|
|
// heartbeat state
|
2024-09-20 12:15:08 +08:00
|
|
|
extern uint32_t heartbeat_counter;
|
|
|
|
extern bool heartbeat_lost;
|
|
|
|
extern bool heartbeat_disabled; // set over USB
|
2021-09-08 06:19:42 +08:00
|
|
|
|
|
|
|
// siren state
|
2024-09-20 12:15:08 +08:00
|
|
|
extern bool siren_enabled;
|