Ringbuffer.h
Go to the documentation of this file.
#ifndef _RINGBUFFER_H
#define _RINGBUFFER_H
#include <stdint.h>
#define SIZEELEMENTSRINGBUFFER 10U
#define RINGBUFFER_OKAY 0
#define RINGBUFFER_FULL -1
#define RINGBUFFER_EMPTY -2
#define RINGBUFFER_ERROR -3
struct Ringbuffer
{
int32_t as32Buffer[SIZEELEMENTSRINGBUFFER];
uint32_t u32SetPos;
uint32_t u32ReadPos;
//uint32_t u32NumberElements;
};
typedef struct Ringbuffer sRingbuffer_t;
typedef sRingbuffer_t* psRingbuffer_t;
void vRingbufferInit (psRingbuffer_t const _self);
int32_t s32RingbufferSet (psRingbuffer_t const _self, int32_t const * const pcs32Data);
int32_t s32RingbufferGet (psRingbuffer_t const _self, int32_t * constpcs32Data);
#endif /* _RINGBUFFER_H */
main
int main(void)
app entry point
Definition: Main.c:47
BUTTON_T6
#define BUTTON_T6
Definition: AppBoard2Buttons.h:29
BUTTON_T3
#define BUTTON_T3
Definition: AppBoard2Buttons.h:26
vRingbufferInit
void vRingbufferInit(psRingbuffer_t const _self)
init Ringbuffer
Definition: Ringbuffer.c:21
psRingbuffer_t
sRingbuffer_t * psRingbuffer_t
Definition: Ringbuffer.h:31
Thread_FsmTape
void Thread_FsmTape(void)
run FSM for Tape
Definition: Threads.c:55
Thread_Stack_Read_Buttons
uint32_t Thread_Stack_Read_Buttons[stack_size_Thread_Read_Buttons]
Anlegen des 3. Stackframes.
Definition: Main.c:34
s32RingbufferSet
int32_t s32RingbufferSet(psRingbuffer_t const _self, int32_t const *const pcs32Data)
Write data in ringbuffer.
Definition: Ringbuffer.c:38
SIZEELEMENTSRINGBUFFER
#define SIZEELEMENTSRINGBUFFER
Definition: Ringbuffer.h:15
Ringbuffer
Definition: Ringbuffer.h:23
rbVCR
sRingbuffer_t rbVCR
Definition: Globals.c:13
stack_size_Thread_FsmTape
#define stack_size_Thread_FsmTape
Stackgröße von Thread_FsmTape.
Definition: Main.c:17
Ringbuffer::as32Buffer
int32_t as32Buffer[SIZEELEMENTSRINGBUFFER]
Definition: Ringbuffer.h:24
BUTTON_T7
#define BUTTON_T7
Definition: AppBoard2Buttons.h:30
GLCD_Font_16x24
GLCD_FONT GLCD_Font_16x24
rbTape
sRingbuffer_t rbTape
Definition: Globals.c:14
vAppboard2ButtonsInitialize
void vAppboard2ButtonsInitialize(void)
Initialization of all buttons of Application Board 2.
Definition: AppBoard2Buttons.c:35
BUTTON_T5
#define BUTTON_T5
Definition: AppBoard2Buttons.h:28
vMainInitTimer
static void vMainInitTimer(void)
initialize timer0
Definition: Main.c:109
Ringbuffer::u32SetPos
uint32_t u32SetPos
Definition: Ringbuffer.h:25
Thread_struct
Definition: HeiOS_Thread.h:36
s32RingbufferSet
int32_t s32RingbufferSet(psRingbuffer_t const _self, int32_t const *const pcs32Data)
Write data in ringbuffer.
Definition: Ringbuffer.c:38
s32RingbufferGet
int32_t s32RingbufferGet(psRingbuffer_t const _self, int32_t *constpcs32Data)
Read data in ringbuffer.
Definition: Ringbuffer.c:66
ES2_V3_app.h
RINGBUFFER_FULL
#define RINGBUFFER_FULL
Definition: Ringbuffer.h:18
Ringbuffer::u32ReadPos
uint32_t u32ReadPos
Definition: Ringbuffer.h:26
Thread_Stack_FsmTape
uint32_t Thread_Stack_FsmTape[stack_size_Thread_FsmTape]
Anlegen des 2. Stackframes.
Definition: Main.c:32
s32RingbufferGet
int32_t s32RingbufferGet(psRingbuffer_t const _self, int32_t *constpcs32Data)
Read data in ringbuffer.
Definition: Ringbuffer.c:66
Thread_init
void Thread_init(Thread_t *Thread, void *stack, uint32_t stack_size, char name[], void(*pfunc)(), uint32_t executiontime, uint8_t priority)
Diese Funktion initialisert einen Thread und fügt ihn der Ready-Liste hinzu.
Definition: HeiOS_Thread.c:51
Thread_FsmVCR
void Thread_FsmVCR(void)
run FSM for VCR
Definition: Threads.c:19
RINGBUFFER_OKAY
#define RINGBUFFER_OKAY
Definition: Ringbuffer.h:17
BUTTON_T4
#define BUTTON_T4
Definition: AppBoard2Buttons.h:27
BUTTON_T2
#define BUTTON_T2
Definition: AppBoard2Buttons.h:25
stack_size_Thread_Read_Buttons
#define stack_size_Thread_Read_Buttons
Stackgröße von Thread_Read_Buttons.
Definition: Main.c:20
RINGBUFFER_ERROR
#define RINGBUFFER_ERROR
Definition: Ringbuffer.h:20
vMainInitApp
static void vMainInitApp(void)
initialize app
Definition: Main.c:71
u32AppBoard2ButtonsGetState
uint32_t u32AppBoard2ButtonsGetState(void)
Returns the pressed Buttons (bit coded see AppBoard2Buttons.h)
Definition: AppBoard2Buttons.c:85
Thread_t_FsmVCR
Thread_t Thread_t_FsmVCR
Def. 1. Thread-Objekt for FSM VCR.
Definition: Main.c:23
BUTTON_T1
#define BUTTON_T1
Definition: AppBoard2Buttons.h:24
BUTTON_T0
#define BUTTON_T0
Definition: AppBoard2Buttons.h:23
bFsmTapeInitialize
_Bool bFsmTapeInitialize(void)
init Tape FSM
Definition: FsmTape.c:55
Ringbuffer.h
Ringbuffer.
RINGBUFFER_EMPTY
#define RINGBUFFER_EMPTY
Definition: Ringbuffer.h:19
stack_size_Thread_FsmVCR
#define stack_size_Thread_FsmVCR
Stackgröße von Thread_FsmVCR.
Definition: Main.c:14
bFsmVCRInitialize
_Bool bFsmVCRInitialize(void)
init VCR FSM
Definition: FsmVCR.c:87
Thread_t_Read_Buttons
Thread_t Thread_t_Read_Buttons
Def. 3. Thread-Objekt for reading Buttons.
Definition: Main.c:27
TIMER0_IRQHandler
void TIMER0_IRQHandler(void)
ISR of timer0, called every 20 millisecond.
Definition: Interrupt.c:21
Thread_Stack_FsmVCR
uint32_t Thread_Stack_FsmVCR[stack_size_Thread_FsmVCR]
Anlegen des 1. Stackframes.
Definition: Main.c:30
vRingbufferInit
void vRingbufferInit(psRingbuffer_t const _self)
init Ringbuffer
Definition: Ringbuffer.c:21
OS_Start_Scheduler
void OS_Start_Scheduler(void)
Diese Funktion initialisiert das OS und sorgt anschließend für den Wechsel in den Idlethread.
Definition: HeiOS_Thread.c:513
Thread_t_FsmTape
Thread_t Thread_t_FsmTape
Def. 2. Thread-Objekt for FSM Tape.
Definition: Main.c:25