mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-26 10:26:09 +03:00
0154018363
* FBT: cdefines to env, libs order * API: strtod, modf, itoa, calloc * Apps: elk js * Apps: mjs * JS: scripts as assets * mjs: composite resolver * mjs: stack trace * ELK JS example removed * MJS thread, MJS lib modified to support script interruption * JS console UI * Module system, BadUSB bindings rework * JS notifications, simple dialog, BadUSB demo * Custom dialogs, dialog demo * MJS as system library, some dirty hacks to make it compile * Plugin-based js modules * js_uart(BadUART) module * js_uart: support for byte array arguments * Script icon and various fixes * File browser: multiple extensions filter, running js scripts from app loader * Running js scripts from archive browser * JS Runner as system app * Example scripts moved to /ext/apps/Scripts * JS bytecode listing generation * MJS builtin printf cleanup * JS examples cleanup * mbedtls version fix * Unused lib cleanup * Making PVS happy & TODOs cleanup * TODOs cleanup #2 * MJS: initial typed arrays support * JS: fix mem leak in uart destructor Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
41 lines
882 B
C
41 lines
882 B
C
/*
|
|
* Copyright (c) 2016 Cesanta Software Limited
|
|
* All rights reserved
|
|
*/
|
|
|
|
#ifndef MJS_FFI_PUBLIC_H_
|
|
#define MJS_FFI_PUBLIC_H_
|
|
|
|
#include "mjs_core_public.h"
|
|
|
|
#if defined(__cplusplus)
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
enum mjs_ffi_ctype {
|
|
MJS_FFI_CTYPE_NONE,
|
|
MJS_FFI_CTYPE_USERDATA,
|
|
MJS_FFI_CTYPE_CALLBACK,
|
|
MJS_FFI_CTYPE_INT,
|
|
MJS_FFI_CTYPE_BOOL,
|
|
MJS_FFI_CTYPE_DOUBLE,
|
|
MJS_FFI_CTYPE_FLOAT,
|
|
MJS_FFI_CTYPE_CHAR_PTR,
|
|
MJS_FFI_CTYPE_VOID_PTR,
|
|
MJS_FFI_CTYPE_STRUCT_MG_STR_PTR,
|
|
MJS_FFI_CTYPE_STRUCT_MG_STR,
|
|
MJS_FFI_CTYPE_INVALID,
|
|
};
|
|
|
|
typedef void*(mjs_ffi_resolver_t)(void* handle, const char* symbol);
|
|
|
|
void mjs_set_ffi_resolver(struct mjs* mjs, mjs_ffi_resolver_t* dlsym, void* handle);
|
|
|
|
void* mjs_ffi_resolve(struct mjs* mjs, const char* symbol);
|
|
|
|
#if defined(__cplusplus)
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* MJS_FFI_PUBLIC_H_ */
|