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_Util.h
Go to the documentation of this file.
1
32#ifndef EVE_UTIL__H
33#define EVE_UTIL__H
34#include "EVE_HalDefs.h"
35
36/***************
37** PARAMETERS **
38***************/
39
41{
44
47
49#if (EVE_SUPPORT_CHIPID >= EVE_FT810) || defined(EVE_MULTI_GRAPHICS_TARGET)
52#endif
53
55
57{
77 bool Dither;
79
80#if (EVE_SUPPORT_CHIPID >= EVE_BT815)
82#endif
83
84#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
85 bool PClk2X;
86 uint16_t PClkFreq;
87 int16_t AhHCycleMax;
88#endif
89
90#ifdef EVE_SUPPORT_HSF
92 int16_t HsfWidth;
93#endif
94
96
128
129/**********************
130** INIT AND SHUTDOWN **
131**********************/
132
135
138
141
144
146EVE_HAL_EXPORT bool EVE_Util_configDefaultsEx(EVE_HalContext *phost, EVE_ConfigParameters *config, uint32_t width, uint32_t height, uint32_t refreshRate, uint32_t hsfWidth);
147
150
153
156
162
166
167/**********************
168** INTERACTIVE SETUP **
169**********************/
170
173
175#if defined(_WIN32)
176EVE_HAL_EXPORT void EVE_Util_selectDeviceInteractive(EVE_CHIPID_T *chipId, size_t *deviceIdx);
177#else
178static inline void EVE_Util_selectDeviceInteractive(EVE_CHIPID_T *chipId, size_t *deviceIdx)
179{
180 *chipId = EVE_SUPPORT_CHIPID;
181 *deviceIdx = -1;
182}
183#endif
184
186#if defined(_WIN32) && defined(EVE_MULTI_GRAPHICS_TARGET)
188#else
190{
191 *display = EVE_DISPLAY_DEFAULT;
192}
193#endif
194
195#if defined(_WIN32) && defined(EVE_FLASH_AVAILABLE)
196EVE_HAL_EXPORT void EVE_Util_selectFlashFileInteractive(eve_tchar_t *flashPath, size_t flashPathSize, bool *updateFlash, bool *updateFlashFirmware, const EVE_HalParameters *params, const eve_tchar_t *flashFile);
197#else
198static inline void EVE_Util_selectFlashFileInteractive(eve_tchar_t *flashPath, size_t flashPathSize, bool *updateFlash, bool *updateFlashFirmware, const EVE_HalParameters *params, const eve_tchar_t *flashFile)
199{
200 flashPath[0] = '\0';
201 *updateFlash = false;
202 *updateFlashFirmware = false;
203}
204#endif
205
206#if defined(_WIN32) && defined(EVE_FLASH_AVAILABLE)
207EVE_HAL_EXPORT void EVE_Util_uploadFlashFileInteractive(EVE_HalContext *phost, const eve_tchar_t *flashPath, bool updateFlashFirmware);
208#else
209static inline void EVE_Util_uploadFlashFileInteractive(EVE_HalContext *phost, const eve_tchar_t *flashPath, bool updateFlashFirmware)
210{
211 /* no-op */
212}
213#endif
214
215#if defined(BT8XXEMU_PLATFORM)
216EVE_HAL_EXPORT void EVE_Util_emulatorDefaults(EVE_HalParameters *params, void *emulatorParams, EVE_CHIPID_T chipId);
217#if defined(EVE_FLASH_AVAILABLE)
218EVE_HAL_EXPORT void EVE_Util_emulatorFlashDefaults(EVE_HalParameters *params, const void *emulatorParams, void *flashParams, const eve_tchar_t *flashPath);
219#endif
220#endif
221
226EVE_HAL_EXPORT bool EVE_Util_openDeviceInteractive(EVE_HalContext *phost, const wchar_t *flashFile);
227
231
233EVE_HAL_EXPORT void EVE_Util_forceFault(EVE_HalContext *phost, const char *err);
234
236#endif /* #ifndef EVE_HAL_INCL__H */
237
238/* end of file */
#define EVE_HAL_EXPORT
char eve_tchar_t
#define EVE_SUPPORT_CHIPID
EVE_SPI_CHANNELS_T
EVE_81X_PLL_FREQ_T
Eve_Hal framework APIs.
EVE_CHIPID_T
Definition EVE_HalDefs.h:72
unsigned short uint16_t
unsigned int uint32_t
short int16_t
unsigned char uint8_t
signed char int8_t
EVE_HAL_EXPORT void EVE_Util_configDefaults(EVE_HalContext *phost, EVE_ConfigParameters *config, EVE_DISPLAY_T display)
Definition EVE_Util.c:765
static void EVE_Util_uploadFlashFileInteractive(EVE_HalContext *phost, const eve_tchar_t *flashPath, bool updateFlashFirmware)
Definition EVE_Util.h:209
EVE_HAL_EXPORT void EVE_Util_forceFault(EVE_HalContext *phost, const char *err)
Definition EVE_Util.c:2614
EVE_HAL_EXPORT void EVE_Util_clearScreen(EVE_HalContext *phost)
Clear the screen.
Definition EVE_Util.c:270
EVE_HAL_EXPORT bool EVE_Util_configDefaultsEx(EVE_HalContext *phost, EVE_ConfigParameters *config, uint32_t width, uint32_t height, uint32_t refreshRate, uint32_t hsfWidth)
Definition EVE_Util.c:740
EVE_HAL_EXPORT bool EVE_Util_openDeviceInteractive(EVE_HalContext *phost, const wchar_t *flashFile)
Definition EVE_Util.c:2521
EVE_HAL_EXPORT void EVE_Util_bootupDefaults(EVE_HalContext *phost, EVE_BootupParameters *bootup)
Definition EVE_Util.c:282
EVE_HAL_EXPORT bool EVE_Util_bootupConfigInteractive(EVE_HalContext *phost, EVE_DISPLAY_T display)
Calls EVE_Util_bootup and EVE_Util_config using the default parameters. Falls back to no interactivit...
Definition EVE_Util.c:2582
static void EVE_Util_selectDeviceInteractive(EVE_CHIPID_T *chipId, size_t *deviceIdx)
Definition EVE_Util.h:178
EVE_HAL_EXPORT bool EVE_Util_config(EVE_HalContext *phost, EVE_ConfigParameters *config)
Definition EVE_Util.c:1396
EVE_HAL_EXPORT bool EVE_Util_resetCoprocessor(EVE_HalContext *phost)
Reset Coprocessor.
Definition EVE_Util.c:1752
EVE_HAL_EXPORT bool EVE_Util_bootup(EVE_HalContext *phost, EVE_BootupParameters *bootup)
Definition EVE_Util.c:1121
EVE_HAL_EXPORT bool EVE_Util_bootupConfig(EVE_HalContext *phost)
Bootup Coprocessor.
Definition EVE_Util.c:1898
static void EVE_Util_selectFlashFileInteractive(eve_tchar_t *flashPath, size_t flashPathSize, bool *updateFlash, bool *updateFlashFirmware, const EVE_HalParameters *params, const eve_tchar_t *flashFile)
Definition EVE_Util.h:198
static void EVE_Util_selectDisplayInteractive(EVE_DISPLAY_T *display)
Definition EVE_Util.h:189
EVE_DISPLAY_T
Definition EVE_Util.h:101
@ EVE_DISPLAY_QVGA_320x240_56Hz
Definition EVE_Util.h:105
@ EVE_DISPLAY_HDTV_1280x720_58Hz
Definition EVE_Util.h:109
@ EVE_DISPLAY_DEFAULT
Definition EVE_Util.h:102
@ EVE_DISPLAY_HVGA_320x480_60Hz
Definition EVE_Util.h:113
@ EVE_DISPLAY_RIVERDI_IPS35_62Hz
Definition EVE_Util.h:119
@ EVE_DISPLAY_RIVERDI_IPS101_59Hz
Definition EVE_Util.h:123
@ EVE_DISPLAY_WSVGA_1024x600_59Hz
Definition EVE_Util.h:108
@ EVE_DISPLAY_RIVERDI_IPS70_59Hz
Definition EVE_Util.h:122
@ EVE_DISPLAY_WQVGA_480x272_60Hz
Definition EVE_Util.h:106
@ EVE_DISPLAY_NB
Definition EVE_Util.h:125
@ EVE_DISPLAY_WVGA_800x480_74Hz
Definition EVE_Util.h:107
@ EVE_DISPLAY_WVGA_800x480_W860_60Hz
Definition EVE_Util.h:116
@ EVE_DISPLAY_RIVERDI_IPS50_63Hz
Definition EVE_Util.h:121
@ EVE_DISPLAY_WXGA_1280x800_57Hz
Definition EVE_Util.h:110
@ EVE_DISPLAY_RIVERDI_IPS43_58Hz
Definition EVE_Util.h:120
EVE_HAL_EXPORT void EVE_Util_shutdown(EVE_HalContext *phost)
Definition EVE_Util.c:1667
EVE_SPI_CHANNELS_T SpiChannels
Definition EVE_Util.h:50
uint8_t SpiDummyBytes
Definition EVE_Util.h:51
EVE_81X_PLL_FREQ_T SystemClock
Definition EVE_Util.h:43