/AliOS-Things-master/components/amp/engine/quickjs_engine/quickjs/ |
A D | quickjs.h | 50 typedef struct JSContext JSContext; typedef 346 JSContext *JS_NewContext(JSRuntime *rt); 347 void JS_FreeContext(JSContext *s); 348 JSContext *JS_DupContext(JSContext *ctx); 351 JSRuntime *JS_GetRuntime(JSContext *ctx); 359 void JS_AddIntrinsicDate(JSContext *ctx); 387 void js_free(JSContext *ctx, void *ptr); 625 JSValue JS_GetException(JSContext *ctx); 628 JSValue JS_NewError(JSContext *ctx); 708 JSValue JS_NewObject(JSContext *ctx); [all …]
|
A D | quickjs-libc.h | 36 JSModuleDef *js_init_module_std(JSContext *ctx, const char *module_name); 37 JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name); 38 void js_std_add_helpers(JSContext *ctx, int argc, char **argv); 39 void js_std_loop(JSContext *ctx); 42 void js_std_dump_error(JSContext *ctx); 43 uint8_t *js_load_file(JSContext *ctx, size_t *pbuf_len, const char *filename); 44 int js_module_set_import_meta(JSContext *ctx, JSValueConst func_val, 46 JSModuleDef *js_module_loader(JSContext *ctx, 48 void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len, 50 void js_std_promise_rejection_tracker(JSContext *ctx, JSValueConst promise,
|
A D | quickjs-libc.c | 136 static int (*os_poll_func)(JSContext *ctx); 148 static JSValue js_printf_internal(JSContext *ctx, in js_printf_internal() 578 JSModuleDef *js_module_loader(JSContext *ctx, in js_module_loader() 2002 static int js_os_poll(JSContext *ctx) in js_os_poll() 2154 static int js_os_poll(JSContext *ctx) in js_os_poll() 2269 static JSValue make_obj_error(JSContext *ctx, in make_obj_error() 2286 static JSValue make_string_error(JSContext *ctx, in make_string_error() 3173 JSContext *ctx; in worker_func() 3743 void js_std_dump_error(JSContext *ctx) in js_std_dump_error() 3763 void js_std_loop(JSContext *ctx) in js_std_loop() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/system/ |
A D | module_system.c | 21 static JSValue native_module_versions(JSContext *ctx, JSValueConst this_val, in native_module_versions() 31 static JSValue native_system_version(JSContext *ctx, JSValueConst this_val, in native_system_version() 39 static JSValue native_system_userjs_version(JSContext *ctx, JSValueConst this_val, in native_system_userjs_version() 47 static JSValue native_get_system_info(JSContext *ctx, JSValueConst this_val, in native_get_system_info() 68 static JSValue native_system_platform(JSContext *ctx, JSValueConst this_val, in native_system_platform() 77 static JSValue native_system_uptime(JSContext *ctx, JSValueConst this_val, in native_system_uptime() 83 static JSValue native_system_memory(JSContext *ctx, JSValueConst this_val, in native_system_memory() 108 static JSValue native_system_gc(JSContext *ctx, JSValueConst this_val, in native_system_gc() 114 static JSValue native_system_reboot(JSContext *ctx, JSValueConst this_val, in native_system_reboot() 126 static int js_system_init(JSContext *ctx) in js_system_init() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/repl/ |
A D | module_repl.c | 22 extern JSContext *js_get_context(void); 29 static JSValue native_repl_open(JSContext *ctx, JSValueConst this_val, in native_repl_open() 37 static JSValue native_repl_close(JSContext *ctx, JSValueConst this_val, in native_repl_close() 50 static JSValue native_repl_puts(JSContext *ctx, JSValueConst this_val, in native_repl_puts() 100 static JSValue native_repl_read(JSContext *ctx, JSValueConst this_val, in native_repl_read() 129 JSContext *ctx = js_get_context(); in repl_read_notify() 160 static JSValue native_repl_setReadHandler(JSContext *ctx, JSValueConst this_val, in native_repl_setReadHandler() 174 JSContext *ctx = js_get_context(); in module_repl_source_clean() 192 static int js_repl_init(JSContext *ctx, JSModuleDef *m) in js_repl_init() 208 JSModuleDef *js_init_module_repl(JSContext *ctx, const char *module_name) in js_init_module_repl() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/log/ |
A D | module_log.c | 48 static JSValue native_set_stdlog_level(JSContext *ctx, JSValueConst this_val, in native_set_stdlog_level() 117 static JSValue native_set_log_file_path(JSContext *ctx, JSValueConst this_val, in native_set_log_file_path() 136 static JSValue native_set_log_file_size(JSContext *ctx, JSValueConst this_val, in native_set_log_file_size() 175 static JSValue native_debug_log_out(JSContext *ctx, JSValueConst this_val, in native_debug_log_out() 190 static JSValue native_info_log_out(JSContext *ctx, JSValueConst this_val, in native_info_log_out() 205 static JSValue native_warn_log_out(JSContext *ctx, JSValueConst this_val, in native_warn_log_out() 220 static JSValue native_error_log_out(JSContext *ctx, JSValueConst this_val, in native_error_log_out() 235 static JSValue native_fatal_log_out(JSContext *ctx, JSValueConst this_val, in native_fatal_log_out() 267 static int js_log_init(JSContext *ctx, JSModuleDef *m) in js_log_init() 283 JSModuleDef *js_init_module_log(JSContext *ctx, const char *module_name) in js_init_module_log() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/blenetcfg/ |
A D | module_blecfgnet.c | 18 static JSValue native_blecfgnet_start(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst… in native_blecfgnet_start() 30 static JSValue native_blecfgnet_recovery_wifi(JSContext *ctx, JSValueConst this_val, int argc, JSVa… in native_blecfgnet_recovery_wifi() 42 static JSValue native_blecfgnet_recovery_devinfo(JSContext *ctx, JSValueConst this_val, int argc, J… in native_blecfgnet_recovery_devinfo() 64 static int js_blecfgnet_init(JSContext *ctx, JSModuleDef *m) in js_blecfgnet_init() 77 JSModuleDef *js_init_module_blecfgnet(JSContext *ctx, const char *module_name) in js_init_module_blecfgnet() 90 JSContext *ctx = js_get_context(); in module_blecfgnet_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/wdg/ |
A D | module_wdg.c | 25 static JSValue native_wdg_start(JSContext *ctx, JSValueConst this_val, in native_wdg_start() 47 static JSValue native_wdg_feed(JSContext *ctx, JSValueConst this_val, in native_wdg_feed() 59 static JSValue native_wdg_stop(JSContext *ctx, JSValueConst this_val, in native_wdg_stop() 82 static int js_wdg_init(JSContext *ctx, JSModuleDef *m) in js_wdg_init() 98 JSModuleDef *js_init_module_wdg(JSContext *ctx, const char *module_name) in js_init_module_wdg() 111 JSContext *ctx = js_get_context(); in module_wdg_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/lcd/ |
A D | module_lcd.c | 27 static JSValue native_lcd_open(JSContext *ctx, JSValueConst this_val, in native_lcd_open() 40 static JSValue native_lcd_close(JSContext *ctx, JSValueConst this_val, in native_lcd_close() 54 static JSValue native_lcd_show(JSContext *ctx, JSValueConst this_val, in native_lcd_show() 90 static JSValue native_lcd_fill(JSContext *ctx, JSValueConst this_val, in native_lcd_fill() 128 static int js_lcd_init(JSContext *ctx, JSModuleDef *m) in js_lcd_init() 144 JSModuleDef *js_init_module_lcd(JSContext *ctx, const char *module_name) in js_init_module_lcd() 157 JSContext *ctx = js_get_context(); in module_lcd_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/cellular/ |
A D | module_cellular.c | 35 static JSValue native_cellular_get_simInfo(JSContext *ctx, JSValueConst this_val, int argc, JSValue… in native_cellular_get_simInfo() 103 JSContext *ctx = js_get_context(); in cellInfo_receive_callback() 138 static JSValue native_cellular_getStatus(JSContext *ctx, JSValueConst this_val, int argc, JSValueCo… in native_cellular_getStatus() 156 JSContext *ctx = js_get_context(); in network_status_notify() 179 static JSValue native_cellular_onconnect(JSContext *ctx, JSValueConst this_val, int argc, JSValueCo… in native_cellular_onconnect() 207 static JSValue native_get_netshare_mode(JSContext *ctx, JSValueConst this_val, int argc, JSValueCon… in native_get_netshare_mode() 217 static JSValue native_set_netshare_mode(JSContext *ctx, JSValueConst this_val, int argc, JSValueCon… in native_set_netshare_mode() 238 static JSValue native_get_netshare_config(JSContext *ctx, JSValueConst this_val, int argc, JSValueC… in native_get_netshare_config() 347 static int js_cellular_init(JSContext *ctx, JSModuleDef *m) in js_cellular_init() 360 JSModuleDef *js_init_module_cellular(JSContext *ctx, const char *module_name) in js_init_module_cellular() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/systimer/ |
A D | module_systimer.c | 42 JSContext *ctx = js_get_context(); in timer_action() 120 JSContext *ctx = js_get_context(); in clear_timer() 137 static JSValue native_setTimeout(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *arg… in native_setTimeout() 158 static JSValue native_clearTimeout(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *a… in native_clearTimeout() 165 static JSValue native_setInterval(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *ar… in native_setInterval() 186 static JSValue native_clearInterval(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *… in native_clearInterval() 193 static JSValue native_sleepMs(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) in native_sleepMs() 225 static int js_timer_init(JSContext *ctx) in js_timer_init() 241 JSContext *ctx = js_get_context(); in module_systimer_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/netmgr/ |
A D | module_netmgr.c | 82 JSContext *ctx = js_get_context(); in js_cb_conn_status() 111 JSContext *ctx = js_get_context(); in check_ip_task() 149 static JSValue native_netmgr_service_init(JSContext *ctx, JSValueConst this_val, int argc, JSValueC… in native_netmgr_service_init() 186 static JSValue native_netmgr_add_dev(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst … in native_netmgr_add_dev() 207 static JSValue native_netmgr_get_dev(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst … in native_netmgr_get_dev() 259 static JSValue native_netmgr_connect(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst … in native_netmgr_connect() 570 JSContext *ctx = js_get_context(); in set_msg_cb() 668 JSContext *ctx = js_get_context(); in module_netmgr_source_clean() 716 static int js_netmgr_init(JSContext *ctx, JSModuleDef *m) in js_netmgr_init() 729 JSModuleDef *js_init_module_netmgr(JSContext *ctx, const char *module_name) in js_init_module_netmgr() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/ui/ |
A D | module_vm.c | 22 JSValue native_model_setdata(JSContext *ctx, JSValueConst this_val, 45 static int js_vm_init(JSContext *ctx, JSModuleDef *m) in js_vm_init() 61 JSModuleDef *js_init_module_vm(JSContext *ctx, const char *module_name) in js_init_module_vm() 74 JSContext *ctx = js_get_context(); in module_vm_register()
|
A D | module_ui.c | 27 JSValue native_ui_redirect(JSContext *ctx, JSValueConst this_val, in native_ui_redirect() 69 static int js_ui_init(JSContext *ctx, JSModuleDef *m) in js_ui_init() 85 JSModuleDef *js_init_module_ui(JSContext *ctx, const char *module_name) in js_init_module_ui() 98 JSContext *ctx = js_get_context(); in module_ui_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/libc/ |
A D | quickjs_libc.c | 121 static int (*os_poll_func)(JSContext *ctx); 133 static JSValue js_printf_internal(JSContext *ctx, in js_printf_internal() 596 JSModuleDef *js_module_loader(JSContext *ctx, in js_module_loader() 2222 static int js_os_poll(JSContext *ctx) in js_os_poll() 2381 static int js_os_poll(JSContext *ctx) in js_os_poll() 3503 JSContext *ctx; in worker_func() 4104 void js_std_dump_error(JSContext *ctx) in js_std_dump_error() 4124 void js_std_loop(JSContext *ctx) in js_std_loop() 4126 JSContext *ctx1; in js_std_loop() 4148 void js_std_loop_once(JSContext *ctx) in js_std_loop_once() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/ |
A D | module_network.c | 22 static JSValue native_network_get_type(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons… in native_network_get_type() 39 static int js_network_init(JSContext *ctx, JSModuleDef *m) in js_network_init() 52 JSModuleDef *js_init_module_network(JSContext *ctx, const char *module_name) in js_init_module_network() 65 JSContext *ctx = js_get_context(); in module_network_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/audio/ |
A D | module_audioplayer.c | 64 static int js_get_length32(JSContext* ctx, uint32_t* pres, in js_get_length32() 81 JSContext *ctx = js_get_context(); in audioplayer_state_notify() 145 JSContext *ctx = js_get_context(); in audioplayer_play_cplt_notify() 184 static JSValue native_audioplayer_play(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons… in native_audioplayer_play() 265 static JSValue native_audioplayer_stop(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons… in native_audioplayer_stop() 287 static JSValue native_audioplayer_pause(JSContext *ctx, JSValueConst this_val, int argc, JSValueCon… in native_audioplayer_pause() 307 static JSValue native_audioplayer_resume(JSContext *ctx, JSValueConst this_val, int argc, JSValueCo… in native_audioplayer_resume() 326 static JSValue native_audioplayer_seekto(JSContext *ctx, JSValueConst this_val, int argc, JSValueCo… in native_audioplayer_seekto() 729 static int js_audio_init(JSContext *ctx, JSModuleDef *m) in js_audio_init() 742 JSModuleDef *js_init_module_audio(JSContext *ctx, const char *module_name) in js_init_module_audio() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/tcp/ |
A D | module_tcp.c | 66 JSContext *ctx = js_get_context(); in tcp_create_notify() 82 JSContext *ctx = js_get_context(); in tcp_create_routine() 164 JSContext *ctx = js_get_context(); in tcp_send_notify() 183 JSContext *ctx = js_get_context(); in tcp_send_routine() 221 static JSValue native_tcp_send(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) in native_tcp_send() 265 JSContext *ctx = js_get_context(); in tcp_recv_notify() 289 JSContext *ctx = js_get_context(); in tcp_recv_routine() 391 static JSValue native_tcp_close(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) in native_tcp_close() 437 static int js_tcp_init(JSContext *ctx, JSModuleDef *m) in js_tcp_init() 450 JSModuleDef *js_init_module_tcp(JSContext *ctx, const char *module_name) in js_init_module_tcp() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/fs/ |
A D | module_fs.c | 59 static JSValue native_fs_is_support(JSContext *ctx, JSValueConst this_val, in native_fs_is_support() 75 static JSValue native_fs_read(JSContext *ctx, JSValueConst this_val, in native_fs_read() 143 static JSValue native_fs_write(JSContext *ctx, JSValueConst this_val, in native_fs_write() 256 static JSValue native_fs_delete(JSContext *ctx, JSValueConst this_val, in native_fs_delete() 289 static JSValue native_fs_totalsize(JSContext *ctx, JSValueConst this_val, in native_fs_totalsize() 315 static JSValue native_fs_usedsize(JSContext *ctx, JSValueConst this_val, in native_fs_usedsize() 342 static JSValue native_fs_freesize(JSContext *ctx, JSValueConst this_val, in native_fs_freesize() 375 static int js_fs_init(JSContext *ctx, JSModuleDef *m) in js_fs_init() 391 JSModuleDef *js_init_module_fs(JSContext *ctx, const char *module_name) in js_init_module_fs() 404 JSContext *ctx = js_get_context(); in module_fs_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/kv/ |
A D | module_kv.c | 17 static JSValue native_kv_setStorage(JSContext *ctx, JSValueConst this_val, in native_kv_setStorage() 54 static JSValue native_kv_getStorage(JSContext *ctx, JSValueConst this_val, in native_kv_getStorage() 93 static JSValue native_kv_removeStorage(JSContext *ctx, JSValueConst this_val, in native_kv_removeStorage() 127 static int js_kv_init(JSContext *ctx, JSModuleDef *m) in js_kv_init() 143 JSModuleDef *js_init_module_kv(JSContext *ctx, const char *module_name) in js_init_module_kv() 156 JSContext *ctx = js_get_context(); in module_kv_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/quickjs/examples/ |
A D | point.c | 45 static JSValue js_point_ctor(JSContext *ctx, in js_point_ctor() 77 static JSValue js_point_get_xy(JSContext *ctx, JSValueConst this_val, int magic) in js_point_get_xy() 88 static JSValue js_point_set_xy(JSContext *ctx, JSValueConst this_val, JSValue val, int magic) in js_point_set_xy() 103 static JSValue js_point_norm(JSContext *ctx, JSValueConst this_val, in js_point_norm() 123 static int js_point_init(JSContext *ctx, JSModuleDef *m) in js_point_init() 143 JSModuleDef *js_init_module(JSContext *ctx, const char *module_name) in js_init_module()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/uart/ |
A D | module_uart.c | 43 extern JSContext *js_get_context(void); 70 JSContext *ctx = js_get_context(); in uart_recv_notify() 136 JSContext *ctx = js_get_context(); in uart_add_recv() 152 JSContext *ctx = js_get_context(); in uart_del_recv() 162 static JSValue native_uart_open(JSContext *ctx, JSValueConst this_val, in native_uart_open() 321 static JSValue native_uart_read(JSContext *ctx, JSValueConst this_val, in native_uart_read() 374 static JSValue native_uart_on(JSContext *ctx, JSValueConst this_val, in native_uart_on() 431 JSContext *ctx = js_get_context(); in native_uart_on() 448 JSContext *ctx = js_get_context(); in native_uart_clean() 488 static int js_uart_init(JSContext *ctx, JSModuleDef *m) in js_uart_init() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/dac/ |
A D | module_dac.c | 19 static JSValue native_dac_open(JSContext *ctx, JSValueConst this_val, in native_dac_open() 71 static JSValue native_dac_setVol(JSContext *ctx, JSValueConst this_val, in native_dac_setVol() 104 static JSValue native_dac_getVol(JSContext *ctx, JSValueConst this_val, in native_dac_getVol() 127 static JSValue native_dac_close(JSContext *ctx, JSValueConst this_val, in native_dac_close() 168 static int js_dac_init(JSContext *ctx, JSModuleDef *m) in js_dac_init() 184 JSModuleDef *js_init_module_dac(JSContext *ctx, const char *module_name) in js_init_module_dac() 197 JSContext *ctx = js_get_context(); in module_dac_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/adc/ |
A D | module_adc.c | 20 static JSValue native_adc_open(JSContext *ctx, JSValueConst this_val, in native_adc_open() 68 static JSValue native_adc_close(JSContext *ctx, JSValueConst this_val, in native_adc_close() 96 static JSValue native_adc_read(JSContext *ctx, JSValueConst this_val, in native_adc_read() 130 static int js_adc_init(JSContext *ctx, JSModuleDef *m) in js_adc_init() 146 JSModuleDef *js_init_module_adc(JSContext *ctx, const char *module_name) in js_init_module_adc() 159 JSContext *ctx = js_get_context(); in module_adc_register()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/common/ |
A D | quickjs_addon_common.h | 18 extern JSContext *js_get_context(void); 33 static inline char *QUICKJS_GET_PROPERTY_STR(JSContext *ctx, JSValueConst argv, char *name) in QUICKJS_GET_PROPERTY_STR() 47 static inline int QUICKJS_GET_PROPERTY_INT32(JSContext *ctx, JSValueConst argv, char *name) in QUICKJS_GET_PROPERTY_INT32() 61 static inline bool QUICKJS_GET_PROPERTY_BOOL(JSContext *ctx, JSValueConst argv, char *name) in QUICKJS_GET_PROPERTY_BOOL()
|