forked from johncobb/avr_328p_freertos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
47 lines (35 loc) · 1.13 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
/*
* main.c
*
* Created on: Feb 4, 2015
* Author: jcobb
*/
#include <stdlib.h>
#include <stdint.h>
#include <avr/io.h>
#include "FreeRTOS.h"
#include <apptools.h>
#include "task.h"
#include "usart.h"
#include "imu.h"
//#define mainLED_TASK_PRIORITY (tskIDLE_PRIORITY)
#define mainLED_TASK_PRIORITY (tskIDLE_PRIORITY+2)
#define mainUSART_TASK_PRIORITY (tskIDLE_PRIORITY+1)
#define mainULTRASONIC_TASK_PRIORITY (tskIDLE_PRIORITY+3)
// #define mainNEXT_TASK_3 (tskIDLE_PRIORITY+3)
void init(void);
void vApplicationIdleHook( void );
portSHORT main(void)
{
vUSARTInit();
xTaskCreate(vLEDFlashTask, (int8_t*) "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL);
//xTaskCreate(vUltraSonicTask, (int8_t*) "SR04_1", configMINIMAL_STACK_SIZE, NULL, mainULTRASONIC_TASK_PRIORITY, NULL);
//xTaskCreate(vUltraSonicTask, (int8_t*) "SR04_2", configMINIMAL_STACK_SIZE, NULL, mainULTRASONIC_TASK_PRIORITY, NULL);
xTaskCreate(vIMUTask, (int8_t*) "USART", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL);
vTaskStartScheduler();
return 0;
}
void vApplicationIdleHook( void )
{
//vCoRoutineSchedule();
}