46#if defined(EVE_SUPPORT_CAPACITIVE)
68 eve_printf_debug(
"Touch screen transform values are A 0x%x,B 0x%x,C 0x%x,D 0x%x,E 0x%x, F 0x%x\n",
69 transMatrix[0], transMatrix[1], transMatrix[2], transMatrix[3], transMatrix[4], transMatrix[5]);
74#ifdef EVE_FLASH_AVAILABLE
104 else if (last_chunk == 0)
122#ifdef EVE_FLASH_AVAILABLE
139 num = num - (num % 4);
154#ifdef EVE_FLASH_AVAILABLE
168#ifdef EVE_FLASH_AVAILABLE
181#ifdef EVE_FLASH_AVAILABLE
199#ifdef EVE_FLASH_AVAILABLE
223 if (aligned_length == 0)
231 if (num - aligned_length > 0)
237 write_data = write_data + num - aligned_length;
240 if (i < aligned_length)
242 padding_arr[i] = *write_data++;
246 padding_arr[i] = 0xFF;
259#ifdef EVE_FLASH_AVAILABLE
281 if (curr_flash_state == nextState) {
332#ifdef EVE_FLASH_AVAILABLE
349 printf(
"Error, Flash is not able to detatch %d\n", val);
359 printf(
"Error, Flash is not able to attach %d\n", val);
369 printf(
"Error, Flash is not able to get into full mode, status: %d\n", val);
376#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
388 uint32_t logical_W = eve_H * physical_W / physical_H;
396#ifdef EVE_FLASH_AVAILABLE
416 for (
uint32_t i = 0; i < num; i = i + 4)
419 send_data32 = *data++;
420 send_data32 |= (*data++) << 8;
421 send_data32 |= (*data++) << 16;
422 send_data32 |= (*data++) << 24;
434#ifdef BUFFER_OPTIMIZATION
446#ifdef BUFFER_OPTIMIZATION
457 printf(
"DlBuffer overflow\n");
473#ifdef BUFFER_OPTIMIZATION
529 for (
int8_t i = 100; i >= 0; i -= 3)
544 for (
int8_t i = 0; i <= 100; i += 3)
598 uint32_t TotalBytes = NumbytetoWrite;
600 if (NumbytetoWrite > FreeSpace)
606 if (NumbytetoWrite > FreeSpace)
608 TotalBytes = FreeSpace;
621 uint32_t secpartialchunk = TotalBytes - partialchunk;
624 if (secpartialchunk > 0)
628 pFifo->
fifo_wp = secpartialchunk;
666 while (TotalBytes > 0)
668 currchunk = TotalBytes;
670 if (currchunk > FreeSpace)
672 currchunk = FreeSpace;
677 TotalBytes -= currchunk;
736 printf(
"Error, Flash is not able to attach\n");
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 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 uint32_t EVE_CoCmd_calibrate(EVE_HalContext *phost)
Send CMD_CALIBRATE.
EVE_HAL_EXPORT uint32_t EVE_CoCmd_flashAttach(EVE_HalContext *phost)
Attach flash.
static void EVE_CoCmd_clearCache(EVE_HalContext *phost)
Send CMD_CLEARCACHE.
static void EVE_CoCmd_flashErase(EVE_HalContext *phost)
Send CMD_FLASHERASE.
EVE_HAL_EXPORT void EVE_CoCmd_text(EVE_HalContext *phost, int16_t x, int16_t y, int16_t font, uint16_t options, const char *s,...)
Send CMD_TEXT.
EVE_HAL_EXPORT uint32_t EVE_CoCmd_flashFast(EVE_HalContext *phost, uint32_t *result)
Enter fast flash state.
#define EVE_CoCmd_hsf(phost, hsf)
static void EVE_CoCmd_flashRead(EVE_HalContext *phost, uint32_t dest, uint32_t src, uint32_t num)
Read from Flash to RAM_G. Call EVE_Cmd_waitFlush to wait for completion.
static void EVE_CoCmd_dlStart(EVE_HalContext *phost)
Send CMD_DLSTART.
static void EVE_CoCmd_flashDetach(EVE_HalContext *phost)
Send CMD_FLASHDETACH.
static void EVE_CoCmd_flashUpdate(EVE_HalContext *phost, uint32_t dest, uint32_t src, uint32_t num)
Send CMD_FLASHUPDATE. This command must be followed by the data to write.
#define CTOUCH_MODE_COMPATIBILITY
#define REG_TOUCH_ADC_MODE
#define COLOR_RGB(red, green, blue)
#define FLASH_STATUS_BASIC
#define FLASH_STATUS_FULL
#define REG_CTOUCH_EXTENDED
#define REG_TOUCH_TRANSFORM_A
#define FLASH_STATUS_DETACHED
#define CLEAR_COLOR_RGB(red, green, blue)
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 void EVE_Hal_wr8(EVE_HalContext *phost, uint32_t addr, uint8_t v)
Write 8 bits to Coprocessor's memory.
EVE_HAL_EXPORT void EVE_Hal_wr32(EVE_HalContext *phost, uint32_t addr, uint32_t v)
Write 4 bytes to Coprocessor's memory.
EVE_HAL_EXPORT void EVE_Hal_wrMem(EVE_HalContext *phost, uint32_t addr, const uint8_t *buffer, uint32_t size)
Write a buffer to Coprocessor's memory.
EVE_HAL_EXPORT uint8_t EVE_Hal_rd8(EVE_HalContext *phost, uint32_t addr)
Read 8 bits from Coprocessor's memory.
EVE_HAL_EXPORT void EVE_sleep(uint32_t ms)
Sleep in milisecond.
static ft_uint32_t ft_uint8_t * buffer
#define FIFO_BYTE_ALIGNMENT_MASK
static ft_void_t ft_uint32_t * cmd
void fadein(EVE_HalContext *phost)
Fadein animation perform display fadein effect by changing the display PWM from 0 till 100 and finall...
ft_bool_t Esd_Calibrate(EVE_HalContext *phost)
Do calibration.
uint32_t Fifo_Write(Gpu_Hal_Context_t *host, Fifo_t *pFifo, const uint8_t *buffer, uint32_t NumbytetoWrite)
write and update the write register
int32_t FlashHelper_GetSizeMB(Gpu_Hal_Context_t *phost)
void App_WrDl_Buffer(Gpu_Hal_Context_t *phost, uint32_t cmd)
Write DL command to buffer.
ft_void_t Ft_Gpu_HorizontalScanoutFilter(EVE_HalContext *phost, uint32_t physical_W, uint32_t physical_H)
Adjust for non-sqare pixel panel.
void Fifo_Update(Gpu_Hal_Context_t *host, Fifo_t *pFifo)
update both the read and write pointers
void GPU_DLSwap(Gpu_Hal_Context_t *phost, uint8_t DL_Swap_Type)
API to check the status of previous DLSWAP and perform DLSWAP of new DL Check for the status of previ...
void App_Set_DlBuffer_Index(uint32_t index)
Set DL buffer index.
void fadeout(EVE_HalContext *phost)
Fadeout animation.
void Fifo_WriteWait(Gpu_Hal_Context_t *host, Fifo_t *pFifo, const uint8_t *buffer, uint32_t Numbyte)
write and wait for the fifo to be empty. handle cases even if the Numbytes are more than freespace
void App_Flush_DL_Buffer(const Gpu_Hal_Context_t *phost)
Flush DL buffer to Coprocessor.
uint32_t Fifo_GetFreeSpace(Gpu_Hal_Context_t *host, Fifo_t *pFifo)
get the free space in the fifo
void Fifo_Init(Fifo_t *pFifo, uint32_t StartAddress, uint32_t Length, uint32_t HWReadRegAddress, uint32_t HWWriteRegAddress)
Init mediafifo.
void Fifo_Write32(Gpu_Hal_Context_t *host, Fifo_t *pFifo, uint32_t WriteWord)
write one word and update the write register
Eve's connected flash helper functions.
ft_void_t FlashHelper_flashWriteExt(EVE_HalContext *phost, uint32_t dest, uint32_t num, const uint8_t *data)
ft_void_t FlashHelper_ClearCache(EVE_HalContext *phost)
uint32_t FlashHelper_SwitchFullMode(EVE_HalContext *phost)
ft_void_t FlashHelper_Erase(EVE_HalContext *phost)
Flash_Cmd_Status_t FlashHelper_Read(EVE_HalContext *phost, uint32_t dest_ram, uint32_t src_flash, uint32_t num, uint8_t *read_data)
Flash_Cmd_Status_t FlashHelper_Write(EVE_HalContext *phost, uint32_t dest_flash, uint32_t num, const uint8_t *write_data)
uint32_t FlashHelper_SwitchState(EVE_HalContext *phost, uint8_t nextState)
uint8_t FlashHelper_GetState(EVE_HalContext *phost)
Flash_Cmd_Status_t FlashHelper_Update(EVE_HalContext *phost, uint32_t dest_flash, uint32_t src_ram, uint32_t num)
#define Gpu_CoCmd_FlashAttach
void EVE_Cmd_waitFlush(EVE_HalContext *host)
This file defines the generic APIs of phost access layer for the FT800 or EVE compatible silicon....
#define FLASH_READ_ALIGN_BYTE
#define Gpu_Hal_WaitCmdfifo_empty
#define FLASH_WRITE_ALIGN_BYTE
#define FLASH_UPDATE_ALIGN_BYTE
#define Gpu_Hal_Context_t
#define App_Flush_Co_Buffer(phost)