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_HalDefs.h
Go to the documentation of this file.
1
36#ifndef EVE_HAL_INCL__H
37#define EVE_HAL_INCL__H
38#include "EVE_GpuTypes.h"
39
40#if EVE_ENABLE_FATFS
41#include "ff.h"
42#endif
43
44/**********
45** ENUMS **
46**********/
47
54
63
70
88
89#define RAM_ERR_REPORT_MAX 128
90
91/************
92** STRUCTS **
93************/
94
96typedef bool (*EVE_Callback)(EVE_HalContext *phost);
97
99typedef int (*EVE_CoCmdHook)(EVE_HalContext *phost, uint32_t cmd, uint32_t state);
101typedef void (*EVE_ResetCallback)(EVE_HalContext *phost, bool fault);
102
103#if defined(EVE_MULTI_GRAPHICS_TARGET)
104typedef struct EVE_GpuDefs
105{
106 uint32_t RegId;
107 uint32_t RegCpuReset;
108 uint32_t RegJ1Int;
109 uint32_t RegCmdRead;
110 uint32_t RegTouchTransformA;
111 uint32_t RegCrc;
112 uint32_t RegTrim;
113 uint32_t RegTouchDirectXY;
114 uint32_t RegDatestamp;
115 uint32_t RegCmdBSpace;
116 uint32_t RegTracker;
117 uint32_t RamDl;
118 uint32_t RomFontTableAddress;
119 uint32_t RamGSize;
120 uint32_t LowFreqBound;
121 uint32_t BitmapAddrMask;
122 uint32_t ScissorSizeShift;
123} EVE_GpuDefs;
124
125extern EVE_GpuDefs EVE_GpuDefs_FT80X;
126extern EVE_GpuDefs EVE_GpuDefs_FT81X;
127extern EVE_GpuDefs EVE_GpuDefs_BT88X;
128extern EVE_GpuDefs EVE_GpuDefs_BT81X;
129#endif
130
141
150
152typedef struct EVE_HalParameters
153{
155
158
159#if defined(EVE_MULTI_PLATFORM_TARGET)
160 EVE_HOST_T Host;
161#endif
162
163#if defined(BT8XXEMU_PLATFORM)
164 void *EmulatorParameters;
165 void *EmulatorFlashParameters;
166#endif
167
168#if defined(BT8XXEMU_PLATFORM)
169 uint32_t EmulatorMode;
170#endif
171
172#if defined(MPSSE_PLATFORM)
173 uint32_t MpsseChannelNo;
174#endif
175
176#if defined(FT9XX_PLATFORM) || defined(FT4222_PLATFORM) || defined(RP2040_PLATFORM)
179#endif
180
181#if defined(RP2040_PLATFORM)
182 uint8_t SpiSckPin;
183 uint8_t SpiMosiPin;
184 uint8_t SpiMisoPin;
185#endif
186
187#if defined(FT9XX_PLATFORM) || defined(FT4222_PLATFORM) || defined(MPSSE_PLATFORM) || defined(RP2040_PLATFORM)
189#endif
190
191#if defined(FT4222_PLATFORM) || defined(MPSSE_PLATFORM)
192 uint16_t SpiClockrateKHz;
193#endif
194
196
197#if (EVE_DL_OPTIMIZE) || (EVE_DL_CACHE_SCISSOR) || (EVE_SUPPORT_CHIPID < EVE_FT810) || defined(EVE_MULTI_GRAPHICS_TARGET)
198#define EVE_DL_STATE phost->DlState[phost->DlStateIndex]
199typedef struct EVE_HalDlState
200{
201 // Keep to a minimum
202#if (EVE_DL_OPTIMIZE)
203#if (EVE_SUPPORT_CHIPID >= EVE_FT810)
205#endif
209#endif
210#if (EVE_SUPPORT_CHIPID < EVE_FT810) || defined(EVE_MULTI_GRAPHICS_TARGET)
211 int16_t VertexTranslateX;
212 int16_t VertexTranslateY;
213#endif
214#if (EVE_DL_CACHE_SCISSOR)
219#endif
220#if (EVE_DL_OPTIMIZE)
224#endif
226#if (EVE_DL_OPTIMIZE)
228#endif
230#endif
231
232typedef struct EVE_HalContext
233{
236
239
244
245#if EVE_CMD_HOOKS
246 /* Hook into coprocessor commands. Called when EVE_CoCmd interface is used. Return 1 to abort the command. Useful for an optimization routine */
247 EVE_CoCmdHook CoCmdHook;
248#endif
249
251
252#if defined(EVE_MULTI_PLATFORM_TARGET)
253 EVE_HOST_T Host;
254#endif
255#if defined(EVE_MULTI_GRAPHICS_TARGET)
256 EVE_CHIPID_T ChipId;
257 uint16_t Revision;
258 const EVE_GpuDefs *GpuDefs;
259#endif
260
262
268
271#if defined(BT8XXEMU_PLATFORM)
272 void *Emulator;
273 void *EmulatorFlash;
274 void *EmulatorParameters; /* Copy for powerCycle */
275#endif
276#if defined(FT4222_PLATFORM) | defined(MPSSE_PLATFORM)
277 void *SpiHandle;
278 void *GpioHandle;
279#endif
280#if defined(RP2040_PLATFORM)
281 void *SpiPort; /* SPI port */
282#endif
283
284#if defined(FT4222_PLATFORM) | defined(MPSSE_PLATFORM)
287 uint16_t SpiClockrateKHz;
288#endif
292#if defined(MPSSE_PLATFORM)
293 uint32_t MpsseChannelNo;
294#endif
295#if defined(FT9XX_PLATFORM) || defined(FT4222_PLATFORM) || defined(RP2040_PLATFORM)
297#endif
298#if defined(RP2040_PLATFORM)
299 uint8_t SpiSckPin;
300 uint8_t SpiMosiPin;
301 uint8_t SpiMisoPin;
302#endif
303#if defined(FT9XX_PLATFORM) || defined(FT4222_PLATFORM) || defined(MPSSE_PLATFORM) || defined(RP2040_PLATFORM)
305#endif
307
310#if defined(EVE_BUFFER_WRITES) || defined(FT4222_PLATFORM)
311 uint8_t SpiWrBuf[0xFFFF];
312 uint32_t SpiWrBufIndex;
313 uint32_t SpiRamGAddr;
314#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
316 bool SpiWpWriting;
317 bool SpiWpWritten;
318 uint16_t SpiWpWrite;
319#endif
320#endif
322
327
329#if !defined(EVE_SUPPORT_CMDB) || defined(EVE_MULTI_GRAPHICS_TARGET)
330 uint16_t CmdWp;
331#endif
333
336#if defined(EVE_SUPPORT_MEDIAFIFO)
339#if EVE_ENABLE_FATFS
341#else
342 void *LoadFileHandle;
343#endif
345#endif
347
350#if (EVE_DL_OPTIMIZE) || (EVE_DL_CACHE_SCISSOR) || (EVE_SUPPORT_CHIPID < EVE_FT810) || defined(EVE_MULTI_GRAPHICS_TARGET)
353#endif
354#if (EVE_DL_OPTIMIZE)
359#endif
360#if (EVE_SUPPORT_CHIPID >= EVE_FT810)
362#endif
364
365#if defined(_DEBUG)
368#endif
369
372 bool CmdFunc;
373 bool CmdFault;
376
378
384
385/*********
386** INIT **
387*********/
388
391
394
397
400
402EVE_HAL_EXPORT void EVE_Hal_info(EVE_DeviceInfo *deviceInfo, size_t deviceIdx);
403
405EVE_HAL_EXPORT bool EVE_Hal_isDevice(EVE_HalContext *phost, size_t deviceIdx);
406
409
412EVE_HAL_EXPORT void EVE_Hal_defaultsEx(EVE_HalParameters *parameters, size_t deviceIdx);
413
415EVE_HAL_EXPORT bool EVE_Hal_open(EVE_HalContext *phost, const EVE_HalParameters *parameters);
416
419
424
425/*************
426** TRANSFER **
427*************/
428
431
438EVE_HAL_EXPORT uint32_t EVE_Hal_transferString(EVE_HalContext *phost, const char *str, uint32_t index, uint32_t size, uint32_t padMask);
440
444
445/*********************
446** TRANSFER HELPERS **
447*********************/
448
451
456
462EVE_HAL_EXPORT void EVE_Hal_wrString(EVE_HalContext *phost, uint32_t addr, const char *str, uint32_t index, uint32_t size, uint32_t padMask);
464
465/*********
466** CAPS **
467*********/
468
471
474{
475 return (EVE_CHIPID & 0x01) == 0x01;
476}
477
480{
481 return !EVE_Hal_isScreenCapacitive(phost);
482}
483
484static inline bool EVE_Hal_supportHsf(EVE_HalContext *phost)
485{
486#ifdef EVE_SUPPORT_HSF
487 return EVE_CHIPID >= EVE_BT817;
488#else
489 return false;
490#endif
491}
492
493static inline bool EVE_Hal_supportFlash(EVE_HalContext *phost)
494{
495#ifdef EVE_SUPPORT_FLASH
496 return EVE_CHIPID >= EVE_BT815;
497#else
498 return false;
499#endif
500}
501
502static inline bool EVE_Hal_supportCmdB(EVE_HalContext *phost)
503{
504#ifdef EVE_SUPPORT_CMDB
505 return EVE_CHIPID >= EVE_FT810;
506#else
507 return false;
508#endif
509}
510
511static inline bool EVE_Hal_supportMediaFifo(EVE_HalContext *phost)
512{
513#ifdef EVE_SUPPORT_MEDIAFIFO
514 return EVE_CHIPID >= EVE_FT810;
515#else
516 return false;
517#endif
518}
519
520static inline bool EVE_Hal_supportVideo(EVE_HalContext *phost)
521{
522#ifdef EVE_SUPPORT_VIDEO
523 return EVE_CHIPID >= EVE_FT810;
524#else
525 return false;
526#endif
527}
528
529static inline bool EVE_Hal_supportLargeFont(EVE_HalContext *phost)
530{
531#ifdef EVE_SUPPORT_LARGEFONT
532 return EVE_CHIPID >= EVE_FT810 // FT810 and up, except BT88X range
534#else
535 return false;
536#endif
537}
538
540static inline EVE_CHIPID_T EVE_extendedChipId(int chipId)
541{
542 switch (chipId & 0xFFFF)
543 {
544 case EVE_FT800 & 0xFFFF:
545 case EVE_FT801 & 0xFFFF:
546 return (EVE_CHIPID_T)((chipId & 0xFFFF) | 0x10000);
547 case EVE_FT810 & 0xFFFF:
548 case EVE_FT811 & 0xFFFF:
549 case EVE_FT812 & 0xFFFF:
550 case EVE_FT813 & 0xFFFF:
551 case EVE_BT880 & 0xFFFF:
552 case EVE_BT881 & 0xFFFF:
553 case EVE_BT882 & 0xFFFF:
554 case EVE_BT883 & 0xFFFF:
555 return (EVE_CHIPID_T)((chipId & 0xFFFF) | 0x20000);
556 case EVE_BT815 & 0xFFFF:
557 case EVE_BT816 & 0xFFFF:
558 return (EVE_CHIPID_T)((chipId & 0xFFFF) | 0x30000);
559 case EVE_BT817 & 0xFFFF:
560 case EVE_BT818 & 0xFFFF:
561 return (EVE_CHIPID_T)((chipId & 0xFFFF) | 0x40000);
562 default:
563 break;
564 }
565 return (EVE_CHIPID_T)(chipId & 0xFFFF);
566}
567
569static inline int EVE_shortChipId(EVE_CHIPID_T chipId)
570{
571 return chipId & 0xFFFF;
572}
573
574static inline int EVE_gen(EVE_CHIPID_T chipId)
575{
576 switch (chipId)
577 {
578 case EVE_FT800:
579 case EVE_FT801:
580 return EVE1;
581 case EVE_FT810:
582 case EVE_FT811:
583 case EVE_FT812:
584 case EVE_FT813:
585 case EVE_BT880:
586 case EVE_BT881:
587 case EVE_BT882:
588 case EVE_BT883:
589 return EVE2;
590 case EVE_BT815:
591 case EVE_BT816:
592 return EVE3;
593 case EVE_BT817:
594 case EVE_BT818:
595 return EVE4;
596 default:
597 break;
598 }
599 return 0;
600}
602
603/************
604** UTILITY **
605************/
606
609
611
614
617
620
623
625
628
629/*********
630** HOST **
631*********/
632
635
640
644
645#if (EVE_SUPPORT_CHIPID >= EVE_FT810)
646/* Power down or up ROMs and ADCs.*/
648
649/* This API sets the current strength of supported GPIO/IO group(s) */
651
652/* This API will hold the system reset active,
653EVE_Host_resetRemoval() must be called to release the system reset. */
655
656/* This API will release the system reset,
657and the system will exit reset and behave as after POR,
658settings done through SPI commands will not be affected. */
660#endif
662
663/**********
664** DEBUG **
665**********/
666
669
672EVE_HAL_EXPORT void EVE_Hal_displayMessage(EVE_HalContext *phost, const char *str, uint16_t size);
673
676#define EVE_Hal_displayMessageZ(phost, str) EVE_Hal_displayMessage((phost), (str), (uint16_t)strlen((str)))
678
679/*********
680** MISC **
681*********/
682
685
690
691#endif /* #ifndef EVE_HAL_INCL__H */
692
693/* end of file */
#define EVE_BT818
Definition EVE_Config.h:69
#define EVE_FT811
Definition EVE_Config.h:59
#define EVE_DL_STATE_STACK_SIZE
#define EVE_BT882
Definition EVE_Config.h:64
#define EVE_BT817
Definition EVE_Config.h:68
#define EVE_FT812
Definition EVE_Config.h:60
#define EVE_BT883
Definition EVE_Config.h:65
#define EVE_HAL_EXPORT
#define EVE_FT800
Definition EVE_Config.h:56
#define EVE4
Definition EVE_Config.h:77
#define EVE_BT881
Definition EVE_Config.h:63
#define EVE_FT813
Definition EVE_Config.h:61
#define EVE1
Definition EVE_Config.h:74
#define EVE_BT815
Definition EVE_Config.h:66
#define EVE_BT880
Definition EVE_Config.h:62
#define EVE_CHIPID
#define EVE3
Definition EVE_Config.h:76
#define eve_progmem_const
#define EVE_BT816
Definition EVE_Config.h:67
#define EVE_FT810
Definition EVE_Config.h:58
#define EVE_FT801
Definition EVE_Config.h:57
#define EVE2
Definition EVE_Config.h:75
Defines EVE hardware values.
EVE_81X_GPIO_DRIVE_STRENGTH_T
EVE_PLL_FREQ_T
EVE_SPI_CHANNELS_T
EVE_POWER_MODE_T
EVE_PLL_SOURCE_T
EVE_81X_PLL_FREQ_T
EVE_81X_GPIO_GROUP_T
EVE_HAL_EXPORT bool EVE_Hal_powerCycle(EVE_HalContext *phost, bool up)
Toggle PD_N pin of FT800 board for a power cycle.
EVE_STATUS_T
Definition EVE_HalDefs.h:56
@ EVE_STATUS_READING
Definition EVE_HalDefs.h:59
@ EVE_STATUS_CLOSED
Definition EVE_HalDefs.h:57
@ EVE_STATUS_OPENED
Definition EVE_HalDefs.h:58
@ EVE_STATUS_ERROR
Definition EVE_HalDefs.h:61
@ EVE_STATUS_WRITING
Definition EVE_HalDefs.h:60
EVE_HAL_EXPORT uint64_t EVE_millis64()
Get clock in miliseond.
EVE_HAL_EXPORT uint8_t EVE_Hal_transfer8(EVE_HalContext *phost, uint8_t value)
Write 8 bits to Coprocessor.
EVE_HAL_EXPORT void EVE_Host_powerModeSwitch(EVE_HalContext *phost, EVE_POWER_MODE_T pwrmode)
Switch power mode for Coprocessor.
Definition EVE_Hal.c:369
EVE_HAL_EXPORT uint32_t EVE_Hal_rd32(EVE_HalContext *phost, uint32_t addr)
Read 4 bytes from Coprocessor's memory.
Definition EVE_Hal.c:189
EVE_HAL_EXPORT uint16_t EVE_Hal_transfer16(EVE_HalContext *phost, uint16_t value)
Write 2 bytes to Coprocessor.
EVE_HAL_EXPORT void EVE_Host_padDriveStrength(EVE_HalContext *phost, EVE_81X_GPIO_DRIVE_STRENGTH_T strength, EVE_81X_GPIO_GROUP_T group)
Set the drive strength for various pins.
Definition EVE_Hal.c:453
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.
Definition EVE_Hal.c:206
EVE_HAL_EXPORT void EVE_Hal_wrProgMem(EVE_HalContext *phost, uint32_t addr, eve_progmem_const uint8_t *buffer, uint32_t size)
Write a buffer in ProgMem to Coprocessor's memory.
Definition EVE_Hal.c:278
EVE_HAL_EXPORT void EVE_Hal_defaultsEx(EVE_HalParameters *parameters, size_t deviceIdx)
Setup default parameters for Eve_Hal framework.
Definition EVE_Hal.c:89
EVE_HAL_EXPORT void EVE_Host_pllFreqSelect(EVE_HalContext *phost, EVE_PLL_FREQ_T freq)
Select system clock for Coprocessor.
Definition EVE_Hal.c:358
EVE_HAL_EXPORT bool EVE_Hal_isDevice(EVE_HalContext *phost, size_t deviceIdx)
Check whether the context is the specified device.
EVE_HAL_EXPORT void EVE_Hal_info(EVE_DeviceInfo *deviceInfo, size_t deviceIdx)
Get info of the specified device. Devices of type EVE_HOST_UNKNOWN should be ignored.
EVE_HAL_EXPORT uint32_t EVE_millis()
Get clock in miliseond.
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
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 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.
Definition EVE_Hal.c:486
EVE_HAL_EXPORT void EVE_Host_powerOffComponents(EVE_HalContext *phost, uint8_t val)
Power off a component.
Definition EVE_Hal.c:441
EVE_HAL_EXPORT int32_t EVE_Hal_clockTrimming(EVE_HalContext *phost, uint32_t lowFreq)
Trim the internal clock till the measured frequency is within the acceptable range.
Definition EVE_Hal.c:317
EVE_HAL_EXPORT void EVE_Host_selectSysClk(EVE_HalContext *phost, EVE_81X_PLL_FREQ_T freq)
Set system clock for Coprocessor.
Definition EVE_Hal.c:390
static int EVE_gen(EVE_CHIPID_T chipId)
EVE_HAL_EXPORT void EVE_Hal_hostCommand(EVE_HalContext *phost, uint8_t cmd)
Send a host command to Coprocessor.
EVE_TRANSFER_T
Definition EVE_HalDefs.h:65
@ EVE_TRANSFER_WRITE
Definition EVE_HalDefs.h:68
@ EVE_TRANSFER_NONE
Definition EVE_HalDefs.h:66
@ EVE_TRANSFER_READ
Definition EVE_HalDefs.h:67
EVE_HAL_EXPORT bool EVE_Hal_open(EVE_HalContext *phost, const EVE_HalParameters *parameters)
Open the Eve_Hal framework.
Definition EVE_Hal.c:103
EVE_HAL_EXPORT void EVE_Hal_setSPI(EVE_HalContext *phost, EVE_SPI_CHANNELS_T numchnls, uint8_t numdummy)
Set number of SPI channel.
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.
EVE_MODE_T
Definition EVE_HalDefs.h:49
@ EVE_MODE_SPI
Definition EVE_HalDefs.h:52
@ EVE_MODE_UNKNOWN
Definition EVE_HalDefs.h:50
@ EVE_MODE_I2C
Definition EVE_HalDefs.h:51
static bool EVE_Hal_supportCmdB(EVE_HalContext *phost)
EVE_HOST_T
@ EVE_HOST_NB
@ EVE_HOST_UNKNOWN
@ EVE_HOST_EMBEDDED
@ EVE_HOST_FT4222
@ EVE_HOST_MPSSE
@ EVE_HOST_BT8XXEMU
EVE_HAL_EXPORT void EVE_Hal_idle(EVE_HalContext *phost)
Idle handler for Eve_Hal framework.
Definition EVE_Hal.c:136
EVE_HAL_EXPORT void EVE_Host_resetActive(EVE_HalContext *phost)
Hold the device in reset state.
Definition EVE_Hal.c:463
static int EVE_shortChipId(EVE_CHIPID_T chipId)
static bool EVE_Hal_supportHsf(EVE_HalContext *phost)
EVE_HAL_EXPORT size_t EVE_Hal_list()
List the available devices.
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.
static bool EVE_Hal_isScreenCapacitive(EVE_HalContext *phost)
static bool EVE_Hal_supportVideo(EVE_HalContext *phost)
static bool EVE_Hal_supportFlash(EVE_HalContext *phost)
EVE_HAL_EXPORT void EVE_Host_clockSelect(EVE_HalContext *phost, EVE_PLL_SOURCE_T pllsource)
Select clock source for Coprocessor.
Definition EVE_Hal.c:347
static EVE_CHIPID_T EVE_extendedChipId(int chipId)
EVE_HAL_EXPORT void EVE_sleep(uint32_t ms)
Sleep in milisecond.
static bool EVE_Hal_supportLargeFont(EVE_HalContext *phost)
EVE_HAL_EXPORT void EVE_Hal_wr8(EVE_HalContext *phost, uint32_t addr, uint8_t v)
Write 8 bits to Coprocessor's memory.
Definition EVE_Hal.c:220
EVE_HAL_EXPORT void EVE_Host_resetRemoval(EVE_HalContext *phost)
Exit reset state, Eve will power on and enter into its default state.
Definition EVE_Hal.c:473
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_Host_coreReset(EVE_HalContext *phost)
Send reset signal to Coprocessor.
Definition EVE_Hal.c:379
EVE_HAL_EXPORT void EVE_Hal_close(EVE_HalContext *phost)
Close the Eve_Hal framework.
Definition EVE_Hal.c:116
EVE_HAL_EXPORT void EVE_Hal_wr16(EVE_HalContext *phost, uint32_t addr, uint16_t v)
Write 2 bytes to Coprocessor's memory.
Definition EVE_Hal.c:234
EVE_HAL_EXPORT void EVE_Hal_wrString(EVE_HalContext *phost, uint32_t addr, const char *str, uint32_t index, uint32_t size, uint32_t padMask)
Write a string to Coprocessor's memory.
Definition EVE_Hal.c:295
#define RAM_ERR_REPORT_MAX
Definition EVE_HalDefs.h:89
static bool EVE_Hal_isScreenResistive(EVE_HalContext *phost)
static bool EVE_Hal_supportMediaFifo(EVE_HalContext *phost)
void(* EVE_ResetCallback)(EVE_HalContext *phost, bool fault)
int(* EVE_CoCmdHook)(EVE_HalContext *phost, uint32_t cmd, uint32_t state)
Definition EVE_HalDefs.h:99
EVE_HAL_EXPORT void EVE_Hal_restoreSPI(EVE_HalContext *phost)
EVE_HAL_EXPORT void EVE_Hal_wr32(EVE_HalContext *phost, uint32_t addr, uint32_t v)
Write 4 bytes to Coprocessor's memory.
Definition EVE_Hal.c:248
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.
Definition EVE_Hal.c:263
EVE_HAL_EXPORT void EVE_Hal_endTransfer(EVE_HalContext *phost)
End data transfer.
EVE_HAL_EXPORT uint8_t EVE_Hal_rd8(EVE_HalContext *phost, uint32_t addr)
Read 8 bits from Coprocessor's memory.
Definition EVE_Hal.c:157
EVE_HAL_EXPORT void EVE_Hal_defaults(EVE_HalParameters *parameters)
Setup default parameters for Eve_Hal framework.
Definition EVE_Hal.c:78
EVE_HAL_EXPORT uint32_t EVE_Hal_currentFrequency(EVE_HalContext *phost)
Get current system clock of Coprocessor.
EVE_CHIPID_T
Definition EVE_HalDefs.h:72
@ EVE_CHIPID_BT817
Definition EVE_HalDefs.h:85
@ EVE_CHIPID_BT880
Definition EVE_HalDefs.h:79
@ EVE_CHIPID_FT812
Definition EVE_HalDefs.h:77
@ EVE_CHIPID_BT816
Definition EVE_HalDefs.h:84
@ EVE_CHIPID_FT810
Definition EVE_HalDefs.h:75
@ EVE_CHIPID_BT882
Definition EVE_HalDefs.h:81
@ EVE_CHIPID_FT813
Definition EVE_HalDefs.h:78
@ EVE_CHIPID_FT801
Definition EVE_HalDefs.h:74
@ EVE_CHIPID_BT818
Definition EVE_HalDefs.h:86
@ EVE_CHIPID_BT881
Definition EVE_HalDefs.h:80
@ EVE_CHIPID_BT883
Definition EVE_HalDefs.h:82
@ EVE_CHIPID_BT815
Definition EVE_HalDefs.h:83
@ EVE_CHIPID_FT811
Definition EVE_HalDefs.h:76
@ EVE_CHIPID_FT800
Definition EVE_HalDefs.h:73
EVE_HAL_EXPORT void EVE_Hal_flush(EVE_HalContext *phost)
Flush data to Coprocessor.
EVE_HAL_EXPORT EVE_HalPlatform * EVE_Hal_initialize()
Eve_Hal framework initialization.
Definition EVE_Hal.c:52
EVE_HAL_EXPORT void EVE_Hal_hostCommandExt3(EVE_HalContext *phost, uint32_t cmd)
This API sends a 3byte command to the phost.
EVE_HAL_EXPORT uint32_t EVE_Hal_transfer32(EVE_HalContext *phost, uint32_t value)
Write 4 bytes to Coprocessor.
EVE_HAL_EXPORT void EVE_Hal_release()
Close Eve_Hal framework.
Definition EVE_Hal.c:64
bool(* EVE_Callback)(EVE_HalContext *phost)
Definition EVE_HalDefs.h:96
unsigned short uint16_t
int int32_t
unsigned int uint32_t
short int16_t
unsigned long long uint64_t
unsigned char uint8_t
#define bool
static ft_uint32_t ft_uint8_t * buffer
Definition FT_Gpu_Hal.h:139
static ft_void_t ft_uint32_t * cmd
Definition FT_Gpu_Hal.h:184
static ft_uint32_t addr
Definition FT_Gpu_Hal.h:139
char DisplayName[256]
char SerialNumber[16]
EVE_HOST_T Host
uint32_t Height
uint8_t CmdBuffer[4]
uint32_t MediaFifoAddress
uint32_t MediaFifoSize
uint32_t CoBgColor
uint8_t CoScratchHandle
void * LibraryContext
EVE_Callback CbCmdWait
uint8_t DlPrimitive
uint8_t DlStateIndex
ptrdiff_t LoadFileRemaining
uint8_t CmdBufferIndex
bool DebugMessageVisible
uint8_t PowerDownPin
uint8_t DebugBackup[RAM_ERR_REPORT_MAX]
EVE_HalDlState DlState[EVE_DL_STATE_STACK_SIZE]
EVE_ResetCallback CbCoprocessorReset
EVE_SPI_CHANNELS_T SpiChannels
EVE_STATUS_T Status
uint16_t CmdSpace
uint32_t CoFgColor
uint8_t SpiDummyBytes
uint32_t PaletteSource
int16_t LineWidth
uint8_t VertexFormat
uint16_t ScissorY
uint16_t ScissorHeight
uint32_t ColorRGB
int16_t PointSize
uint16_t ScissorWidth
uint16_t ScissorX
EVE_Callback CbCmdWait
uint32_t OpenedDevices
Definition ff.h:205