FreeRTOS C-Addons  1.1.0
C-Addon functionality to FreeRTOS
Functions
stack_simple.c File Reference
#include <stdlib.h>
#include "stack_simple.h"
Include dependency graph for stack_simple.c:

Go to the source code of this file.

Functions

void InitStack (Stack_t *Stack)
 
void PushOnStack (Stack_t *Stack, SlNode_t *Node)
 
SlNode_tPopOffStack (Stack_t *Stack)
 

Function Documentation

◆ InitStack()

void InitStack ( Stack_t Stack)

Initialize a Stack structure you provide.

Parameters
StackPointer to your stack structure.

Definition at line 44 of file stack_simple.c.

◆ PopOffStack()

SlNode_t* PopOffStack ( Stack_t Stack)

Pop an item off the stack.

Note that you have to have embedded an SListNode inside your data structure.

Parameters
StackPointer to your stack structure.
Returns
An SListNode from the stack, or NULL if it's empty.

Definition at line 65 of file stack_simple.c.

◆ PushOnStack()

void PushOnStack ( Stack_t Stack,
SlNode_t Node 
)

Push an item onto the stack.

Note that you have to have embedded an SListNode inside your data structure.

Parameters
StackPointer to your stack structure.
NodeThe SListNode you want on the stack.

Definition at line 51 of file stack_simple.c.