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
bt8xxemu.h
Go to the documentation of this file.
1
32#ifndef BT8XXEMU_H
33#define BT8XXEMU_H
34
35#ifdef _MSC_VER
36#pragma warning(push)
37#pragma warning(disable : 26812) // Unscoped enum
38#endif
39
40#include "bt8xxemu_inttypes.h"
41
42#ifndef EVE_TCHAR_DEFINED
43#define EVE_TCHAR_DEFINED
44#ifdef _WIN32
45typedef wchar_t eve_tchar_t;
46#else
47typedef char eve_tchar_t;
48#endif
49#endif
50
51// API version is increased whenever BT8XXEMU_EmulatorParameters format changes or functions are modified
52#define BT8XXEMU_VERSION_API 12
53
54#ifdef BT8XXEMU_REMOTE
55#ifndef _WIN32
56#undef BT8XXEMU_REMOTE /* Not yet supported */
57#else
58#define BT8XXEMU_STATIC
59#endif
60#endif
61
62#ifndef BT8XXEMU_STATIC
63#ifdef BT8XXEMU_EXPORT_DYNAMIC
64#ifdef _WIN32
65#define BT8XXEMU_API __declspec(dllexport)
66#else
67#define BT8XXEMU_API
68#endif
69#else
70#ifdef _WIN32
71#define BT8XXEMU_API __declspec(dllimport)
72#else
73#define BT8XXEMU_API
74#endif
75#endif
76#else
77#define BT8XXEMU_API
78#endif
79
80#ifdef __cplusplus
81
82namespace BT8XXEMU
83{
84class Emulator;
85class Flash;
86}
87
88typedef BT8XXEMU::Emulator BT8XXEMU_Emulator;
89typedef BT8XXEMU::Flash BT8XXEMU_Flash;
90
91#elif defined(BT8XXEMU_REMOTE)
92
93typedef struct BT8XXEMUC_Remote BT8XXEMU_Emulator;
94typedef struct BT8XXEMUC_Remote BT8XXEMU_Flash;
95
96#else
97
98typedef void BT8XXEMU_Emulator;
99typedef void BT8XXEMU_Flash;
100
101#endif /* #ifdef __cplusplus */
102
109
127
146
176
177typedef struct
178{
180 void (*Main)(BT8XXEMU_Emulator *sender, void *context);
182 int Flags;
185
190
193
195 void (*MCUSleep)(BT8XXEMU_Emulator *sender, void *context, int ms);
196
199 eve_tchar_t RomFilePath[260];
202 eve_tchar_t OtpFilePath[260];
205 eve_tchar_t CoprocessorRomFilePath[260];
206
224 int (*Graphics)(BT8XXEMU_Emulator *sender, void *context, int output, const argb8888 *buffer, uint32_t hsize, uint32_t vsize, BT8XXEMU_FrameFlags flags);
225
226 // Interrupt handler
227 // void (*Interrupt)(void *sender, void *context);
228
230 void (*Log)(BT8XXEMU_Emulator *sender, void *context, BT8XXEMU_LogType type, const char *message);
231
233 void (*Close)(BT8XXEMU_Emulator *sender, void *context);
234
237
240
242
243typedef struct
244{
246 eve_tchar_t DeviceType[26];
247
249 ptrdiff_t SizeBytes;
250
252 eve_tchar_t DataFilePath[260];
253
255 eve_tchar_t StatusFilePath[260];
256
265
267 int StdOut;
268
274 void *Data;
275 ptrdiff_t DataSizeBytes;
276
278 void (*Log)(BT8XXEMU_Flash *sender, void *context, BT8XXEMU_LogType type, const char *message);
279
282
284
285#ifdef __cplusplus
286extern "C" {
287#endif
288
290// INIT //
292
295
296BT8XXEMU_API extern const char *BT8XXEMU_version();
297
300
302BT8XXEMU_API extern void BT8XXEMU_run(uint32_t versionApi, BT8XXEMU_Emulator **emulator, const BT8XXEMU_EmulatorParameters *params);
303
306
309
313
315// RUNTIME //
317
320
323
326
330
332// ADVANCED //
334
336
337BT8XXEMU_API extern void BT8XXEMU_touchSetXY(BT8XXEMU_Emulator *emulator, int idx, int x, int y, int pressure);
338
341
345
347// FLASH //
349
351#ifndef BT8XXEMU_FLASH_LIBRARY
352
355
358
361
364
365#endif
367
368#ifdef __cplusplus
369} /* extern "C" */
370#endif
371
372#ifdef _MSC_VER
373#pragma warning(pop)
374#endif
375
376#endif /* #ifndef BT8XXEMU_H */
377
378/* end of file */
unsigned int uint32_t
unsigned char uint8_t
static ft_uint32_t ft_uint8_t * buffer
Definition FT_Gpu_Hal.h:139
BT8XXEMU_API uint8_t BT8XXEMU_Flash_transferSpi4(BT8XXEMU_Flash *flash, uint8_t signal)
BT8XXEMU_API void BT8XXEMU_defaults(uint32_t versionApi, BT8XXEMU_EmulatorParameters *params, BT8XXEMU_EmulatorMode mode)
BT8XXEMU_API void BT8XXEMU_touchSetXY(BT8XXEMU_Emulator *emulator, int idx, int x, int y, int pressure)
BT8XXEMU_API void BT8XXEMU_Flash_defaults(uint32_t versionApi, BT8XXEMU_FlashParameters *params)
BT8XXEMU_API int BT8XXEMU_isRunning(BT8XXEMU_Emulator *emulator)
BT8XXEMU_API void BT8XXEMU_stop(BT8XXEMU_Emulator *emulator)
BT8XXEMU_API void BT8XXEMU_Flash_destroy(BT8XXEMU_Flash *flash)
BT8XXEMU_API BT8XXEMU_Flash * BT8XXEMU_Flash_create(uint32_t versionApi, const BT8XXEMU_FlashParameters *params)
BT8XXEMU_EmulatorFlags
Definition bt8xxemu.h:129
@ BT8XXEMU_EmulatorEnableCoprocessor
Definition bt8xxemu.h:132
@ BT8XXEMU_EmulatorEnableDebugShortkeys
Definition bt8xxemu.h:134
@ BT8XXEMU_EmulatorEnableStdOut
Definition bt8xxemu.h:140
@ BT8XXEMU_EmulatorEnableRegPwmDutyEmulation
Definition bt8xxemu.h:138
@ BT8XXEMU_EmulatorEnableHSFPreview
Definition bt8xxemu.h:143
@ BT8XXEMU_EmulatorEnableGraphicsMultithread
Definition bt8xxemu.h:135
@ BT8XXEMU_EmulatorEnableTouchTransformation
Definition bt8xxemu.h:139
@ BT8XXEMU_EmulatorEnableKeyboard
Definition bt8xxemu.h:130
@ BT8XXEMU_EmulatorEnableDynamicDegrade
Definition bt8xxemu.h:136
@ BT8XXEMU_EmulatorEnableMainPerformance
Definition bt8xxemu.h:142
@ BT8XXEMU_EmulatorEnableMouse
Definition bt8xxemu.h:133
@ BT8XXEMU_EmulatorEnableAudio
Definition bt8xxemu.h:131
@ BT8XXEMU_EmulatorEnableBackgroundPerformance
Definition bt8xxemu.h:141
BT8XXEMU_EmulatorMode
Definition bt8xxemu.h:111
@ BT8XXEMU_EmulatorFT811
Definition bt8xxemu.h:115
@ BT8XXEMU_EmulatorBT817
Definition bt8xxemu.h:124
@ BT8XXEMU_EmulatorBT883
Definition bt8xxemu.h:121
@ BT8XXEMU_EmulatorFT813
Definition bt8xxemu.h:117
@ BT8XXEMU_EmulatorFT800
Definition bt8xxemu.h:112
@ BT8XXEMU_EmulatorBT818
Definition bt8xxemu.h:125
@ BT8XXEMU_EmulatorBT880
Definition bt8xxemu.h:118
@ BT8XXEMU_EmulatorBT815
Definition bt8xxemu.h:122
@ BT8XXEMU_EmulatorBT881
Definition bt8xxemu.h:119
@ BT8XXEMU_EmulatorBT816
Definition bt8xxemu.h:123
@ BT8XXEMU_EmulatorBT882
Definition bt8xxemu.h:120
@ BT8XXEMU_EmulatorFT801
Definition bt8xxemu.h:113
@ BT8XXEMU_EmulatorFT810
Definition bt8xxemu.h:114
@ BT8XXEMU_EmulatorFT812
Definition bt8xxemu.h:116
BT8XXEMU_LogType
Definition bt8xxemu.h:104
@ BT8XXEMU_LogError
Definition bt8xxemu.h:105
@ BT8XXEMU_LogMessage
Definition bt8xxemu.h:107
@ BT8XXEMU_LogWarning
Definition bt8xxemu.h:106
char eve_tchar_t
Definition bt8xxemu.h:47
BT8XXEMU_FrameFlags
Definition bt8xxemu.h:169
@ BT8XXEMU_FrameBufferChanged
Definition bt8xxemu.h:170
@ BT8XXEMU_FrameBufferComplete
Definition bt8xxemu.h:171
@ BT8XXEMU_FrameSwap
Definition bt8xxemu.h:173
@ BT8XXEMU_FrameChanged
Definition bt8xxemu.h:172
BT8XXEMU_API int BT8XXEMU_setFlag(BT8XXEMU_Emulator *emulator, BT8XXEMU_EmulatorFlags flag, int value)
BT8XXEMU_API int BT8XXEMU_hasInterrupt(BT8XXEMU_Emulator *emulator)
BT8XXEMU_API uint8_t BT8XXEMU_transfer(BT8XXEMU_Emulator *emulator, uint8_t data)
BT8XXEMU_API void BT8XXEMU_touchResetXY(BT8XXEMU_Emulator *emulator, int idx)
BT8XXEMU_API void BT8XXEMU_destroy(BT8XXEMU_Emulator *emulator)
BT8XXEMU_API void BT8XXEMU_chipSelect(BT8XXEMU_Emulator *, int cs)
BT8XXEMU_API const char * BT8XXEMU_version()
#define BT8XXEMU_API
Definition bt8xxemu.h:73
void BT8XXEMU_Flash
Definition bt8xxemu.h:99
void BT8XXEMU_Emulator
Definition bt8xxemu.h:98
BT8XXEMU_API void BT8XXEMU_run(uint32_t versionApi, BT8XXEMU_Emulator **emulator, const BT8XXEMU_EmulatorParameters *params)
BT8XX Emulator Library.
uint32_t argb8888
BT8XXEMU_EmulatorMode Mode
Definition bt8xxemu.h:184
BT8XXEMU_Flash * Flash
Definition bt8xxemu.h:239