modules.h 1.39 KB
Newer Older
1
2
3
#ifndef MODULES_H
#define MODULES_H

4
5
6
#include "FreeRTOS.h"
#include "semphr.h"

schneider's avatar
schneider committed
7
#include <stdint.h>
8
#include <stdbool.h>
9

10
11
12
13
14
/* ---------- Dispatcher --------------------------------------------------- */
void vApiDispatcher(void *pvParameters);
extern SemaphoreHandle_t api_mutex;
extern TaskHandle_t dispatcher_task_id;

15
16
17
18
19
/* ---------- Hardware Init & Reset ---------------------------------------- */
int hardware_early_init(void);
int hardware_init(void);
int hardware_reset(void);

Rahix's avatar
Rahix committed
20
21
22
23
/* ---------- Lifecycle ---------------------------------------------------- */
void vLifecycleTask(void *pvParameters);
void return_to_menu(void);

24
25
26
/* ---------- Serial ------------------------------------------------------- */
#define SERIAL_READ_BUFFER_SIZE 128
void vSerialTask(void *pvParameters);
27
28
void serial_enqueue_char(char chr);

29
/* ---------- PMIC --------------------------------------------------------- */
30
31
32
/* In 1/10s */
#define PMIC_PRESS_SLEEP           20
#define PMIC_PRESS_POWEROFF        40
33
34
void vPmicTask(void *pvParameters);

35
/* ---------- BLE ---------------------------------------------------------- */
36
void vBleTask(void *pvParameters);
37
bool ble_shall_start(void);
38
39
void ble_uart_write(uint8_t *pValue, uint8_t len);

Rahix's avatar
Rahix committed
40
41
/* ---------- Display ------------------------------------------------------ */
/* Forces an unlock of the display. Only to be used in Epicardium */
Gerd's avatar
Gerd committed
42
void disp_forcelock();
43

44
#endif /* MODULES_H */