EVE's mediafifo controller. More...
#include "EVE_HalDefs.h"
Go to the source code of this file.
Functions | |
EVE_HAL_EXPORT bool | EVE_MediaFifo_set (EVE_HalContext *phost, uint32_t address, uint32_t size) |
Set the media FIFO. | |
EVE_HAL_EXPORT void | EVE_MediaFifo_close (EVE_HalContext *phost) |
EVE_HAL_EXPORT uint32_t | EVE_MediaFifo_rp (EVE_HalContext *phost) |
Get the current read pointer. | |
EVE_HAL_EXPORT uint32_t | EVE_MediaFifo_wp (EVE_HalContext *phost) |
Get the current write pointer. | |
EVE_HAL_EXPORT uint32_t | EVE_MediaFifo_space (EVE_HalContext *phost) |
Get the currently available space. | |
EVE_HAL_EXPORT bool | EVE_MediaFifo_wrMem (EVE_HalContext *phost, const uint8_t *buffer, uint32_t size, uint32_t *transfered) |
Write a buffer to the media FIFO. Waits if there is not enough space in the media FIFO. | |
EVE_HAL_EXPORT bool | EVE_MediaFifo_waitFlush (EVE_HalContext *phost, bool orCmdFlush) |
Wait for the media FIFO to fully empty. | |
EVE_HAL_EXPORT uint32_t | EVE_MediaFifo_waitSpace (EVE_HalContext *phost, uint32_t size, bool orCmdFlush) |
Wait for the media FIFO to have at least the requested amount of free space. | |
EVE's mediafifo controller.
This file defines the generic APIs of phost access layer for the FT800 or EVE compatible silicon. Application shall access FT800 or EVE resources over these APIs,regardless of I2C or SPI protocol. In addition, there are some helper functions defined for FT800 coprocessor engine as well as phost commands.
MIT License
Copyright (c) [2019] [Bridgetek Pte Ltd (BRTChip)]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file EVE_MediaFifo.h.
EVE_HAL_EXPORT void EVE_MediaFifo_close | ( | EVE_HalContext * | phost | ) |
Closes the current media FIFO. Indication for HAL only
Definition at line 87 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT uint32_t EVE_MediaFifo_rp | ( | EVE_HalContext * | phost | ) |
Get the current read pointer.
Get the current read pointer.
phost | Pointer to Hal context |
Definition at line 99 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT bool EVE_MediaFifo_set | ( | EVE_HalContext * | phost, |
uint32_t | address, | ||
uint32_t | size | ||
) |
Set the media FIFO.
Set the media FIFO. Returns false in case a coprocessor fault occurred
phost | Pointer to Hal context |
address | |
size |
Definition at line 45 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT uint32_t EVE_MediaFifo_space | ( | EVE_HalContext * | phost | ) |
Get the currently available space.
Get the currently available space.
phost | Pointer to Hal context |
Definition at line 121 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT bool EVE_MediaFifo_waitFlush | ( | EVE_HalContext * | phost, |
bool | orCmdFlush | ||
) |
Wait for the media FIFO to fully empty.
Wait for the media FIFO to fully empty. When checking if a file is fully processed, EVE_Cmd_waitFlush must be called. Returns false in case a coprocessor fault occurred, or in case the coprocessor is done processing
phost | Pointer to Hal context |
orCmdFlush |
Definition at line 365 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT uint32_t EVE_MediaFifo_waitSpace | ( | EVE_HalContext * | phost, |
uint32_t | size, | ||
bool | orCmdFlush | ||
) |
Wait for the media FIFO to have at least the requested amount of free space.
Wait for the media FIFO to have at least the requested amount of free space. Returns 0 in case a coprocessor fault occurred, or in case the coprocessor is done processing
phost | Pointer to Hal context |
size | |
orCmdFlush |
Definition at line 378 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT uint32_t EVE_MediaFifo_wp | ( | EVE_HalContext * | phost | ) |
Get the current write pointer.
Get the current write pointer.
phost | Pointer to Hal context |
Definition at line 110 of file EVE_MediaFifo.c.
EVE_HAL_EXPORT bool EVE_MediaFifo_wrMem | ( | EVE_HalContext * | phost, |
const uint8_t * | buffer, | ||
uint32_t | size, | ||
uint32_t * | transfered | ||
) |
Write a buffer to the media FIFO. Waits if there is not enough space in the media FIFO.
Write a buffer to the media FIFO. Waits if there is not enough space in the media FIFO. Returns false in case a coprocessor fault occurred. If the transfered pointer is set, the write may exit early if the coprocessor function has finished, and the transfered amount will be set.
phost | Pointer to Hal context |
buffer | |
size | |
transfered |
Definition at line 151 of file EVE_MediaFifo.c.