MSPM0_ValvanoWare
1.0
ECE445L starter code
inc
FIFO1.h
1
// FIFO1.h
2
// Runs on any microcontroller
3
// Provide functions that implement the Software FiFo Buffer
4
// Last Modified: 10/29/2023
5
// Student names: change this to your names or look very silly
6
// Last modification date: change this to the last modification date or look very silly
7
8
#include <stdint.h>
9
10
// *********** Fifo1_Init**********
11
// Initializes a software FIFO1 of a
12
// fixed size and sets up indexes for
13
// put and get operations
14
void
Fifo1_Init(
void
);
15
16
// *********** Fifo1_Put**********
17
// Adds an element to the FIFO1
18
// Input: data is character to be inserted
19
// Output: 1 for success, data properly saved
20
// 0 for failure, FIFO1 is full
21
uint32_t Fifo1_Put(
char
data);
22
23
// *********** Fifo1_Get**********
24
// Gets an element from the FIFO1
25
// Input: none
26
// Output: If the FIFO1 is empty return 0
27
// If the FIFO1 has data, remove it, and return it
28
char
Fifo1_Get(
void
);
Generated by
1.9.1