-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_cfg.h
122 lines (99 loc) · 5.57 KB
/
app_cfg.h
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*
*********************************************************************************************************
* EXAMPLE CODE
*
* (c) Copyright 2009-2010; Micrium, Inc.; Weston, FL
*
* All rights reserved. Protected by international copyright laws.
* Knowledge of the source code may NOT be used to develop a similar product.
* Please help us continue to provide the Embedded community with the finest
* software available. Your honesty is greatly appreciated.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* APPLICATION CONFIGURATION
*
* Filename : app_cfg.h
* Version : V1.00
* Programmer(s) : JJL
* EHS
*********************************************************************************************************
*/
#ifndef __APP_CFG_H__
#define __APP_CFG_H__
/*
*********************************************************************************************************
* BSP CONFIGURATION
*********************************************************************************************************
*/
#define BSP_CFG_LED_SPI2_EN DEF_ENABLED /* Enable/disable LEDs on SPI port. */
#define BSP_CFG_LED_PIOC_EN DEF_ENABLED /* Enable/disable PIOC LEDs. */
/*
*********************************************************************************************************
* TASK PRIORITIES
*********************************************************************************************************
*/
#define APP_TASK_START_PRIO 1u
#define APP_MOTOR_RUN_PRIO 2u
#define APP_SENSOR_PRIO 3u
#define APP_TASK_LEFT_MOTOR_DRIVE_PRIO 2u
#define APP_TASK_RIGHT_MOTOR_DRIVE_PRIO 3u
#define APP_TASK_CONTROL_PRIO 4u
#define APP_TASK_INPUT_MONITOR_PRIO 5u
#define APP_TASK_ROBOT_CONTROL_PRIO 2u
#define APP_TASK_MOTOR_CONTROL_PRIO 3u
#define APP_TASK_TIMER_CONTROL_PRIO 4u
#define APP_TASK_LED_CONTROL_PRIO 6u
/*
*********************************************************************************************************
* TASK STACK SIZES
* Size of the task stacks (# of OS_STK entries)
*********************************************************************************************************
*/
#define APP_TASK_START_STK_SIZE 128u
#define APP_TASK_SECOND_STK_SIZE 128u
#define APP_MOTOR_RUN_STK_SIZE 128u
#define APP_SENSOR_STK_SIZE 128u
#define APP_TASK_LEFT_MOTOR_DRIVE_STK_SIZE 128u
#define APP_TASK_RIGHT_MOTOR_DRIVE_STK_SIZE 128u
#define APP_TASK_CONTROL_STK_SIZE 128u
#define APP_TASK_INPUT_MONITOR_STK_SIZE 128u
#define APP_TASK_ROBOT_CONTROL_STK_SIZE 128u
#define APP_TASK_MOTOR_CONTROL_STK_SIZE 128u
#define APP_TASK_TIMER_CONTROL_STK_SIZE 128u
#define APP_TASK_LED_CONTROL_STK_SIZE 128u
/*
*********************************************************************************************************
* uC/LIB CONFIGURATION
*********************************************************************************************************
*/
#include <lib_cfg.h>
/*
*********************************************************************************************************
* uC/Probe CONFIGURATION
*********************************************************************************************************
*/
#define APP_CFG_PROBE_OS_PLUGIN_EN DEF_ENABLED
#define APP_CFG_PROBE_COM_EN DEF_ENABLED
/*
*********************************************************************************************************
* BSP CONFIGURATION: RS-232
*********************************************************************************************************
*/
#define BSP_SER_COMM_EN DEF_ENABLED
#define BSP_CFG_SER_COMM_SEL BSP_SER_COMM_UART_02
#define BSP_CFG_TS_TMR_SEL 2
/*
*********************************************************************************************************
* TRACE / DEBUG CONFIGURATION
*********************************************************************************************************
*/
#define TRACE_LEVEL_OFF 0u
#define TRACE_LEVEL_INFO 1u
#define TRACE_LEVEL_DEBUG 2u
#define APP_TRACE_LEVEL TRACE_LEVEL_INFO
#define APP_TRACE BSP_Ser_Printf
#define APP_TRACE_INFO(x) ((APP_TRACE_LEVEL >= TRACE_LEVEL_INFO) ? (void)(APP_TRACE x) : (void)0)
#define APP_TRACE_DEBUG(x) ((APP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG) ? (void)(APP_TRACE x) : (void)0)
#endif