-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.c
80 lines (66 loc) · 1.61 KB
/
main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* Software for Monarch chipsat
* V. Hunter Adams
*/
/* TI-RTOS Header files */
#include <xdc/std.h>
#include <unistd.h>
#include <stdlib.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Error.h>
/* Power header files */
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26XX.h>
/* BIOS Header files */
#include <ti/sysbios/BIOS.h>
/* Peripherals */
#include <Peripherals/Clock_Initialization.h>
#include <Peripherals/Pin_Initialization.h>
#include <Peripherals/Watchdog_Initialization.h>
#include <Peripherals/ADC_Initialization.h>
#include <Peripherals/Display_Initialization.h>
#include <Peripherals/PWM_Initialization.h>
/* Board Header file */
#include "Board.h"
/* Tasks */
#include "Tasks/GPS_Task.h"
#include "Tasks/Radio/RF_RX_Tasks.h"
#include "Tasks/Radio/RF_TX_Tasks.h"
#include "Tasks/IMU/IMU_Tasks.h"
#include <Tasks/Semaphore_Initialization.h>
#include <Tasks/Shared_Resources.h>
#include <Tasks/ADC_Tasks.h>
#include <Tasks/PWM_Tasks.h>
/*
* ======== main ========
*
*/
int main(void)
{
/* Initialize TI drivers */
Board_initGeneral();
PIN_init(pinTable);
PWM_init();
pwmSetup();
/* Use one or the other of the below. If using GPS, need UART */
Display_init();
displaySetup();
/* Setup peripherals and semaphores */
wdtSetup();
clockSetup();
semaphoreSetup();
pinSetup();
/* Construct tasks */
createMagTask();
createGyroTask();
createAccelTask();
// createGPSTask();
createADCTask();
createRFRXTasks();
createRFTXTasks();
createPWMTask();
/* Start kernel. */
BIOS_start();
return (0);
}