-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththreads.h
59 lines (40 loc) · 1.94 KB
/
threads.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
// threads.h
// Date Created: 2023-07-26
// Date Updated: 2023-07-26
// Threads
#ifndef THREADS_H_
#define THREADS_H_
/************************************Includes***************************************/
#include "./G8RTOS/G8RTOS.h"
/************************************Includes***************************************/
/*************************************Defines***************************************/
// Did not need FIFO in this project
// #define BUTTONS_FIFO 0
// #define JOYSTICK_FIFO 1
// #define FREQ1_FIFO 2
// #define FREQ2_FIFO 3
// #define DISPLAY_FIFO 4
// #define MIC_DAC_FIFO 5
/*************************************Defines***************************************/
/***********************************Semaphores**************************************/
semaphore_t sem_UART;
semaphore_t sem_I2CA;
semaphore_t sem_SPIA;
semaphore_t sem_PCA9555_Debounce;
/***********************************Semaphores**************************************/
/***********************************Structures**************************************/
/***********************************Structures**************************************/
void Draw_Sprite(const uint32_t *sprite, uint8_t pos_x, uint8_t pos_y, uint16_t color, uint8_t size);
/*******************************Background Threads**********************************/
void Idle_Thread(void);
void Read_Buttons(void);
/*******************************Background Threads**********************************/
/********************************Periodic Threads***********************************/
void Display_Thread(void);
void Clock_Thread(void);
/********************************Periodic Threads***********************************/
/*******************************Aperiodic Threads***********************************/
void Button_Handler(void);
void DAC_Timer_Handler(void);
/*******************************Aperiodic Threads***********************************/
#endif /* THREADS_H_ */