image/svg+xml
Brteve's API for EveApps
Version 0.0.1
The reference document for common folder of EveApps project.
 
Loading...
Searching...
No Matches
EVE_CoCmd_State.c
Go to the documentation of this file.
1
32#include "EVE_Platform.h"
33
35{
36 uint16_t resAddr;
37
38#if EVE_CMD_HOOKS
39 if (phost->CoCmdHook && phost->CoCmdHook(phost, CMD_BITMAP_TRANSFORM, 0))
40 return false;
41#endif
42
43 EVE_Cmd_startFunc(phost);
45 EVE_Cmd_wr32(phost, x0);
46 EVE_Cmd_wr32(phost, y0);
47 EVE_Cmd_wr32(phost, x1);
48 EVE_Cmd_wr32(phost, y1);
49 EVE_Cmd_wr32(phost, x2);
50 EVE_Cmd_wr32(phost, y2);
51 EVE_Cmd_wr32(phost, tx0);
52 EVE_Cmd_wr32(phost, ty0);
53 EVE_Cmd_wr32(phost, tx1);
54 EVE_Cmd_wr32(phost, ty1);
55 EVE_Cmd_wr32(phost, tx2);
56 EVE_Cmd_wr32(phost, ty2);
57 resAddr = EVE_Cmd_moveWp(phost, 4);
58 EVE_Cmd_endFunc(phost);
59
60#if EVE_DL_OPTIMIZE
61 EVE_DL_STATE.BitmapTransform = true;
62#endif
63
64 /* Read result */
65 if (result)
66 {
67 if (!EVE_Cmd_waitFlush(phost))
68 return false;
69 *result = EVE_Hal_rd16(phost, RAM_CMD + resAddr);
70 }
71 return true;
72}
73
74/* end of file */
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.
Definition EVE_Cmd.c:446
EVE_HAL_EXPORT void EVE_Cmd_startFunc(EVE_HalContext *phost)
Begin writing a function, keeps the transfer open.
Definition EVE_Cmd.c:262
EVE_HAL_EXPORT void EVE_Cmd_endFunc(EVE_HalContext *phost)
End writing a function, closes the transfer.
Definition EVE_Cmd.c:274
EVE_HAL_EXPORT bool EVE_Cmd_wr32(EVE_HalContext *phost, uint32_t value)
Write 4 bytes to Coprocessor's command fifo.
Definition EVE_Cmd.c:394
EVE_HAL_EXPORT bool EVE_CoCmd_bitmapTransform(EVE_HalContext *phost, int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t tx0, int32_t ty0, int32_t tx1, int32_t ty1, int32_t tx2, int32_t ty2, uint16_t *result)
Send CMD_BITMAP_TRANSFORM. Blocking call if a pointer is passed to result
#define EVE_HAL_EXPORT
#define RAM_CMD
#define CMD_BITMAP_TRANSFORM
EVE_HAL_EXPORT uint16_t EVE_Hal_rd16(EVE_HalContext *phost, uint32_t addr)
Read 2 bytes from Coprocessor's memory.
Definition EVE_Hal.c:173
#define EVE_DL_STATE
unsigned short uint16_t
int int32_t
Platform selector.
void EVE_Cmd_waitFlush(EVE_HalContext *host)
Definition Gpu_Hal.cpp:775