mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-09 16:35:06 +00:00
![wenyongh](/assets/img/avatar_default.png)
* Implement memory profiler, optimize memory usage, modify code indent * Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default * Add a new extension library: connection * Fix bug of reading magic number and version in big endian platform * Re-org platform APIs: move most platform APIs from iwasm to shared-lib * Enhance wasm loader to fix some security issues * Fix issue about illegal load of EXC_RETURN into PC on stm32 board * Updates that let a restricted version of the interpreter run in SGX * Enable native/app address validation and conversion for wasm app * Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused * Refine binary size and fix several minor issues Optimize interpreter LOAD/STORE opcodes to decrease the binary size Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper Add macros of global heap size, stack size, heap size for Zephyr main.c Clear compile warning of wasm_application.c * Add more strict security checks for libc wrapper API's * Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files * Enhance security of libc strcpy/sprintf wrapper function * Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions * Remove get_module_inst() and fix issue of call native * Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate * Refine interpreter call native process, refine memory boudary check * Fix issues of invokeNative function of arm/mips/general version * Add a switch to build simple sample without gui support * Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code * Re-org shared lib header files, remove unused info; fix compile issues of vxworks * Add build target general * Remove unused files * Update license header * test push * Restore file * Sync up with internal/feature * Sync up with internal/feature * Rename build_wamr_app to build_wasm_app * Fix small issues of README * Enhance malformed wasm file checking Fix issue of print hex int and implement utf8 string check Fix wasi file read/write right issue Fix minor issue of build wasm app doc * Sync up with internal/feature * Sync up with internal/feature: fix interpreter arm issue, fix read leb issue * Sync up with internal/feature * Fix bug of config.h and rename wasi config.h to ssp_config.h * Sync up with internal/feature * Import wamr aot * update document * update document * Update document, disable WASI in 32bit * update document * remove files * update document * Update document * update document * update document * update samples * Sync up with internal repo
92 lines
2.5 KiB
C
92 lines
2.5 KiB
C
#ifndef DISPLAY_INDEV_H_
|
|
#define DISPLAY_INDEV_H_
|
|
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
#include <inttypes.h>
|
|
#include "bh_platform.h"
|
|
#include "wasm_export.h"
|
|
|
|
#define USE_MOUSE 1
|
|
typedef union {
|
|
struct {
|
|
uint8_t blue;
|
|
uint8_t green;
|
|
uint8_t red;
|
|
uint8_t alpha;
|
|
};
|
|
uint32_t full;
|
|
} lv_color32_t;
|
|
|
|
typedef lv_color32_t lv_color_t;
|
|
typedef uint8_t lv_indev_state_t;
|
|
typedef int16_t lv_coord_t;
|
|
typedef uint8_t lv_opa_t;
|
|
typedef struct {
|
|
lv_coord_t x;
|
|
lv_coord_t y;
|
|
} lv_point_t;
|
|
|
|
typedef struct {
|
|
union {
|
|
lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/
|
|
uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
|
|
uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/
|
|
int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/
|
|
};
|
|
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
|
|
lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/
|
|
} lv_indev_data_t;
|
|
|
|
enum {
|
|
LV_INDEV_STATE_REL = 0, LV_INDEV_STATE_PR
|
|
};
|
|
enum {
|
|
LV_OPA_TRANSP = 0,
|
|
LV_OPA_0 = 0,
|
|
LV_OPA_10 = 25,
|
|
LV_OPA_20 = 51,
|
|
LV_OPA_30 = 76,
|
|
LV_OPA_40 = 102,
|
|
LV_OPA_50 = 127,
|
|
LV_OPA_60 = 153,
|
|
LV_OPA_70 = 178,
|
|
LV_OPA_80 = 204,
|
|
LV_OPA_90 = 229,
|
|
LV_OPA_100 = 255,
|
|
LV_OPA_COVER = 255,
|
|
};
|
|
|
|
extern void xpt2046_init(void);
|
|
|
|
extern bool touchscreen_read(lv_indev_data_t * data);
|
|
|
|
extern bool mouse_read(lv_indev_data_t * data);
|
|
|
|
extern void display_init(wasm_exec_env_t exec_env);
|
|
|
|
extern void display_deinit(wasm_exec_env_t exec_env);
|
|
|
|
extern int time_get_ms(wasm_exec_env_t exec_env);
|
|
|
|
extern void display_flush(wasm_exec_env_t exec_env,
|
|
int32_t x1, int32_t y1, int32_t x2, int32_t y2,
|
|
int32 color_p_offset);
|
|
|
|
extern void display_fill(wasm_exec_env_t exec_env,
|
|
int32_t x1, int32_t y1, int32_t x2, int32_t y2,
|
|
lv_color_t color_p);
|
|
|
|
extern void display_map(wasm_exec_env_t exec_env,
|
|
int32_t x1, int32_t y1, int32_t x2, int32_t y2,
|
|
const lv_color_t * color_p);
|
|
|
|
extern bool display_input_read(wasm_exec_env_t exec_env,
|
|
int32 data_offset);
|
|
|
|
void display_vdb_write(wasm_exec_env_t exec_env,
|
|
int32 buf_offset, lv_coord_t buf_w, lv_coord_t x,
|
|
lv_coord_t y, int32 color_p_offset, lv_opa_t opa);
|
|
|
|
#endif
|
|
|