/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/log/ |
A D | module_log.c | 57 return JS_NewInt32(ctx, -1); in native_set_stdlog_level() 68 return JS_NewInt32(ctx, 0); in native_set_stdlog_level() 91 return JS_NewInt32(ctx, 0); in native_set_popcloud_log_level() 114 return JS_NewInt32(ctx, 0); in native_set_popfs_log_level() 133 return JS_NewInt32(ctx, 0); in native_set_log_file_path() 156 return JS_NewInt32(ctx, 0); in native_set_log_file_size() 187 return JS_NewInt32(ctx, 0); in native_debug_log_out() 202 return JS_NewInt32(ctx, 0); in native_info_log_out() 217 return JS_NewInt32(ctx, 0); in native_warn_log_out() 232 return JS_NewInt32(ctx, 0); in native_error_log_out() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/cellular/ |
A D | module_cellular.c | 135 return JS_NewInt32(ctx, ret); in native_cellular_neighborCellInfo() 149 return JS_NewInt32(ctx, ret); in native_cellular_getStatus() 157 JSValue status = JS_NewInt32(ctx, p->status); in network_status_notify() 200 return JS_NewInt32(ctx, ret); in native_cellular_onconnect() 204 return JS_NewInt32(ctx, ret); in native_cellular_onconnect() 214 return JS_NewInt32(ctx, ret); in native_get_netshare_mode() 231 return JS_NewInt32(ctx, ret); in native_set_netshare_mode() 235 return JS_NewInt32(ctx, ret); in native_set_netshare_mode() 273 return JS_NewInt32(ctx, 0); in native_get_netshare_config() 320 return JS_NewInt32(ctx, 0); in native_set_netshare_config() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/rtc/ |
A D | module_rtc.c | 41 return JS_NewInt32(ctx, ret); in native_rtc_open() 51 return JS_NewInt32(ctx, ret); in native_rtc_close() 68 JS_SetPropertyStr(ctx, t, "year", JS_NewInt32(ctx, ((uint32_t)rtcTime.year))); in native_rtc_get_time() 69 JS_SetPropertyStr(ctx, t, "month", JS_NewInt32(ctx, rtcTime.month)); in native_rtc_get_time() 70 JS_SetPropertyStr(ctx, t, "day", JS_NewInt32(ctx, rtcTime.date)); in native_rtc_get_time() 71 JS_SetPropertyStr(ctx, t, "hour", JS_NewInt32(ctx, rtcTime.hr)); in native_rtc_get_time() 72 JS_SetPropertyStr(ctx, t, "minute", JS_NewInt32(ctx, rtcTime.min)); in native_rtc_get_time() 73 JS_SetPropertyStr(ctx, t, "second", JS_NewInt32(ctx, rtcTime.sec)); in native_rtc_get_time() 78 return JS_NewInt32(ctx, 0); in native_rtc_get_time() 223 return JS_NewInt32(ctx, ret); in native_rtc_set_time()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/aiot/ |
A D | module_aiot_ntp.c | 39 JS_SetPropertyStr(ctx, obj, "year", JS_NewInt32(ctx, param->year)); in aiot_device_ntp_notify() 40 JS_SetPropertyStr(ctx, obj, "month", JS_NewInt32(ctx, param->month)); in aiot_device_ntp_notify() 41 JS_SetPropertyStr(ctx, obj, "day", JS_NewInt32(ctx, param->day)); in aiot_device_ntp_notify() 42 JS_SetPropertyStr(ctx, obj, "hour", JS_NewInt32(ctx, param->hour)); in aiot_device_ntp_notify() 43 JS_SetPropertyStr(ctx, obj, "minute", JS_NewInt32(ctx, param->minute)); in aiot_device_ntp_notify() 44 JS_SetPropertyStr(ctx, obj, "second", JS_NewInt32(ctx, param->second)); in aiot_device_ntp_notify() 45 JS_SetPropertyStr(ctx, obj, "msecond", JS_NewInt32(ctx, param->msecond)); in aiot_device_ntp_notify()
|
A D | module_aiot_device.c | 576 return JS_NewInt32(ctx, res); in native_aiot_create_device() 595 return JS_NewInt32(ctx, res); in native_aiot_get_ntp_time() 657 return JS_NewInt32(ctx, res); in native_aiot_dynreg() 712 return JS_NewInt32(ctx, res); in native_aiot_postEvent() 752 return JS_NewInt32(ctx, res); in native_aiot_postProps() 773 return JS_NewInt32(ctx, res); in native_aiot_onProps() 791 return JS_NewInt32(ctx, res); in native_aiot_onService() 840 return JS_NewInt32(ctx, res); in native_aiot_publish() 873 return JS_NewInt32(ctx,res); in native_aiot_unsubscribe() 911 return JS_NewInt32(ctx,res); in native_aiot_subscribe() [all …]
|
A D | module_aiot_gateway.c | 483 return JS_NewInt32(ctx, res); in native_aiot_create_gateway() 538 return JS_NewInt32(ctx, res); in native_aiot_addTopo() 555 return JS_NewInt32(ctx, res); in native_aiot_getTopo() 611 return JS_NewInt32(ctx, res); in native_aiot_removeTopo() 660 return JS_NewInt32(ctx, res); in native_aiot_registerSubDevice() 707 return JS_NewInt32(ctx, res); in native_aiot_login() 750 return JS_NewInt32(ctx, res); in native_aiot_logout() 783 return JS_NewInt32(ctx, res); in native_aiot_gateway_close() 820 return JS_NewInt32(ctx, res); in native_aiot_publish() 847 return JS_NewInt32(ctx, res); in native_aiot_unsubscribe() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/netmgr/ |
A D | module_netmgr.c | 165 return JS_NewInt32(ctx, ret); in native_netmgr_service_init() 183 return JS_NewInt32(ctx, ret); in native_netmgr_service_deinit() 204 return JS_NewInt32(ctx, ret); in native_netmgr_add_dev() 231 return JS_NewInt32(ctx, ret); in native_netmgr_get_dev() 255 return JS_NewInt32(ctx, ret); in native_netmgr_set_auto_reconnect() 366 return JS_NewInt32(ctx, ret); in native_netmgr_connect() 393 return JS_NewInt32(ctx, ret); in native_netmgr_disconnect() 415 return JS_NewInt32(ctx, ret); in native_netmgr_get_state() 435 return JS_NewInt32(ctx, ret); in native_netmgr_save_config() 442 return JS_NewInt32(ctx, ret); in native_netmgr_get_config() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/system/ |
A D | module_system.c | 97 JS_SetPropertyStr(ctx, t, "heapTotal", JS_NewInt32(ctx, heap_info.heap_total)); in native_system_memory() 98 JS_SetPropertyStr(ctx, t, "heapUsed", JS_NewInt32(ctx, heap_info.heap_used)); in native_system_memory() 99 JS_SetPropertyStr(ctx, t, "heapFree", JS_NewInt32(ctx, heap_info.heap_free)); in native_system_memory() 105 return JS_NewInt32(ctx, ret); in native_system_memory() 111 return JS_NewInt32(ctx, 1); in native_system_gc() 119 return JS_NewInt32(ctx, 1); in native_system_reboot()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/audio/ |
A D | module_audioplayer.c | 262 return JS_NewInt32(ctx, ret); in native_audioplayer_play() 284 return JS_NewInt32(ctx, ret); in native_audioplayer_stop() 304 return JS_NewInt32(ctx, ret); in native_audioplayer_pause() 323 return JS_NewInt32(ctx, ret); in native_audioplayer_resume() 355 return JS_NewInt32(ctx, ret); in native_audioplayer_seekto() 377 return JS_NewInt32(ctx, ret); in native_audioplayer_position_get() 399 return JS_NewInt32(ctx, ret); in native_audioplayer_duration_get() 449 return JS_NewInt32(ctx, ret); in native_audioplayer_state_get() 477 return JS_NewInt32(ctx, ret); in native_audioplayer_state_on() 509 return JS_NewInt32(ctx, ret); in native_audioplayer_volume_set() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/wireless/bt_host/ |
A D | module_bt_host.c | 95 return JS_NewInt32(ctx, ret); in native_bt_host_init() 149 return JS_NewInt32(ctx, ret); in native_bt_host_start_adv() 159 return JS_NewInt32(ctx, ret); in native_bt_host_stop_adv() 203 return JS_NewInt32(ctx, ret); in native_bt_host_start_scan() 213 return JS_NewInt32(ctx, ret); in native_bt_host_stop_scan() 306 return JS_NewInt32(ctx, ret?0:-1); in native_bt_host_add_service() 365 args[1] = JS_NewInt32(ctx, cb_param->connect); in native_bt_host_conn_handle_js() 414 args[1] = JS_NewInt32(ctx, cb_param->addr_type); in native_bt_host_scan_handle_js() 415 args[2] = JS_NewInt32(ctx, cb_param->adv_type); in native_bt_host_scan_handle_js() 417 args[4] = JS_NewInt32(ctx, cb_param->rssi); in native_bt_host_scan_handle_js() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/pwm/ |
A D | module_pwm.c | 75 return JS_NewInt32(ctx, 0); in native_pwm_open() 102 return JS_NewInt32(ctx, ret); in native_pwm_close() 129 JS_SetPropertyStr(ctx, t, "freq", JS_NewInt32(ctx, pwm_config.freq)); in native_pwm_getConfig() 130 JS_SetPropertyStr(ctx, t, "duty", JS_NewInt32(ctx, pwm_config.duty)); in native_pwm_getConfig() 135 return JS_NewInt32(ctx, 0); in native_pwm_getConfig() 215 return JS_NewInt32(ctx, ret); in native_pwm_setConfig()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/repl/ |
A D | module_repl.c | 34 return JS_NewInt32(ctx, 0); in native_repl_open() 47 return JS_NewInt32(ctx, ret); in native_repl_close() 97 return JS_NewInt32(ctx, ret); in native_repl_puts() 124 return JS_NewInt32(ctx, ret); in native_repl_read() 169 return JS_NewInt32(ctx, 0); in native_repl_setReadHandler()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/blenetcfg/ |
A D | module_blecfgnet.c | 27 return JS_NewInt32(ctx, ret); in native_blecfgnet_start() 39 return JS_NewInt32(ctx, ret); in native_blecfgnet_recovery_wifi() 51 return JS_NewInt32(ctx, ret); in native_blecfgnet_recovery_devinfo()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/lcd/ |
A D | module_lcd.c | 37 return JS_NewInt32(ctx, ret); in native_lcd_open() 50 return JS_NewInt32(ctx, ret); in native_lcd_close() 87 return JS_NewInt32(ctx, ret); in native_lcd_show() 114 return JS_NewInt32(ctx, ret); in native_lcd_fill()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/gpio/ |
A D | module_gpio.c | 80 return JS_NewInt32(ctx, ret); in native_gpio_open() 116 return JS_NewInt32(ctx, ret); in native_gpio_close() 140 return JS_NewInt32(ctx, ret); in native_gpio_toggle() 175 return JS_NewInt32(ctx, result); in native_gpio_write() 198 return JS_NewInt32(ctx, level); in native_gpio_read() 213 JSValue v = JS_NewInt32(ctx, value); in gpio_irq_notify() 296 return JS_NewInt32(ctx, result); in native_gpio_on()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/timer/ |
A D | module_timer.c | 101 return JS_NewInt32(ctx, 0); in native_timer_open() 108 JSValue v = JS_NewInt32(ctx, 0); in native_timer_timeout_handler() 177 return JS_NewInt32(ctx, ret); in native_timer_setTimeout() 206 return JS_NewInt32(ctx, ret); in native_timer_clearTimeout() 213 JSValue value = JS_NewInt32(ctx, 0); in native_timer_interval_handler() 290 return JS_NewInt32(ctx, ret); in native_timer_setInterval() 319 return JS_NewInt32(ctx, ret); in native_timer_clearInterval() 344 return JS_NewInt32(ctx, ret); in native_timer_close()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/fs/ |
A D | module_fs.c | 64 return JS_NewInt32(ctx, ret); in native_fs_is_support() 245 return JS_NewInt32(ctx, ret); in native_fs_write() 279 return JS_NewInt32(ctx, ret); in native_fs_delete() 305 return JS_NewInt32(ctx, ret); in native_fs_totalsize() 332 return JS_NewInt32(ctx, ret); in native_fs_usedsize() 359 return JS_NewInt32(ctx, ret); in native_fs_freesize()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/systimer/ |
A D | module_systimer.c | 54 JSValue value = JS_NewInt32(ctx, 0); in timer_action() 162 return JS_NewInt32(ctx, 0); in native_clearTimeout() 190 return JS_NewInt32(ctx, 0); in native_clearInterval() 204 return JS_NewInt32(ctx, 0); in native_sleepMs() 207 return JS_NewInt32(ctx, -1); in native_sleepMs()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/udp/ |
A D | module_udp.c | 84 return JS_NewInt32(ctx, sock_id); in native_udp_create_socket() 129 return JS_NewInt32(ctx, ret); in native_udp_bind() 138 args = JS_NewInt32(ctx, notify->ret); in udp_send_notify() 299 return JS_NewInt32(ctx, ret); in native_udp_sendto() 315 port = JS_NewInt32(ctx, notify->src_port); in udp_recv_notify() 321 args[2] = JS_NewInt32(ctx, notify->recv_len); in udp_recv_notify() 447 return JS_NewInt32(ctx, ret); in native_udp_recvfrom() 484 return JS_NewInt32(ctx, ret); in native_udp_close_socket()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/wdg/ |
A D | module_wdg.c | 44 return JS_NewInt32(ctx, result); in native_wdg_start() 56 return JS_NewInt32(ctx, result); in native_wdg_feed() 69 return JS_NewInt32(ctx, result); in native_wdg_stop()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/http/ |
A D | module_http.c | 546 return JS_NewInt32(ctx, -1); in native_http_download() 551 return JS_NewInt32(ctx, -1); in native_http_download() 556 return JS_NewInt32(ctx, 1); in native_http_download() 565 return JS_NewInt32(ctx, -1); in native_http_request() 570 return JS_NewInt32(ctx, 1); in native_http_request() 634 return JS_NewInt32(ctx, -1); in native_http_download_start() 648 return JS_NewInt32(ctx, -1); in native_http_download_start() 651 return JS_NewInt32(ctx, 0); in native_http_download_start() 661 return JS_NewInt32(ctx, -1); in native_http_download_add() 667 return JS_NewInt32(ctx, -1); in native_http_download_add() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/tcp/ |
A D | module_tcp.c | 67 JSValue args = JS_NewInt32(ctx, p->ret); in tcp_create_notify() 158 return JS_NewInt32(ctx, ret); in native_tcp_create_socket() 165 JSValue args = JS_NewInt32(ctx, p->ret); in tcp_send_notify() 258 return JS_NewInt32(ctx, ret); in native_tcp_send() 268 args[0] = JS_NewInt32(ctx, p->recv_len); in tcp_recv_notify() 378 return JS_NewInt32(ctx, ret); in native_tcp_receive() 413 return JS_NewInt32(ctx, ret); in native_tcp_close()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/dac/ |
A D | module_dac.c | 68 return JS_NewInt32(ctx, ret); in native_dac_open() 101 return JS_NewInt32(ctx, result); in native_dac_setVol() 124 JS_NewInt32(ctx, voltage); in native_dac_getVol() 154 return JS_NewInt32(ctx, ret); in native_dac_close()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/utils/checksum/ |
A D | module_checksum.c | 151 return JS_NewInt32(ctx, result); in native_checksum_crc16() 153 return JS_NewInt32(ctx, -1); in native_checksum_crc16() 185 return JS_NewInt32(ctx, result); in native_checksum_crc32() 187 return JS_NewInt32(ctx, -1); in native_checksum_crc32()
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/onewire/ |
A D | module_onewire.c | 308 return JS_NewInt32(ctx, result); in native_onewire_gpio_setspeed() 363 return JS_NewInt32(ctx, 0); in native_onewire_gpio_open() 392 return JS_NewInt32(ctx, ret); in native_onewire_gpio_close() 418 return JS_NewInt32(ctx, result); in native_onewire_gpio_reset() 444 return JS_NewInt32(ctx, result); in native_onewire_gpio_readbyte() 479 return JS_NewInt32(ctx, result); in native_onewire_gpio_writebyte()
|