-
Notifications
You must be signed in to change notification settings - Fork 0
/
bsp.h
70 lines (52 loc) · 1.3 KB
/
bsp.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
/*
* Board Support Package (BSP.h)
* This file contains the prototypes needed for BSP.c
*/
#ifndef _BSP_H_
#define _BSP_H_
/* System Clock Tick [Hz] */
#define BSP_TICKS_PER_SEC 1000U
TickType_t tickDelay(const TickType_t delay);
/* Board Support Package */
void BSP_init(void);
void RTOS_init(void);
/* Stoplight 1 (S1) */
void redOnS1(void);
void yellowOnS1(void);
void greenOnS1(void);
void redOffS1(void);
void yellowOffS1(void);
void greenOffS1(void);
void redToggleS1(const TickType_t delay);
void yellowToggleS1(const TickType_t delay);
void greenToggleS1(const TickType_t delay);
void allOffS1(void);
void s1Task(void);
/* Stoplight 2 (S2) */
void redOnS2(void);
void yellowOnS2(void);
void greenOnS2(void);
void redOffS2(void);
void yellowOffS2(void);
void greenOffS2(void);
void redToggleS2(const TickType_t delay);
void yellowToggleS2(const TickType_t delay);
void greenToggleS2(const TickType_t delay);
void allOffS2(void);
void s2Task(void);
void allOffP(void);
/* Pedestrian 1 (PS1) */
void ps1On(void);
void ps1Off(void);
void ps1Task(void);
/* Pedestrian 2 (PS2) */
void ps2On(void);
void ps2Off(void);
void ps2Task(void);
/* Extern values */
extern int pCounter;
extern int sCounter;
extern TaskHandle_t xTaskS1;
extern TaskHandle_t xTaskS2;
extern TaskHandle_t xTaskPS;
#endif // _BSP_H_