firmware-nucleo/App/Inc/app.h (909B)
1 /* 2 * Copyright (c) 2023 Juan Manuel Cruz <jcruz@fi.uba.ar> <jcruz@frba.utn.edu.ar>. 3 * Copyright (c) 2026 Martin Javier Klöckner <mklockner@fi.uba.ar> 4 * 5 * See file `LICENSE` for full details 6 */ 7 8 #ifndef APP_INC_APP_H_ 9 #define APP_INC_APP_H_ 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #include <stdbool.h> 16 17 extern uint32_t g_app_runtime_us; 18 extern uint32_t g_app_WCET_us; 19 extern volatile uint32_t g_app_tick_cnt; 20 21 typedef struct { 22 uint8_t start_hour, start_min; 23 uint8_t end_hour, end_min; 24 bool enabled; 25 } task_system_timer_t; 26 27 typedef struct { 28 int16_t temp_set_point; // Desired temp 29 int16_t temp_sensor; // Actual temp 30 uint8_t temp_ctrl_pwm_dc; // Duty cycle of output [0, 100] 31 bool temp_ctrl_enabled; 32 task_system_timer_t *timer; 33 } shared_data_type; 34 35 extern void app_init(void); 36 extern void app_update(void); 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* APP_INC_APP_H_ */
