-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
82 lines (64 loc) · 1.7 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
81
82
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "osi.h"
/* DRIVERLIB INCLUDES */
#include "hw_memmap.h"
#include "hw_common_reg.h"
#include "hw_types.h"
#include "hw_ints.h"
#include "interrupt.h"
#include "prcm.h"
#include "rom.h"
#include "rom_map.h"
#include "uart.h"
#include "utils.h"
#include "systick.h"
#include "pin.h"
#include "simplelink.h"
#ifndef NOTERM
#include "uart_if.h"
#endif
#include "udma_if.h"
#include "common.h"
#include "pinmux.h"
#include "mode.h"
//*****************************************************************************
// MACRO DEFINITIONS
//*****************************************************************************
#define SPAWN_TASK_PRIORITY 9
#define MAX_MSG_LENGTH 16
#define FACE_RECOGNITION_TASK_NAME "FaceRecognitionTask"
#define FACE_RECOGNITION_TASK_STACK_SIZE 8192
#define FACE_RECOGNITION_TASK_PRIORITY 2
/* Prototypes */
static void InitializeBoard();
// The queue used to send strings to the task1.
OsiMsgQ_t MsgQ;
/* We are using this for FREERTOS */
extern void (* const g_pfnVectors[])(void);
// EFFECTS: Initializes the board.
static void InitializeBoard()
{
MAP_IntVTableBaseSet((unsigned long)&g_pfnVectors[0]);
// Enable Processor
MAP_IntMasterEnable();
MAP_IntEnable(FAULT_SYSTICK);
PRCMCC3200MCUInit();
}
int main()
{
InitializeBoard();
// Start the SimpleLink Host
long lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);
if(lRetVal < 0)
{
ERR_PRINT(lRetVal);
LOOP_FOREVER();
}
osi_TaskCreate(FaceRecognitionMode, FACE_RECOGNITION_TASK_NAME, FACE_RECOGNITION_TASK_STACK_SIZE,
NULL, FACE_RECOGNITION_TASK_PRIORITY, NULL);
// Start the task scheduler
osi_start();
return 0;
}