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.
More...
|
#define | PROGMEM eve_progmem |
|
#define | PROGMEM_CONST eve_progmem_const |
|
#define | FIFO_SIZE_MASK EVE_FIFO_SIZE_MASK |
|
#define | FIFO_BYTE_ALIGNMENT_MASK EVE_FIFO_BYTE_ALIGNMENT_MASK |
|
#define | CMD_SIZE 4 |
|
#define | char8_t int8_t |
|
#define | bool_t bool |
|
#define | uchar8_t uint8_t |
|
#define | FALSE false |
|
#define | TRUE true |
|
#define | FT800_PD_N 0 |
|
#define | FT800_SEL_PIN 0 |
|
#define | DispWidth phost->Width |
|
#define | DispHeight phost->Height |
|
#define | GPU_HAL_MODE_E EVE_MODE_T |
|
#define | GPU_I2C_MODE EVE_MODE_I2C |
|
#define | GPU_SPI_MODE EVE_MODE_SPI |
|
#define | GPU_HAL_STATUS_E EVE_STATUS_T |
|
#define | GPU_HAL_CLOSED EVE_STATUS_CLOSED |
|
#define | GPU_HAL_OPENED EVE_STATUS_OPENED |
|
#define | GPU_HAL_READING EVE_STATUS_READING |
|
#define | GPU_HAL_WRITING EVE_STATUS_WRITING |
|
#define | GPU_HAL_STATUS_ERROR EVE_STATUS_ERROR |
|
#define | GPU_TRANSFERDIR_T EVE_TRANSFER_T |
|
#define | GPU_READ EVE_TRANSFER_READ |
|
#define | GPU_WRITE EVE_TRANSFER_WRITE |
|
#define | Gpu_Hal_Callback_t EVE_Callback |
|
#define | Gpu_Hal_Config_t EVE_HalParameters |
|
#define | EVE_FIFO_SIZE_MASK EVE_CMD_FIFO_MASK |
|
#define | EVE_FIFO_BYTE_ALIGNMENT_MASK EVE_CMD_FIFO_ALIGNMENT_MASK |
|
#define | Gpu_Hal_Context_t EVE_HalContext |
|
#define | hal_config Parameters |
|
#define | spi_clockrate_khz SpiClockrateKHz |
|
#define | pdn_pin_no PowerDownPin |
|
#define | spi_cs_pin_no SpiCsPin |
|
#define | cmd_fifo_wp CmdWp |
|
#define | channel_no SpiCsPin |
|
#define | MSVC_PLATFORM_SPI_LIBFT4222 1 |
|
#define | MSVC_PLATFORM_SPI_LIBMPSSE 2 |
|
#define | BootupConfig EVE_Util_bootupConfig |
|
#define | Gpu_CoCmd_SendCmd EVE_Cmd_wr32 |
|
#define | Gpu_CoCmd_SendStr(phost, str) EVE_Cmd_wrString(phost, str, EVE_CMD_STRING_MAX) |
|
#define | Gpu_CoCmd_SendStr_S EVE_Cmd_wrString |
|
#define | Gpu_CoCmd_StartFrame(phost) eve_noop() |
|
#define | Gpu_CoCmd_EndFrame(phost) eve_noop() |
|
#define | Gpu_Copro_SendCmd Gpu_CoCmd_SendCmd |
|
#define | Gpu_CoCmd_StartFunc(phost, size) EVE_Cmd_startFunc(phost) |
|
#define | Gpu_CoCmd_EndFunc(phost, size) EVE_Cmd_endFunc(phost) |
|
#define | Gpu_Fonts EVE_Gpu_Fonts |
|
#define | Gpu_Fonts_t EVE_Gpu_Fonts |
|
#define | Gpu_FontsExt EVE_Gpu_FontsExt |
|
#define | Gpu_FontsExt_t EVE_Gpu_FontsExt |
|
#define | GPU_NUMCHAR_PERFONT EVE_GPU_NUMCHAR_PERFONT |
|
#define | GPU_FONT_TABLE_SIZE EVE_GPU_FONT_TABLE_SIZE |
|
#define | Hal_LoadSDCard() EVE_Util_loadSdCard(NULL) |
|
#define | Gpu_ClearScreen EVE_Util_clearScreen |
|
#define | FLASH_WRITE_ALIGN_BYTE (256) |
|
#define | FLASH_UPDATE_ALIGN_BYTE (4096) |
|
#define | FLASH_READ_ALIGN_BYTE (64) |
|
#define | POLAR_UTIL |
|
#define | RGB(r, g, b) ((((vc_int32_t)(r)) << 16) | (((vc_int32_t)(g)) << 8) | (b)) |
|
#define | SQ(v) ((v) * (v)) |
|
#define | MIN(x, y) ((x) > (y) ? (y) : (x)) |
|
#define | MAX(x, y) ((x) > (y) ? (x) : (y)) |
|
#define | PLAYCOLOR 0x00A0A080 |
|
#define | NOTE(n, sharp) (((n) - 'C') + ((sharp)*128)) |
|
#define | F16(s) ((int32_t)((s)*65536)) |
|
#define | INVALID_TOUCH_XY 0x8000 |
|
#define | ABS(x) ((x) > (0) ? (x) : (-x)) |
|
#define | ALIGN_TWO_POWER_N(Value, alignval) (((Value) + (alignval - 1)) & (~(alignval - 1))) |
|
#define | pgm_read_byte_near(x) (*(x)) |
|
#define | pgm_read_byte(x) (*(x)) |
|
#define | pgm_read_word(addr) (*((prog_uint16_t *)(addr))) |
|
#define | delay(x) EVE_sleep(x) |
|
#define | random(x) (rand() % (x)) |
|
#define | DBGPRINT(x) printf(x) |
|
#define | GET_CURR_MILLIS() EVE_millis() |
|
|
#define | LOADIMAGE 1 |
|
#define | INFLATE 2 |
|
#define | LOAD 3 |
|
#define | INFLATE2 4 |
|
|
#define | Gpu_Hal_Close EVE_Hal_close |
|
#define | Gpu_Hal_DeInit EVE_Hal_release |
|
#define | Gpu_Hal_ESD_Idle EVE_Hal_idle |
|
#define | Gpu_Hal_StartTransfer EVE_Hal_startTransfer |
|
#define | Gpu_Hal_Transfer8 EVE_Hal_transfer8 |
|
#define | Gpu_Hal_Transfer16 EVE_Hal_transfer16 |
|
#define | Gpu_Hal_Transfer32 EVE_Hal_transfer32 |
|
#define | Gpu_Hal_EndTransfer EVE_Hal_endTransfer |
|
#define | Gpu_Hal_Rd8 EVE_Hal_rd8 |
|
#define | Gpu_Hal_Rd16 EVE_Hal_rd16 |
|
#define | Gpu_Hal_Rd32 EVE_Hal_rd32 |
|
#define | Gpu_Hal_Wr8 EVE_Hal_wr8 |
|
#define | Gpu_Hal_Wr16 EVE_Hal_wr16 |
|
#define | Gpu_Hal_Wr32 EVE_Hal_wr32 |
|
#define | Gpu_Hal_WrMem EVE_Hal_wrMem |
|
#define | Gpu_Hal_WrMem_ProgMem EVE_Hal_wrProgMem |
|
#define | Gpu_Hal_WrMemFromFlash EVE_Hal_wrProgMem |
|
|
#define | Gpu_Hal_WrCmd32 EVE_Cmd_wr32 |
|
|
#define | Gpu_Hal_WrCmdBuf EVE_Cmd_wrMem |
|
#define | Gpu_Hal_WrCmdBuf_nowait EVE_Cmd_wrMem |
|
#define | Gpu_Hal_WrCmdBuf_ProgMem EVE_Cmd_wrProgMem |
|
#define | Gpu_Hal_WrCmdBufFromFlash EVE_Cmd_wrProgMem |
|
|
#define | Gpu_Hal_WaitCmdFifoEmpty EVE_Cmd_waitFlush |
|
#define | Gpu_Hal_WaitCmdfifo_empty EVE_Cmd_waitFlush |
|
|
#define | Gpu_Hal_WaitCmdFreespace EVE_Cmd_waitSpace |
|
|
#define | GPU_INTERNAL_OSC EVE_INTERNAL_OSC |
|
#define | GPU_EXTERNAL_OSC EVE_EXTERNAL_OSC |
|
#define | GPU_PLL_SOURCE_T EVE_PLL_SOURCE_T |
|
#define | GPU_PLL_48M EVE_PLL_48M |
|
#define | GPU_PLL_36M EVE_PLL_36M |
|
#define | GPU_PLL_24M EVE_PLL_24M |
|
#define | GPU_PLL_FREQ_T EVE_PLL_FREQ_T |
|
#define | GPU_ACTIVE_M EVE_ACTIVE_M |
|
#define | GPU_STANDBY_M EVE_STANDBY_M |
|
#define | GPU_SLEEP_M EVE_SLEEP_M |
|
#define | GPU_POWERDOWN_M EVE_POWERDOWN_M |
|
#define | GPU_POWER_MODE_T EVE_POWER_MODE_T |
|
#define | GPU_SYSCLK_DEFAULT EVE_SYSCLK_DEFAULT |
|
#define | GPU_SYSCLK_72M EVE_SYSCLK_72M |
|
#define | GPU_SYSCLK_60M EVE_SYSCLK_60M |
|
#define | GPU_SYSCLK_48M EVE_SYSCLK_48M |
|
#define | GPU_SYSCLK_36M EVE_SYSCLK_36M |
|
#define | GPU_SYSCLK_24M EVE_SYSCLK_24M |
|
#define | GPU_81X_PLL_FREQ_T EVE_81X_PLL_FREQ_T |
|
#define | GPU_5MA EVE_5MA |
|
#define | GPU_10MA EVE_10MA |
|
#define | GPU_15MA EVE_15MA |
|
#define | GPU_20MA EVE_20MA |
|
#define | GPU_81X_GPIO_DRIVE_STRENGTH_T EVE_81X_GPIO_DRIVE_STRENGTH_T |
|
#define | GPU_GPIO0 EVE_GPIO0 |
|
#define | GPU_GPIO1 EVE_GPIO1 |
|
#define | GPU_GPIO2 EVE_GPIO2 |
|
#define | GPU_GPIO3 EVE_GPIO3 |
|
#define | GPU_GPIO4 EVE_GPIO4 |
|
#define | GPU_DISP EVE_DISP |
|
#define | GPU_DE EVE_DE |
|
#define | GPU_VSYNC_HSYNC EVE_VSYNC_HSYNC |
|
#define | GPU_PCLK EVE_PCLK |
|
#define | GPU_BACKLIGHT EVE_BACKLIGHT |
|
#define | GPU_R_G_B EVE_R_G_B |
|
#define | GPU_AUDIO_L EVE_AUDIO_L |
|
#define | GPU_INT_N EVE_INT_N |
|
#define | GPU_TOUCHWAKE EVE_TOUCHWAKE |
|
#define | GPU_SCL EVE_SCL |
|
#define | GPU_SDAEVE_SDA |
|
#define | GPU_SPI_MISO_MOSI_IO2_IO3 EVE_SPI_MISO_MOSI_IO2_IO3 |
|
#define | GPU_81X_GPIO_GROUP_T EVE_81X_GPIO_GROUP_T |
|
#define | GPU_81X_RESET_ACTIVE EVE_81X_RESET_ACTIVE |
|
#define | GPU_81X_RESET_REMOVAL EVE_81X_RESET_REMOVAL |
|
#define | GPU_CORE_RESET EVE_CORE_RESET |
|
#define | COCMD_FAULT(rp) EVE_CMD_FAULT(rp) |
|
#define | GPU_SPI_NUMCHANNELS_T EVE_SPI_CHANNELS_T |
|
#define | GPU_SPI_SINGLE_CHANNEL EVE_SPI_SINGLE_CHANNEL |
|
#define | GPU_SPI_DUAL_CHANNEL EVE_SPI_DUAL_CHANNEL |
|
#define | GPU_SPI_QUAD_CHANNEL EVE_SPI_QUAD_CHANNEL |
|
#define | GPU_SPI_NUMDUMMYBYTES uint8_t |
|
#define | GPU_SPI_ONEDUMMY 1 |
|
#define | GPU_SPI_TWODUMMY 2 |
|
#define | SPI_SINGLE_CHANNEL EVE_SPI_SINGLE_CHANNEL |
|
#define | SPI_DUAL_CHANNEL EVE_SPI_DUAL_CHANNEL |
|
#define | SPI_QUAD_CHANNEL EVE_SPI_QUAD_CHANNEL |
|
#define | SPI_ONE_DUMMY_BYTE EVE_SPI_ONE_DUMMY_BYTE |
|
#define | SPI_TWO_DUMMY_BYTE EVE_SPI_TWO_DUMMY_BYTES |
|
#define | ft_delay EVE_sleep |
|
#define | Gpu_Hal_WaitLogo_Finish EVE_Cmd_waitLogo |
|
#define | Gpu_Hal_Sleep EVE_sleep |
|
#define | Gpu_HostCommand EVE_Hal_hostCommand |
|
#define | Gpu_HostCommand_Ext3 EVE_Hal_hostCommandExt3 |
|
#define | Gpu_Hal_Powercycle EVE_Hal_powerCycle |
|
#define | Gpu_Hal_SetSPI EVE_Hal_setSPI |
|
#define | Gpu_CurrentFrequency EVE_Hal_currentFrequency |
|
#define | Gpu_ClockTrimming EVE_Hal_clockTrimming |
|
#define | Gpu_ClockSelect EVE_Host_clockSelect |
|
#define | Gpu_PLL_FreqSelect EVE_Host_pllFreqSelect |
|
#define | Gpu_PowerModeSwitch EVE_Host_powerModeSwitch |
|
#define | Gpu_CoreReset EVE_Host_coreReset |
|
#define | Gpu_81X_SelectSysCLK EVE_Host_selectSysClk |
|
#define | GPU_81X_PowerOffComponents EVE_Host_powerOffComponents |
|
#define | GPU_81X_PadDriveStrength EVE_Host_padDriveStrength |
|
#define | Gpu_81X_ResetActive EVE_Host_resetActive |
|
#define | Gpu_81X_ResetRemoval EVE_Host_resetRemoval |
|
|
#define | App_WrCoCmd_Buffer(phost, cmd) EVE_Cmd_wr32((phost), (cmd)) |
|
#define | App_WrCoStr_Buffer(phost, s) EVE_Cmd_wrString((phost), (s), EVE_CMD_STRING_MAX) |
|
#define | App_Flush_Co_Buffer(phost) EVE_Cmd_waitFlush((phost)) |
|
#define | App_Flush_Co_Buffer_nowait(phost) EVE_Cmd_waitFlush((phost)) |
|
#define | App_Set_CmdBuffer_Index(idx) eve_noop() |
|
|
static | eve_deprecated ("Use `EVE_Hal_initialize`") bool Gpu_Hal_Init(Gpu_HalInit_t *halinit) |
|
static | eve_deprecated ("Use `EVE_Hal_open`") bool Gpu_Hal_Open(EVE_HalContext *phost) |
|
static | eve_deprecated ("Use `EVE_Hal_rdMem` (note: buffer and addr are swapped)") ft_void_t Gpu_Hal_RdMem(EVE_HalContext *phost |
|
static | eve_deprecated ("Use `EVE_Cmd_startFunc`, `EVE_Cmd_wr32`, and `EVE_Cmd_endFunc`") ft_void_t Gpu_CoCmd_SendCmdArr(EVE_HalContext *phost |
|
static ft_int16_t | Gpu_Hal_TransferString (EVE_HalContext *phost, const ft_char8_t *str) |
|
static ft_int16_t | Gpu_Hal_TransferString_S (EVE_HalContext *phost, const ft_char8_t *str, int length) |
|
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 previous DLSWAP and if still not done wait for few ms and check again.
|
|
uint32_t | GET_ASTC_FORMAT (uint16_t w, uint16_t h) |
|
void | astc_tile2 (uint8_t *iData, uint16_t bw, uint16_t bh, uint32_t size, const uint8_t *oData) |
|
static int32_t | Gpu_Hal_Dec2Ascii (char8_t *pSrc, int32_t value) |
|
static void | Gpu_Hal_LoadImageToMemory (Gpu_Hal_Context_t *phost, const char *fileName, int32_t destination, uint8_t type) |
|
static void | Gpu_Hal_ResetCmdFifo (Gpu_Hal_Context_t *phost) |
|
|
void | Gpu_CoCmd_FlashHelper_Init (Gpu_Hal_Context_t *phost) |
|
uint32_t | Gpu_CoCmd_FlashHelper_SwitchState (Gpu_Hal_Context_t *phost, uint8_t nextState) |
|
uint32_t | Gpu_CoCmd_FlashHelper_SwitchFullMode (Gpu_Hal_Context_t *phost) |
|
Flash_Cmd_Status_t | Gpu_CoCmd_FlashHelper_Write (Gpu_Hal_Context_t *phost, uint32_t dest_flash, uint32_t num, const uint8_t *write_data) |
|
Flash_Cmd_Status_t | Gpu_CoCmd_FlashHelper_Update (Gpu_Hal_Context_t *phost, uint32_t dest_flash, uint32_t src_ram, uint32_t num) |
|
Flash_Cmd_Status_t | Gpu_CoCmd_FlashHelper_Read (Gpu_Hal_Context_t *phost, uint32_t dest_ram, uint32_t src_flash, uint32_t num, const uint8_t *read_data) |
|
void | Gpu_CoCmd_FlashHelper_Erase (Gpu_Hal_Context_t *phost) |
|
void | Gpu_CoCmd_FlashHelper_ClearCache (Gpu_Hal_Context_t *phost) |
|
uint8_t | Gpu_CoCmd_FlashHelper_GetState (Gpu_Hal_Context_t *phost) |
|
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.
- Author
- Bridgetek
- Date
- 2018
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 Gpu_Hal.h.