49#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
89#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
144#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
174 *size = (transfered + transfer);
197 uint32_t transfer = (size - transfered);
200 eve_assert(!
string || (req == (transfer + 1)));
207 if (transfer > space)
225 if (!
string && (transfer & 0x3))
227 uint32_t pad = 4 - (transfer & 0x3);
234 transfered += transfer;
241#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
253 }
while (transfered < size);
311 return wrBuffer(phost, (
void *)(uintptr_t)
buffer, size,
true,
false) == size;
327 transfered =
wrBuffer(phost, str, maxLength,
false,
true);
410#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
424#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
458#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
599 if (space < size || !size)
640 }
while ((wp != 0) || (rp != 0));
EVE_HAL_EXPORT bool EVE_Cmd_wrMem(EVE_HalContext *phost, const uint8_t *buffer, uint32_t size)
Write buffer to Coprocessor's comand fifo.
static bool checkWait(EVE_HalContext *phost, uint16_t rpOrSpace)
Check for coprocessor fault.
EVE_HAL_EXPORT bool EVE_Cmd_wr16(EVE_HalContext *phost, uint16_t value)
Write 2 bytes to Coprocessor's command fifo.
static void endFunc(EVE_HalContext *phost)
End read/write to Coprocessor.
EVE_HAL_EXPORT uint16_t EVE_Cmd_space(EVE_HalContext *phost)
Get free space of Coprocessor's command buffer.
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.
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.
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.
EVE_HAL_EXPORT uint32_t EVE_Cmd_waitSpace(EVE_HalContext *phost, uint32_t size)
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_waitFlush(EVE_HalContext *phost)
Wait till Command FIFO buffer empty.
void debugBackupRamG(EVE_HalContext *phost)
Backup the last 128 bytes of RAM_G, which may be used for an error message.
static bool handleWait(EVE_HalContext *phost, uint16_t rpOrSpace)
Wait handler.
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 bool EVE_Cmd_waitRead32(EVE_HalContext *phost, uint32_t ptr, uint32_t value)
static void startBufferTransfer(EVE_HalContext *phost)
Start transfer data to EVE.
EVE_HAL_EXPORT uint16_t EVE_Cmd_rp(EVE_HalContext *phost)
Read from Coprocessor.
EVE_HAL_EXPORT void EVE_Cmd_endFunc(EVE_HalContext *phost)
End writing a function, closes the transfer.
EVE_HAL_EXPORT uint16_t EVE_Cmd_wp(EVE_HalContext *phost)
Write to Coprocessor.
EVE_HAL_EXPORT bool EVE_Cmd_wr32(EVE_HalContext *phost, uint32_t value)
Write 4 bytes to Coprocessor's command fifo.
EVE_HAL_EXPORT void EVE_Cmd_restore(EVE_HalContext *phost)
EVE_HAL_EXPORT bool EVE_Cmd_waitLogo(EVE_HalContext *phost)
Wait until Coprocessor finished logo animation.
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's command read/write.
#define eve_progmem_const
#define EVE_CMD_FIFO_SIZE
#define EVE_CMD_FAULT(rp)
#define EVE_CMD_FIFO_MASK
EVE_HAL_EXPORT uint32_t EVE_Hal_rd32(EVE_HalContext *phost, uint32_t addr)
Read 4 bytes from Coprocessor's memory.
EVE_HAL_EXPORT void EVE_Hal_rdMem(EVE_HalContext *phost, uint8_t *result, uint32_t addr, uint32_t size)
Read a block data from Coprocessor's memory.
EVE_HAL_EXPORT uint16_t EVE_Hal_rd16(EVE_HalContext *phost, uint32_t addr)
Read 2 bytes from Coprocessor's memory.
void EVE_Hal_displayMessage(EVE_HalContext *phost, const char *str, uint16_t size)
Display a fullscreen debug message using TEXT8X8. Uses the back of RAM_G.
EVE_HAL_EXPORT void EVE_Hal_idle(EVE_HalContext *phost)
Idle handler for Eve_Hal framework.
EVE_HAL_EXPORT void EVE_Hal_wr16(EVE_HalContext *phost, uint32_t addr, uint16_t v)
Write 2 bytes to Coprocessor's memory.
EVE_HAL_EXPORT void EVE_Hal_startTransfer(EVE_HalContext *phost, EVE_TRANSFER_T rw, uint32_t addr)
Start data transfer to Coprocessor.
EVE_HAL_EXPORT uint32_t EVE_Hal_transferString(EVE_HalContext *phost, const char *str, uint32_t index, uint32_t size, uint32_t padMask)
Transfer a string to EVE platform.
static bool EVE_Hal_supportCmdB(EVE_HalContext *phost)
EVE_HAL_EXPORT void EVE_Hal_transferMem(EVE_HalContext *phost, uint8_t *result, const uint8_t *buffer, uint32_t size)
Transfer (read/write) a block data to Coprocessor.
EVE_HAL_EXPORT void EVE_Hal_transferProgMem(EVE_HalContext *phost, uint8_t *result, eve_progmem_const uint8_t *buffer, uint32_t size)
Transfer a block data from program memory.
EVE_HAL_EXPORT void EVE_Hal_endTransfer(EVE_HalContext *phost)
End data transfer.
EVE_HAL_EXPORT uint32_t EVE_Hal_transfer32(EVE_HalContext *phost, uint32_t value)
Write 4 bytes to Coprocessor.
static ft_uint32_t ft_uint8_t * buffer