Standard functions, can be used in normal programm or ISR.
Get free space of fifo.
- Parameters
-
| *fifo | pointer to FIFO struct |
- Returns
- free space of FIFO in elements
Get fill level of FIFO.
- Parameters
-
| *fifo | pointer to FIFO struct |
- Returns
- fill level of FIFO in elements
Get number of elements for read access until pointer wrap around.
- Parameters
-
| *fifo | pointer to FIFO struct |
- Returns
- number of elements for read access until pointer wrap around
Get number of elements for write access until pointer wrap around.
- Parameters
-
| *fifo | pointer to FIFO struct |
- Returns
- number of elements for write access until pointer wrap around
FIFO initialization.
FIFO can hold only size-1 elements! One element is unused due to organization.
- Parameters
-
| *fifo | pointer to FIFO struct |
| *data | pointer to data buffer |
| size | size of data buffer in elements |
- Returns
- none
FIFO read access without check for available data.
- Parameters
-
| *fifo | pointer to FIFO struct |
- Returns
- read data
FIFO read pointer correction after burst read access.
- Parameters
-
| *fifo | pointer to FIFO struct |
| count | number of elements that have been read |
- Returns
- none
FIFO read access with busy waiting for available data (blocking function)
- Parameters
-
| *fifo | pointer to FIFO struct |
- Returns
- read data
FIFO write access without check for free space.
- Parameters
-
| *fifo | pointer to FIFO struct |
| data | write data |
- Returns
- none
FIFO write pointer correction after burst write access.
- Parameters
-
| *fifo | pointer to FIFO struct |
| count | number of elements that have been written |
- Returns
- none
FIFO write access with busy waiting for free space (blocking function)
- Parameters
-
| *fifo | pointer to FIFO struct |
| data | write data |
- Returns
- none