STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
board.c
Go to the documentation of this file.
1#include "board.h"
2
3#include "main.h"
4
5static volatile bool soft_section;
6static volatile bool soft_failed;
7
9 if (!soft_section) {
10 return false;
11 }
12 soft_failed = true;
13 return true;
14}
15
16bool board_soft_init(void (*init)(void)) {
17 soft_failed = false;
18 soft_section = true;
19 init();
20 soft_section = false;
21 return !soft_failed;
22}
23
24uint32_t board_now_ms(void) {
25 return HAL_GetTick();
26}
uint32_t board_now_ms(void)
Definition board.c:24
static volatile bool soft_failed
Definition board.c:6
static volatile bool soft_section
Definition board.c:5
bool board_error_is_soft(void)
Definition board.c:8
bool board_soft_init(void(*init)(void))
Definition board.c:16
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.