EVE's command read/write. More...
Go to the source code of this file.
Functions | |
static void | endFunc (EVE_HalContext *phost) |
End read/write to Coprocessor. | |
EVE_HAL_EXPORT uint16_t | EVE_Cmd_rp (EVE_HalContext *phost) |
Read from Coprocessor. | |
EVE_HAL_EXPORT uint16_t | EVE_Cmd_wp (EVE_HalContext *phost) |
Write to Coprocessor. | |
EVE_HAL_EXPORT uint16_t | EVE_Cmd_space (EVE_HalContext *phost) |
Get free space of Coprocessor's command buffer. | |
static void | startBufferTransfer (EVE_HalContext *phost) |
Start transfer data to EVE. | |
static uint32_t | wrString (EVE_HalContext *phost, const void *buffer, uint32_t *size, uint32_t transfered, uint32_t transfer) |
Write string to Coprocessor's comand fifo. | |
static uint32_t | wrBuffer (EVE_HalContext *phost, const void *buffer, uint32_t size, bool progmem, bool string) |
Write buffer to Coprocessor's comand fifo. | |
EVE_HAL_EXPORT void | EVE_Cmd_startFunc (EVE_HalContext *phost) |
Begin writing a function, keeps the transfer open. | |
EVE_HAL_EXPORT void | EVE_Cmd_endFunc (EVE_HalContext *phost) |
End writing a function, closes the transfer. | |
EVE_HAL_EXPORT bool | EVE_Cmd_wrMem (EVE_HalContext *phost, const uint8_t *buffer, uint32_t size) |
Write buffer to Coprocessor's comand fifo. | |
EVE_HAL_EXPORT bool | EVE_Cmd_wrProgMem (EVE_HalContext *phost, eve_progmem_const uint8_t *buffer, uint32_t size) |
Write buffer in ProgMem to Coprocessor's comand fifo. | |
EVE_HAL_EXPORT uint32_t | EVE_Cmd_wrString (EVE_HalContext *phost, const char *str, uint32_t maxLength) |
Write a string into Coprocessor's command fifo. | |
EVE_HAL_EXPORT bool | EVE_Cmd_wr8 (EVE_HalContext *phost, uint8_t value) |
Write a byte to Coprocessor's command fifo. | |
EVE_HAL_EXPORT bool | EVE_Cmd_wr16 (EVE_HalContext *phost, uint16_t value) |
Write 2 bytes to Coprocessor's command fifo. | |
EVE_HAL_EXPORT bool | EVE_Cmd_wr32 (EVE_HalContext *phost, uint32_t value) |
Write 4 bytes to Coprocessor's command fifo. | |
EVE_HAL_EXPORT uint16_t | EVE_Cmd_moveWp (EVE_HalContext *phost, uint16_t bytes) |
Move the write pointer forward by the specified number of bytes. Returns the previous write pointer. | |
void | debugBackupRamG (EVE_HalContext *phost) |
Backup the last 128 bytes of RAM_G, which may be used for an error message. | |
static bool | checkWait (EVE_HalContext *phost, uint16_t rpOrSpace) |
Check for coprocessor fault. | |
static bool | handleWait (EVE_HalContext *phost, uint16_t rpOrSpace) |
Wait handler. | |
EVE_HAL_EXPORT bool | EVE_Cmd_waitFlush (EVE_HalContext *phost) |
Wait till Command FIFO buffer empty. | |
EVE_HAL_EXPORT uint32_t | EVE_Cmd_waitSpace (EVE_HalContext *phost, uint32_t size) |
EVE_HAL_EXPORT bool | EVE_Cmd_waitLogo (EVE_HalContext *phost) |
Wait until Coprocessor finished logo animation. | |
EVE_HAL_EXPORT bool | EVE_Cmd_waitRead32 (EVE_HalContext *phost, uint32_t ptr, uint32_t value) |
EVE_HAL_EXPORT void | EVE_Cmd_restore (EVE_HalContext *phost) |
EVE's command read/write.
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_Cmd.c.
|
static |
Check for coprocessor fault.
phost | Pointer to Hal context |
rpOrSpace | Read pointer or space |
Definition at line 481 of file EVE_Cmd.c.
void debugBackupRamG | ( | EVE_HalContext * | phost | ) |
Backup the last 128 bytes of RAM_G, which may be used for an error message.
phost | Pointer to Hal context |
Definition at line 1722 of file EVE_Util.c.
|
inlinestatic |
End read/write to Coprocessor.
phost | Pointer to Hal context |
Definition at line 44 of file EVE_Cmd.c.
EVE_HAL_EXPORT void EVE_Cmd_endFunc | ( | EVE_HalContext * | phost | ) |
End writing a function, closes the transfer.
phost | Pointer to Hal context |
Definition at line 274 of file EVE_Cmd.c.
EVE_HAL_EXPORT uint16_t EVE_Cmd_moveWp | ( | EVE_HalContext * | phost, |
uint16_t | bytes | ||
) |
Move the write pointer forward by the specified number of bytes. Returns the previous write pointer.
phost | Pointer to Hal context |
bytes | Number of bytes to move |
Definition at line 446 of file EVE_Cmd.c.
EVE_HAL_EXPORT void EVE_Cmd_restore | ( | EVE_HalContext * | phost | ) |
Restore the internal state of EVE_Cmd. Call this after manually writing to the coprocessor buffer
Definition at line 682 of file EVE_Cmd.c.
EVE_HAL_EXPORT uint16_t EVE_Cmd_rp | ( | EVE_HalContext * | phost | ) |
Read from Coprocessor.
phost | Pointer to Hal context |
Definition at line 64 of file EVE_Cmd.c.
EVE_HAL_EXPORT uint16_t EVE_Cmd_space | ( | EVE_HalContext * | phost | ) |
Get free space of Coprocessor's command buffer.
phost | Pointer to Hal context |
Definition at line 105 of file EVE_Cmd.c.
EVE_HAL_EXPORT void EVE_Cmd_startFunc | ( | EVE_HalContext * | phost | ) |
EVE_HAL_EXPORT bool EVE_Cmd_waitFlush | ( | EVE_HalContext * | phost | ) |
Wait till Command FIFO buffer empty.
phost | Pointer to Hal context |
Definition at line 555 of file EVE_Cmd.c.
EVE_HAL_EXPORT bool EVE_Cmd_waitLogo | ( | EVE_HalContext * | phost | ) |
Wait until Coprocessor finished logo animation.
phost | Pointer to Hal context |
Definition at line 625 of file EVE_Cmd.c.
EVE_HAL_EXPORT bool EVE_Cmd_waitRead32 | ( | EVE_HalContext * | phost, |
uint32_t | ptr, | ||
uint32_t | value | ||
) |
Wait for a 32-bit value that was set by EVE_CoCmd_memWrite32(phost, ptr, value)
.
Definition at line 651 of file EVE_Cmd.c.
EVE_HAL_EXPORT uint32_t EVE_Cmd_waitSpace | ( | EVE_HalContext * | phost, |
uint32_t | size | ||
) |
Wait for the command buffer to have at least the requested amount of free space.
Definition at line 580 of file EVE_Cmd.c.
EVE_HAL_EXPORT uint16_t EVE_Cmd_wp | ( | EVE_HalContext * | phost | ) |
Write to Coprocessor.
phost | Pointer to Hal context |
Definition at line 80 of file EVE_Cmd.c.
EVE_HAL_EXPORT bool EVE_Cmd_wr16 | ( | EVE_HalContext * | phost, |
uint16_t | value | ||
) |
Write 2 bytes to Coprocessor's command fifo.
phost | Pointer to Hal context |
value | Data to write |
Definition at line 366 of file EVE_Cmd.c.
EVE_HAL_EXPORT bool EVE_Cmd_wr32 | ( | EVE_HalContext * | phost, |
uint32_t | value | ||
) |
Write 4 bytes to Coprocessor's command fifo.
phost | Pointer to Hal context |
value | Data to write |
Definition at line 394 of file EVE_Cmd.c.
EVE_HAL_EXPORT bool EVE_Cmd_wr8 | ( | EVE_HalContext * | phost, |
uint8_t | value | ||
) |
Write a byte to Coprocessor's command fifo.
phost | Pointer to Hal context |
value | Byte to write |
EVE_HAL_EXPORT bool EVE_Cmd_wrMem | ( | EVE_HalContext * | phost, |
const uint8_t * | buffer, | ||
uint32_t | size | ||
) |
Write buffer to Coprocessor's comand fifo.
phost | Pointer to Hal context |
buffer | Data pointer |
size | Size to write |
Definition at line 291 of file EVE_Cmd.c.
EVE_HAL_EXPORT bool EVE_Cmd_wrProgMem | ( | EVE_HalContext * | phost, |
eve_progmem_const uint8_t * | buffer, | ||
uint32_t | size | ||
) |
EVE_HAL_EXPORT uint32_t EVE_Cmd_wrString | ( | EVE_HalContext * | phost, |
const char * | str, | ||
uint32_t | maxLength | ||
) |
|
static |
Wait handler.
phost | Pointer to Hal context |
rpOrSpace | Read pointer or space |
Definition at line 528 of file EVE_Cmd.c.
|
static |
|
static |
Write buffer to Coprocessor's comand fifo.
phost | Pointer to Hal context |
buffer | Data pointer |
size | Size to write |
progmem | True if ProgMem |
string | True is string |
Definition at line 191 of file EVE_Cmd.c.
|
static |
Write string to Coprocessor's comand fifo.
phost | Pointer to Hal context |
buffer | Data pointer |
size | Size to write |
transfer | Byte to transfer |
transfered | Byte transfered |
Definition at line 163 of file EVE_Cmd.c.