-
Notifications
You must be signed in to change notification settings - Fork 0
/
PeriphMaster.c
60 lines (46 loc) · 1.08 KB
/
PeriphMaster.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* \file PeriphMaster.c
* \brief application carteperiph
* \details this file is the main application it don't must any reference to any hardware
*/
#include <stdint.h>
#include "include/HAL.h" // Hardware abstraction layer
#include "include/globaletypedef.h"
#include "include/PeriphMaster.h"
#include "include/utility.h"
#include "include/init.h"
#include "include/pwm.h"
#include "include/isr.h" //driver of interruption
#include "include/protocole.h"
extern struct data system_data;
/**
* \brief main
*
* \return none
*
* \details Details
*/int main()
{
HAL_cli();
init();
pwm_init();
isr_init();
#ifdef __DEBUG__
set_color(0,0,255,255); //a priori 25ms d'execution
#endif // __DEBUG__
// launchCom();
HAL_sei();
while(1)
{
getRefresh();
#ifdef __DEBUG__
set_color(0,0,255,255); //a priori 25ms d'execution
#endif // __DEBUG__
compute();
setRefresh();
HALdelay_ms(100);
#ifdef __DEBUG__
set_color(255,0,0,255); //a priori 25ms d'execution
#endif // __DEBUG__
}
}