CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
cdc::plugin_manager Namespace Reference

Namespaces

namespace  gpio_policy

Classes

struct  CapabilityCheckResult
class  CapabilityChecker
struct  LockscreenRegistration
struct  WasmModuleDeleter
struct  WasmInstanceDeleter
struct  WasmExecEnvDeleter
class  Plugin
class  PluginInfoView
class  PluginListView
class  PluginManager
struct  PrerequisiteSpec
struct  PluginCapabilities
struct  LocalizedString
struct  PluginManifest
class  PluginStorage
class  PluginUiState
class  Prerequisites
struct  SlotTable
struct  CapsFreeDeleter
 Deleter for buffers allocated via heap_caps_malloc. More...
struct  CStdFreeDeleter
 Deleter for buffers allocated via malloc/realloc. More...

Typedefs

using WasmModulePtr = std::unique_ptr<WASMModuleCommon, WasmModuleDeleter>
using WasmInstancePtr = std::unique_ptr<WASMModuleInstanceCommon, WasmInstanceDeleter>
using WasmExecEnvPtr = std::unique_ptr<WASMExecEnv, WasmExecEnvDeleter>
template<typename T>
using PsramUniquePtr = ::cdc::core::PsramUniquePtr<T>
template<typename T>
using CStdUniquePtr = ::cdc::core::CStdUniquePtr<T>

Enumerations

enum class  CapabilityResult {
  Ok , ApiLevelMismatch , LinearMemoryOutOfRange , RmemNameInvalid ,
  EccNameInvalid , GpioPinNotAllowed , GpioPinAlreadyHeld , BleServiceUuidConflict ,
  BleServiceUuidInvalid , NvsNamespaceConflict , NvsNamespaceInvalid , MissingNvsNamespace
}
enum class  StartResult {
  Ok , PluginAlreadyRunning , ManifestMissing , ManifestInvalid ,
  CapabilityRejected , WamrLoadFailed , WamrInstantiateFailed , PluginInitFailed ,
  PrerequisiteFailed , PluginOnEnterFailed , Busy , PluginDisabled
}
enum class  PrereqResult { Ok , SoftFailed , HardFailed }

Functions

void registerGpioSerialCommands ()
uint8_t collectLockscreenItems (LockscreenRegistration *out, uint8_t max)
void clearLockscreenRegistrationFor (void *plugin)
void registerPluginSerialCommands ()
bool beginFileReceive (const char *abs_path, size_t size, uint32_t crc)
 Receive a file over USB-CDC into the plugins partition.
template<typename T>
PsramUniquePtr< T > psramAlloc (std::size_t count) noexcept
bool register_host_imports ()
 Register the "cdc" import namespace with WAMR.
void unregister_host_imports ()
 Unregister the imports (called from PluginManager::deinit()).
int hex_val (char c)
 Convert a single hex digit to its numeric value.
std::string toDisplay (const char *utf8)
 Decode a UTF-8 (with optional HTML entities) string into CP437 bytes.
int copyUtf8 (const char *cp437, char *out, size_t out_size)
 Encode a CP437 string into a caller buffer as UTF-8.
static std::string default_lang_value (const std::map< std::string, std::string > &by_lang, const std::string &dflt_lang)
static void onCtxStop ()
 Context-menu Stop callback: force-unloads the selected plugin.
static void onCtxDisable ()
 Context-menu Disable callback: persistently disables and unloads.
static void onCtxEnable ()
 Context-menu Enable callback: removes the persistent disabled marker.
static void reportStartResult (StartResult result)
 Show a toast describing a non-Ok plugin start result.
static void onCtxStart ()
 Context-menu Start callback: starts the selected (stopped) plugin.
static std::string str_or (const cJSON *node, const char *key, const char *dflt="")
static bool parse_api_level (const std::string &s, uint16_t &major, uint16_t &minor)
static void parse_localized (const cJSON *root, std::map< std::string, LocalizedString > &out)
static void parse_capabilities (const cJSON *root, PluginCapabilities &cap)
static void parse_prereqs (const cJSON *root, std::vector< PrerequisiteSpec > &out)
static bool ends_with (const char *s, size_t s_len, const char *suffix, size_t suf_len)
static bool wbuf_ok (wasm_exec_env_t env, const void *ptr, size_t len)
static void w_host_log (wasm_exec_env_t, uint32_t level, const char *tag, const char *msg)
static uint64_t w_host_uptime_ms (wasm_exec_env_t)
static int64_t w_host_unix_time (wasm_exec_env_t)
static int32_t w_host_is_time_set (wasm_exec_env_t)
static int32_t w_host_timezone_offset (wasm_exec_env_t)
static uint32_t w_host_battery_mv (wasm_exec_env_t)
static uint32_t w_host_battery_pct (wasm_exec_env_t)
static int32_t w_host_is_usb_connected (wasm_exec_env_t)
static uint32_t w_host_power_source (wasm_exec_env_t)
static uint32_t w_host_charge_status (wasm_exec_env_t)
static int32_t w_host_is_battery_low (wasm_exec_env_t)
static int32_t w_host_is_battery_critical (wasm_exec_env_t)
static void w_host_set_sleep_inhibit (wasm_exec_env_t, uint32_t on)
static int32_t w_host_ui_push_toast (wasm_exec_env_t, const char *t, uint32_t icon, uint32_t ms)
static int32_t w_host_ui_push_message (wasm_exec_env_t, const char *t, uint32_t icon, uint32_t ms)
static int32_t w_host_ui_push_info (wasm_exec_env_t, const char *title, const char *body)
static int32_t w_host_ui_push_confirm (wasm_exec_env_t, const char *text, uint32_t icon, uint32_t action_id)
static int32_t w_host_ui_push_list (wasm_exec_env_t exec_env, const char *title, const ui_item_t *items, uint32_t count, uint32_t sel, uint32_t menu)
static int32_t w_host_ui_replace_list (wasm_exec_env_t exec_env, const char *title, const ui_item_t *items, uint32_t count, uint32_t sel, uint32_t menu)
static int32_t w_host_ui_set_view_footer (wasm_exec_env_t, const char *hint)
static int32_t w_host_ui_set_view_empty (wasm_exec_env_t, const char *text)
static int32_t w_host_ui_set_view_lifecycle (wasm_exec_env_t, uint32_t hide_action_id, uint32_t show_action_id)
static int32_t w_host_ui_update_list_item (wasm_exec_env_t exec_env, uint32_t index, const ui_item_t *item)
static int32_t w_host_ui_insert_list_item (wasm_exec_env_t exec_env, uint32_t index, const ui_item_t *item)
static int32_t w_host_ui_remove_list_item (wasm_exec_env_t, uint32_t index)
static int32_t w_host_ui_push_context_menu (wasm_exec_env_t exec_env, const char *title, const ui_item_t *items, uint32_t count, uint32_t sel)
static int32_t w_host_ui_pop (wasm_exec_env_t)
static int32_t w_host_ui_pop_to_plugin (wasm_exec_env_t)
static int32_t w_host_ui_repaint (wasm_exec_env_t)
static int32_t w_host_ui_wink (wasm_exec_env_t, uint32_t count, uint32_t period_ms)
static int32_t w_host_ui_push_t9_input (wasm_exec_env_t, const char *title, const char *initial, uint32_t max_len, uint32_t action_id)
static int32_t w_host_ui_push_password (wasm_exec_env_t, const char *title, const char *initial, uint32_t max_len, uint32_t action_id)
static int32_t w_host_ui_push_pin_entry (wasm_exec_env_t, const char *title, uint32_t max_len, uint32_t max_attempts, uint32_t action_id)
static int32_t w_host_ui_push_slider (wasm_exec_env_t, const char *title, int32_t min, int32_t max, int32_t init, int32_t step, const char *unit, uint32_t action_id)
static int32_t w_host_ui_push_color_picker (wasm_exec_env_t, uint32_t r, uint32_t g, uint32_t b, uint32_t action_id)
static int32_t w_host_ui_consume_input_text (wasm_exec_env_t, char *out, uint32_t out_size)
static int32_t w_host_ui_consume_input_int (wasm_exec_env_t exec_env, int32_t *out)
static int32_t w_host_view_canvas_push (wasm_exec_env_t, const char *title, uint32_t key_action_id, uint32_t widget_action_id)
static int32_t w_host_view_canvas_get_body_size (wasm_exec_env_t exec_env, uint16_t *w, uint16_t *h)
static int32_t w_host_view_canvas_set_footer (wasm_exec_env_t, const char *hint)
static int32_t w_host_view_canvas_clear (wasm_exec_env_t)
static int32_t w_host_view_canvas_set_text_size (wasm_exec_env_t, uint32_t size)
static int32_t w_host_view_canvas_set_text_color (wasm_exec_env_t, uint32_t inverted)
static int32_t w_host_view_canvas_set_font (wasm_exec_env_t, uint32_t font_id)
static int32_t w_host_text_pick_font_that_fits (wasm_exec_env_t, const char *text, int32_t max_width_px, const uint8_t *candidates, uint32_t count, uint8_t *out_font_id)
static int32_t w_host_view_canvas_draw_text (wasm_exec_env_t, int32_t x, int32_t y, const char *text)
static int32_t w_host_view_canvas_draw_text_aligned (wasm_exec_env_t, int32_t x, int32_t y, int32_t w, const char *text, uint32_t align)
static int32_t w_host_view_canvas_draw_rect (wasm_exec_env_t, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t filled)
static int32_t w_host_view_canvas_invert_rect (wasm_exec_env_t, int32_t x, int32_t y, int32_t w, int32_t h)
static int32_t w_host_view_canvas_hline (wasm_exec_env_t, int32_t x, int32_t y, int32_t w)
static int32_t w_host_view_canvas_vline (wasm_exec_env_t, int32_t x, int32_t y, int32_t h)
static int32_t w_host_view_canvas_commit (wasm_exec_env_t, uint32_t full_refresh)
static int32_t w_host_view_canvas_add_slider (wasm_exec_env_t, uint32_t widget_id, int32_t min, int32_t max, int32_t initial, int32_t step)
static int32_t w_host_view_canvas_add_text (wasm_exec_env_t, uint32_t widget_id, uint32_t max_len, const char *initial)
static int32_t w_host_view_canvas_add_button (wasm_exec_env_t, uint32_t widget_id)
static int32_t w_host_view_canvas_remove_widget (wasm_exec_env_t, uint32_t widget_id)
static int32_t w_host_view_canvas_set_value (wasm_exec_env_t, uint32_t widget_id, int32_t value)
static int32_t w_host_view_canvas_get_value (wasm_exec_env_t exec_env, uint32_t widget_id, int32_t *out)
static int32_t w_host_view_canvas_set_text (wasm_exec_env_t, uint32_t widget_id, const char *text)
static int32_t w_host_view_canvas_get_text (wasm_exec_env_t, uint32_t widget_id, char *out, uint32_t cap)
static int32_t w_host_view_canvas_set_focus (wasm_exec_env_t, uint32_t widget_id)
static int32_t w_host_view_canvas_get_focus (wasm_exec_env_t exec_env, uint32_t *out)
static int32_t w_host_view_canvas_set_key_repeat (wasm_exec_env_t, uint32_t initial_ms, uint32_t repeat_ms)
static int32_t w_host_view_canvas_set_long_press_action (wasm_exec_env_t, uint32_t action_id)
static int32_t w_host_i18n_tr_key (wasm_exec_env_t, const char *k, char *o, uint32_t c)
static int32_t w_host_i18n_tr_meta (wasm_exec_env_t, const char *f, char *o, uint32_t c)
static int32_t w_host_i18n_tr_core (wasm_exec_env_t, const char *k, char *o, uint32_t c)
static uint32_t w_host_i18n_current_language (wasm_exec_env_t)
static int32_t w_host_nvs_get_blob (wasm_exec_env_t, const char *key, uint8_t *buf, uint32_t buf_size)
static int32_t w_host_nvs_set_blob (wasm_exec_env_t, const char *key, const uint8_t *buf, uint32_t len)
static int32_t w_host_nvs_get_u32 (wasm_exec_env_t exec_env, const char *key, uint32_t *out)
static int32_t w_host_nvs_set_u32 (wasm_exec_env_t, const char *key, uint32_t value)
static int32_t w_host_nvs_get_str (wasm_exec_env_t, const char *key, char *buf, uint32_t buf_size)
static int32_t w_host_nvs_set_str (wasm_exec_env_t, const char *key, const char *value)
static int32_t w_host_nvs_erase (wasm_exec_env_t, const char *key)
static int32_t w_host_fs_write (wasm_exec_env_t, const char *name, const uint8_t *data, uint32_t len)
static int32_t w_host_fs_read (wasm_exec_env_t, const char *name, uint8_t *buf, uint32_t buf_size)
static int32_t w_host_fs_remove (wasm_exec_env_t, const char *name)
static int32_t w_host_fs_size (wasm_exec_env_t, const char *name)
static int32_t w_host_fs_list (wasm_exec_env_t, char *out, uint32_t out_size)
static int32_t w_host_fs_view (wasm_exec_env_t, const char *name)
static int32_t w_host_random (wasm_exec_env_t, uint8_t *buf, uint32_t len)
static int32_t w_host_sha256 (wasm_exec_env_t exec_env, const uint8_t *data, uint32_t len, uint8_t *out)
static int32_t w_host_hmac_sha256 (wasm_exec_env_t exec_env, const uint8_t *key, uint32_t klen, const uint8_t *data, uint32_t dlen, uint8_t *out)
static int32_t w_host_base32_encode (wasm_exec_env_t, const uint8_t *in, uint32_t in_len, char *out, uint32_t out_size)
static int32_t w_host_base32_decode (wasm_exec_env_t, const char *in, uint32_t in_len, uint8_t *out, uint32_t out_size)
static int32_t w_host_hex_encode (wasm_exec_env_t, const uint8_t *in, uint32_t in_len, char *out, uint32_t out_size)
static int32_t w_host_http_open (wasm_exec_env_t, uint32_t method, const char *url, uint32_t timeout)
static int32_t w_host_http_set_header (wasm_exec_env_t, int32_t h, const char *k, const char *v)
static int32_t w_host_http_set_body (wasm_exec_env_t, int32_t h, const uint8_t *body, uint32_t len)
static int32_t w_host_http_perform (wasm_exec_env_t, int32_t h)
static int32_t w_host_http_status (wasm_exec_env_t, int32_t h)
static int32_t w_host_http_close (wasm_exec_env_t, int32_t h)
static int32_t w_host_http_read_chunk (wasm_exec_env_t, int32_t h, uint8_t *buf, uint32_t buf_size)
static int32_t w_host_socket_open (wasm_exec_env_t, uint32_t proto, const char *host, uint32_t port, uint32_t timeout)
static int32_t w_host_socket_write (wasm_exec_env_t, int32_t h, const uint8_t *data, uint32_t len, uint32_t timeout)
static int32_t w_host_socket_read (wasm_exec_env_t, int32_t h, uint8_t *out, uint32_t cap, uint32_t timeout)
static int32_t w_host_socket_close (wasm_exec_env_t, int32_t h)
static int32_t w_host_wifi_request (wasm_exec_env_t, uint32_t t)
static int32_t w_host_wifi_release (wasm_exec_env_t)
static int32_t w_host_wifi_is_connected (wasm_exec_env_t)
static int32_t w_host_wifi_ssid (wasm_exec_env_t, char *out, uint32_t sz)
static int32_t w_host_wifi_ip (wasm_exec_env_t, char *out, uint32_t sz)
static int32_t w_host_rmem_read_named (wasm_exec_env_t, const char *name, uint8_t *buf, uint32_t buf_size)
static int32_t w_host_rmem_write_named (wasm_exec_env_t, const char *name, const uint8_t *buf, uint32_t len)
static int32_t w_host_rmem_erase_named (wasm_exec_env_t, const char *name)
static int32_t w_host_rmem_name_used (wasm_exec_env_t, const char *name)
static uint32_t w_host_rmem_slot_size (wasm_exec_env_t)
static int32_t w_host_ecc_generate (wasm_exec_env_t, const char *name, uint32_t curve)
static int32_t w_host_ecc_import (wasm_exec_env_t exec_env, const char *name, const uint8_t *priv, uint32_t curve)
static int32_t w_host_ecc_pubkey (wasm_exec_env_t exec_env, const char *name, uint8_t *pub, uint32_t curve)
static int32_t w_host_ecc_delete (wasm_exec_env_t, const char *name)
static int32_t w_host_ecc_exists (wasm_exec_env_t, const char *name)
static int32_t w_host_ecdsa_sign (wasm_exec_env_t exec_env, const char *name, const uint8_t *msg, uint32_t len, uint8_t *sig)
static int32_t w_host_eddsa_sign (wasm_exec_env_t exec_env, const char *name, const uint8_t *msg, uint32_t len, uint8_t *sig)
static int32_t w_host_event_subscribe (wasm_exec_env_t, uint32_t mask, uint32_t action_id)
static int32_t w_host_event_unsubscribe (wasm_exec_env_t, uint32_t sub)
static int32_t w_host_gpio_set_direction (wasm_exec_env_t, uint32_t pin, uint32_t dir)
static int32_t w_host_gpio_set_pull (wasm_exec_env_t, uint32_t pin, uint32_t pull)
static int32_t w_host_gpio_write (wasm_exec_env_t, uint32_t pin, int32_t level)
static int32_t w_host_gpio_read (wasm_exec_env_t exec_env, uint32_t pin, int32_t *out)
static int32_t w_host_gpio_release (wasm_exec_env_t, uint32_t pin)
static int32_t w_host_gpio_pwm_start (wasm_exec_env_t, uint32_t pin, uint32_t freq, uint32_t duty)
static int32_t w_host_gpio_pwm_stop (wasm_exec_env_t, uint32_t pin)
static int32_t w_host_ui_push_date (wasm_exec_env_t, const char *title, uint32_t d, uint32_t m, uint32_t y, uint32_t action_id)
static int32_t w_host_ui_push_time (wasm_exec_env_t, const char *title, uint32_t h, uint32_t m, uint32_t action_id)
static int32_t w_host_get_firmware_version (wasm_exec_env_t, char *out, uint32_t out_size)
static int32_t w_host_str_to_display (wasm_exec_env_t, const char *in, char *out, uint32_t out_size, uint32_t target)
static int32_t w_host_str_to_utf8 (wasm_exec_env_t, const char *in, char *out, uint32_t out_size)
static int32_t w_host_get_build_profile (wasm_exec_env_t, char *out, uint32_t out_size)
static int32_t w_host_feature_enabled (wasm_exec_env_t, uint32_t feature_id)
static uint32_t w_host_cpu_load (wasm_exec_env_t)
static int32_t w_host_cmd_consume (wasm_exec_env_t, char *out, uint32_t out_size)
static int32_t w_host_msg_register_handler (wasm_exec_env_t, const char *mime, uint32_t aid)
static int32_t w_host_msg_unregister_handler (wasm_exec_env_t, const char *mime)
static int32_t w_host_msg_consume (wasm_exec_env_t, uint8_t *buf, uint32_t buf_size, char *mime_out, uint32_t mime_size)
static int32_t w_host_msg_send_interactive (wasm_exec_env_t, const char *mime, const uint8_t *data, uint32_t len)
static int32_t w_host_msg_send (wasm_exec_env_t exec_env, const uint8_t *addr, uint32_t addr_type, const char *mime, const uint8_t *data, uint32_t len)
static int32_t w_host_ui_acquire_exclusive (wasm_exec_env_t)
static int32_t w_host_ui_release_exclusive (wasm_exec_env_t)
static int32_t w_host_ui_set_inactivity (wasm_exec_env_t, uint32_t timeout_ms, uint32_t action_id)
static int32_t w_host_pixel_strip_init (wasm_exec_env_t, uint32_t gpio, uint32_t num, uint32_t format)
static int32_t w_host_pixel_strip_deinit (wasm_exec_env_t)
static int32_t w_host_pixel_strip_set (wasm_exec_env_t, uint32_t idx, uint32_t r, uint32_t g, uint32_t b)
static int32_t w_host_pixel_strip_fill (wasm_exec_env_t, uint32_t r, uint32_t g, uint32_t b)
static int32_t w_host_pixel_strip_clear (wasm_exec_env_t)
static int32_t w_host_pixel_strip_refresh (wasm_exec_env_t)
static uint32_t w_host_pixel_strip_length (wasm_exec_env_t)
static int32_t w_host_pixel_strip_ready (wasm_exec_env_t)
static int32_t w_host_lockscreen_register_action (wasm_exec_env_t, const char *label_key, uint32_t action_id)
static int32_t w_host_lockscreen_unregister_action (wasm_exec_env_t)
static int32_t w_host_lockscreen_alert (wasm_exec_env_t, const char *text, uint32_t icon, uint32_t action_id)
static int32_t w_host_random_strict (wasm_exec_env_t, uint8_t *buf, uint32_t len)
static int32_t w_host_base64_encode (wasm_exec_env_t, const uint8_t *in, uint32_t in_len, char *out, uint32_t out_size)
static int32_t w_host_base64_decode (wasm_exec_env_t, const char *in, uint32_t in_len, uint8_t *out, uint32_t out_size)
static int32_t w_host_hex_decode (wasm_exec_env_t, const char *in, uint32_t in_len, uint8_t *out, uint32_t out_size)
static int32_t w_host_aes_gcm_encrypt (wasm_exec_env_t exec_env, const uint8_t *key, const uint8_t *iv, const uint8_t *aad, uint32_t aad_len, const uint8_t *pt, uint32_t pt_len, uint8_t *ct, uint8_t *tag)
static int32_t w_host_aes_gcm_decrypt (wasm_exec_env_t exec_env, const uint8_t *key, const uint8_t *iv, const uint8_t *aad, uint32_t aad_len, const uint8_t *ct, uint32_t ct_len, const uint8_t *tag, uint8_t *pt)
static int32_t w_host_local_time (wasm_exec_env_t exec_env, void *out)
static void w_host_log_hex (wasm_exec_env_t, const char *tag, const char *label, const uint8_t *data, uint32_t len)
static int32_t w_host_nvs_erase_all (wasm_exec_env_t)
static int32_t w_host_nvs_list_keys (wasm_exec_env_t exec_env, char *out, uint32_t *out_len)
static int32_t w_host_wifi_mac (wasm_exec_env_t exec_env, uint8_t *out)
static int32_t w_host_wifi_rssi (wasm_exec_env_t)
static int32_t w_host_wifi_start_scan (wasm_exec_env_t)
static int32_t w_host_wifi_scan_done (wasm_exec_env_t)
static int32_t w_host_wifi_scan_results (wasm_exec_env_t exec_env, void *out, uint32_t *count)
static int32_t w_host_gpio_pwm_set_duty (wasm_exec_env_t, uint32_t pin, uint32_t duty)
static int32_t w_host_adc_read (wasm_exec_env_t exec_env, uint32_t pin, uint16_t *raw, uint16_t *mv)
static int32_t w_host_i2c_write (wasm_exec_env_t, uint32_t bus, uint32_t addr, const uint8_t *data, uint32_t len)
static int32_t w_host_i2c_read (wasm_exec_env_t, uint32_t bus, uint32_t addr, uint8_t *data, uint32_t len)
static int32_t w_host_i2c_write_read (wasm_exec_env_t, uint32_t bus, uint32_t addr, const uint8_t *wr, uint32_t wr_len, uint8_t *rd, uint32_t rd_len)
static int32_t w_host_i2c_scan (wasm_exec_env_t exec_env, uint32_t bus, uint8_t *found, uint32_t *count)
static int32_t w_host_sao_eeprom_read (wasm_exec_env_t, uint32_t off, uint8_t *buf, uint32_t len)
static int32_t w_host_sao_eeprom_write (wasm_exec_env_t, uint32_t off, const uint8_t *buf, uint32_t len)
static uint32_t w_host_http_content_length (wasm_exec_env_t, int32_t h)
static int32_t w_host_event_publish (wasm_exec_env_t, uint32_t subtype, uint32_t value)
static int32_t w_host_se_chip_id (wasm_exec_env_t exec_env, uint8_t *serial, uint32_t *len)
static int32_t w_host_se_fw_version (wasm_exec_env_t exec_env, uint8_t *riscv, uint8_t *spect)
static uint32_t w_host_display_width (wasm_exec_env_t)
static uint32_t w_host_display_height (wasm_exec_env_t)
static int32_t w_host_display_clear (wasm_exec_env_t)
static int32_t w_host_display_draw_pixel (wasm_exec_env_t, int32_t x, int32_t y, uint32_t color)
static int32_t w_host_display_draw_line (wasm_exec_env_t, int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t color)
static int32_t w_host_display_draw_rect (wasm_exec_env_t, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color)
static int32_t w_host_display_fill_rect (wasm_exec_env_t, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color)
static int32_t w_host_display_draw_text (wasm_exec_env_t, int32_t x, int32_t y, const char *text, uint32_t size, uint32_t color)
static int32_t w_host_display_flush (wasm_exec_env_t, uint32_t mode)
static int32_t w_host_display_is_busy (wasm_exec_env_t)
static int32_t w_host_key_pressed (wasm_exec_env_t, uint32_t key)
static int32_t w_host_key_consume_next (wasm_exec_env_t, uint8_t *out)
static int32_t w_host_usb_cdc_write (wasm_exec_env_t, const uint8_t *data, uint32_t len)
static int32_t w_host_ble_is_enabled (wasm_exec_env_t)
static int32_t w_host_ble_mac (wasm_exec_env_t exec_env, uint8_t *out)
static int32_t w_host_ble_device_name (wasm_exec_env_t, char *out, uint32_t size)
static int32_t w_host_ble_rssi (wasm_exec_env_t)
static int32_t w_host_ble_register_service (wasm_exec_env_t exec_env, void *def, void *chars, uint32_t num)
static int32_t w_host_ble_unregister_service (wasm_exec_env_t, uint32_t h)
static int32_t w_host_ble_send_notification (wasm_exec_env_t, uint32_t ch, const uint8_t *data, uint32_t len)
static int32_t w_host_ble_send_indication (wasm_exec_env_t, uint32_t ch, const uint8_t *data, uint32_t len)
static int32_t w_host_ble_consume_write (wasm_exec_env_t, uint32_t ch, uint8_t *buf, uint32_t size)
static int32_t w_host_ble_scan_start (wasm_exec_env_t, uint32_t dur)
static int32_t w_host_ble_scan_done (wasm_exec_env_t)
static int32_t w_host_ble_scan_results (wasm_exec_env_t exec_env, void *out, uint32_t *count)
static int32_t w_host_ble_connect (wasm_exec_env_t, const uint8_t *addr, uint32_t type)
static uint32_t w_host_ble_conn_handle (wasm_exec_env_t)
static int32_t w_host_ble_disconnect (wasm_exec_env_t, uint32_t conn)
static int32_t w_host_ble_discover (wasm_exec_env_t, uint32_t conn, const uint8_t *uuid, uint32_t aid)
static int32_t w_host_ble_consume_discovery (wasm_exec_env_t exec_env, void *out, uint32_t *count)
static int32_t w_host_ble_read_char (wasm_exec_env_t, uint32_t conn, uint32_t vh, uint32_t aid)
static int32_t w_host_ble_consume_read (wasm_exec_env_t, uint8_t *buf, uint32_t size)
static int32_t w_host_ble_write_char (wasm_exec_env_t, uint32_t conn, uint32_t vh, const uint8_t *data, uint32_t len, uint32_t wr)
static int32_t w_host_ble_subscribe (wasm_exec_env_t, uint32_t conn, uint32_t cccd, uint32_t aid)
static int32_t w_host_ble_consume_notification (wasm_exec_env_t exec_env, uint16_t *vh_out, uint8_t *buf, uint32_t size)

Variables

static const char * TAG = "GPIO_CMD"
static const char * CMD_MODULE = "gpio"
static const char * TAG = "PLG_UI"
static PluginListViews_active = nullptr
static std::string s_ctxPluginId
static cdc::ui::ContextMenuItem s_ctxItems [2]
static const char * TAG = "PLG_MGR"
static const char * TAG = "PLG_MAN"
static const char * TAG = "PLG_CMD"
static const char * CMD_MODULE = "plugin_manager"
static const char * TAG = "PLG_STO"
static const char * PARTITION_LABEL = "plugins"
static const char * MOUNT_POINT = "/plugins"
static wl_handle_t s_wl_handle = WL_INVALID_HANDLE
static bool s_mounted = false
static const char * TAG = "PLG_PRE"
static const NativeSymbol s_symbols []
static cdc::core::PsramUniquePtr< NativeSymbol > s_symbols_ram

Typedef Documentation

◆ CStdUniquePtr

Definition at line 24 of file Raii.h.

◆ PsramUniquePtr

Definition at line 21 of file Raii.h.

◆ WasmExecEnvPtr

using cdc::plugin_manager::WasmExecEnvPtr = std::unique_ptr<WASMExecEnv, WasmExecEnvDeleter>

Definition at line 46 of file Plugin.h.

◆ WasmInstancePtr

using cdc::plugin_manager::WasmInstancePtr = std::unique_ptr<WASMModuleInstanceCommon, WasmInstanceDeleter>

Definition at line 45 of file Plugin.h.

◆ WasmModulePtr

using cdc::plugin_manager::WasmModulePtr = std::unique_ptr<WASMModuleCommon, WasmModuleDeleter>

Definition at line 44 of file Plugin.h.

Enumeration Type Documentation

◆ CapabilityResult

Enumerator
Ok 
ApiLevelMismatch 
LinearMemoryOutOfRange 
RmemNameInvalid 
EccNameInvalid 
GpioPinNotAllowed 
GpioPinAlreadyHeld 
BleServiceUuidConflict 
BleServiceUuidInvalid 
NvsNamespaceConflict 
NvsNamespaceInvalid 
MissingNvsNamespace 

Definition at line 24 of file CapabilityChecker.h.

◆ PrereqResult

Enumerator
Ok 
SoftFailed 
HardFailed 

Definition at line 18 of file Prerequisites.h.

◆ StartResult

Enumerator
Ok 
PluginAlreadyRunning 
ManifestMissing 
ManifestInvalid 
CapabilityRejected 
WamrLoadFailed 
WamrInstantiateFailed 
PluginInitFailed 
PrerequisiteFailed 
PluginOnEnterFailed 
Busy 
PluginDisabled 

Definition at line 30 of file PluginManager.h.

Function Documentation

◆ beginFileReceive()

bool cdc::plugin_manager::beginFileReceive ( const char * abs_path,
size_t size,
uint32_t crc )

Receive a file over USB-CDC into the plugins partition.

Arms the same binary byte-stream receiver as the PLUGIN UPLOAD commands: replies "READY", then expects exactly size raw bytes whose CRC32 must equal crc, writes them to abs_path and replies "OK <size>". No post-finalize action is taken (pure file write); callers that need a reload issue it separately (e.g. LANG RELOAD). The caller resolves and validates abs_path (absolute, inside the partition); the VFAT serial shell resolves it against its working directory.

Parameters
abs_pathAbsolute destination path, e.g. "/plugins/data/notes.txt".
sizeTotal payload size in bytes (must be > 0).
crcExpected CRC32 of the whole payload.
Returns
true if the receiver was armed (READY sent), false on error.

Definition at line 587 of file PluginSerialCommands.cpp.

◆ clearLockscreenRegistrationFor()

void cdc::plugin_manager::clearLockscreenRegistrationFor ( void * plugin)

Definition at line 83 of file host_api_lockscreen.cpp.

Referenced by host_lockscreen_unregister_action().

◆ collectLockscreenItems()

uint8_t cdc::plugin_manager::collectLockscreenItems ( LockscreenRegistration * out,
uint8_t max )

◆ copyUtf8()

int cdc::plugin_manager::copyUtf8 ( const char * cp437,
char * out,
size_t out_size )

Encode a CP437 string into a caller buffer as UTF-8.

Truncates on a UTF-8 codepoint boundary so the result never ends mid-sequence, and always null-terminates.

Parameters
cp437Source CP437 string (may be nullptr).
outDestination buffer.
out_sizeCapacity of out including the terminator.
Returns
Number of bytes written (excluding terminator), or HOST_ERR_INVALID_ARG.

Definition at line 27 of file host_str_conv.cpp.

References HOST_ERR_INVALID_ARG, and cdc::core::cp437::toUtf8().

Referenced by cdc::plugin_manager::PluginUiState::consumeInputText(), host_str_to_utf8(), and host_view_canvas_get_text().

◆ default_lang_value()

std::string cdc::plugin_manager::default_lang_value ( const std::map< std::string, std::string > & by_lang,
const std::string & dflt_lang )
static

◆ ends_with()

bool cdc::plugin_manager::ends_with ( const char * s,
size_t s_len,
const char * suffix,
size_t suf_len )
static

Definition at line 63 of file PluginStorage.cpp.

Referenced by cdc::plugin_manager::PluginStorage::listPluginIds().

◆ hex_val()

int cdc::plugin_manager::hex_val ( char c)
inline

Convert a single hex digit to its numeric value.

Parameters
cHex character ('0'-'9', 'a'-'f', 'A'-'F').
Returns
Value 0-15, or -1 if c is not a hex digit.

Definition at line 15 of file HexUtil.h.

Referenced by host_hex_decode().

◆ onCtxDisable()

void cdc::plugin_manager::onCtxDisable ( )
static

Context-menu Disable callback: persistently disables and unloads.

Definition at line 38 of file PluginListView.cpp.

References cdc::ui::hideContextMenu(), cdc::plugin_manager::PluginManager::instance(), s_active, s_ctxPluginId, cdc::ui::showToastError(), cdc::ui::showToastInfo(), and cdc::ui::tr().

◆ onCtxEnable()

void cdc::plugin_manager::onCtxEnable ( )
static

Context-menu Enable callback: removes the persistent disabled marker.

Definition at line 56 of file PluginListView.cpp.

References cdc::ui::hideContextMenu(), cdc::plugin_manager::PluginManager::instance(), s_active, s_ctxPluginId, cdc::ui::showToastError(), cdc::ui::showToastInfo(), and cdc::ui::tr().

◆ onCtxStart()

void cdc::plugin_manager::onCtxStart ( )
static

Context-menu Start callback: starts the selected (stopped) plugin.

Definition at line 96 of file PluginListView.cpp.

References cdc::ui::hideContextMenu(), cdc::plugin_manager::PluginManager::instance(), reportStartResult(), s_active, and s_ctxPluginId.

◆ onCtxStop()

void cdc::plugin_manager::onCtxStop ( )
static

Context-menu Stop callback: force-unloads the selected plugin.

Definition at line 24 of file PluginListView.cpp.

References cdc::ui::hideContextMenu(), cdc::plugin_manager::PluginManager::instance(), s_active, s_ctxPluginId, and cdc::plugin_manager::PluginManager::unloadFromRam().

◆ parse_api_level()

bool cdc::plugin_manager::parse_api_level ( const std::string & s,
uint16_t & major,
uint16_t & minor )
static

Definition at line 22 of file PluginManifest.cpp.

Referenced by cdc::plugin_manager::PluginManifest::parse().

◆ parse_capabilities()

◆ parse_localized()

void cdc::plugin_manager::parse_localized ( const cJSON * root,
std::map< std::string, LocalizedString > & out )
static

◆ parse_prereqs()

void cdc::plugin_manager::parse_prereqs ( const cJSON * root,
std::vector< PrerequisiteSpec > & out )
static

◆ psramAlloc()

◆ register_host_imports()

bool cdc::plugin_manager::register_host_imports ( )

Register the "cdc" import namespace with WAMR.

Definition at line 1138 of file WamrImports.cpp.

References plg_log_error(), plg_log_info(), cdc::core::psramAlloc(), s_symbols, and s_symbols_ram.

Referenced by cdc::plugin_manager::PluginManager::init().

◆ registerGpioSerialCommands()

void cdc::plugin_manager::registerGpioSerialCommands ( )

Definition at line 302 of file GpioSerialCommands.cpp.

References CMD_MODULE, cdc::serial::getCommandRegistry(), LOG_I, and TAG.

Referenced by initPluginSystem().

◆ registerPluginSerialCommands()

void cdc::plugin_manager::registerPluginSerialCommands ( )

Definition at line 600 of file PluginSerialCommands.cpp.

References CMD_MODULE, cdc::serial::getCommandRegistry(), LOG_I, and TAG.

Referenced by initPluginSystem().

◆ reportStartResult()

void cdc::plugin_manager::reportStartResult ( StartResult result)
static

Show a toast describing a non-Ok plugin start result.

Definition at line 72 of file PluginListView.cpp.

References Busy, CapabilityRejected, ManifestInvalid, Ok, PluginAlreadyRunning, PluginDisabled, PluginInitFailed, PluginOnEnterFailed, PrerequisiteFailed, cdc::ui::showToastError(), cdc::ui::tr(), and WamrLoadFailed.

Referenced by onCtxStart().

◆ str_or()

std::string cdc::plugin_manager::str_or ( const cJSON * node,
const char * key,
const char * dflt = "" )
static

◆ toDisplay()

◆ unregister_host_imports()

void cdc::plugin_manager::unregister_host_imports ( )

Unregister the imports (called from PluginManager::deinit()).

Definition at line 1159 of file WamrImports.cpp.

References s_symbols_ram.

Referenced by cdc::plugin_manager::PluginManager::deinit().

◆ w_host_adc_read()

int32_t cdc::plugin_manager::w_host_adc_read ( wasm_exec_env_t exec_env,
uint32_t pin,
uint16_t * raw,
uint16_t * mv )
static

Definition at line 741 of file WamrImports.cpp.

References host_adc_read(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_aes_gcm_decrypt()

int32_t cdc::plugin_manager::w_host_aes_gcm_decrypt ( wasm_exec_env_t exec_env,
const uint8_t * key,
const uint8_t * iv,
const uint8_t * aad,
uint32_t aad_len,
const uint8_t * ct,
uint32_t ct_len,
const uint8_t * tag,
uint8_t * pt )
static

Definition at line 686 of file WamrImports.cpp.

References host_aes_gcm_decrypt(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_aes_gcm_encrypt()

int32_t cdc::plugin_manager::w_host_aes_gcm_encrypt ( wasm_exec_env_t exec_env,
const uint8_t * key,
const uint8_t * iv,
const uint8_t * aad,
uint32_t aad_len,
const uint8_t * pt,
uint32_t pt_len,
uint8_t * ct,
uint8_t * tag )
static

Definition at line 677 of file WamrImports.cpp.

References host_aes_gcm_encrypt(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_base32_decode()

int32_t cdc::plugin_manager::w_host_base32_decode ( wasm_exec_env_t ,
const char * in,
uint32_t in_len,
uint8_t * out,
uint32_t out_size )
static

Definition at line 441 of file WamrImports.cpp.

References host_base32_decode().

◆ w_host_base32_encode()

int32_t cdc::plugin_manager::w_host_base32_encode ( wasm_exec_env_t ,
const uint8_t * in,
uint32_t in_len,
char * out,
uint32_t out_size )
static

Definition at line 438 of file WamrImports.cpp.

References host_base32_encode().

◆ w_host_base64_decode()

int32_t cdc::plugin_manager::w_host_base64_decode ( wasm_exec_env_t ,
const char * in,
uint32_t in_len,
uint8_t * out,
uint32_t out_size )
static

Definition at line 673 of file WamrImports.cpp.

References host_base64_decode().

◆ w_host_base64_encode()

int32_t cdc::plugin_manager::w_host_base64_encode ( wasm_exec_env_t ,
const uint8_t * in,
uint32_t in_len,
char * out,
uint32_t out_size )
static

Definition at line 671 of file WamrImports.cpp.

References host_base64_encode().

◆ w_host_battery_mv()

uint32_t cdc::plugin_manager::w_host_battery_mv ( wasm_exec_env_t )
static

Definition at line 62 of file WamrImports.cpp.

References host_battery_mv().

◆ w_host_battery_pct()

uint32_t cdc::plugin_manager::w_host_battery_pct ( wasm_exec_env_t )
static

Definition at line 63 of file WamrImports.cpp.

References host_battery_pct().

◆ w_host_ble_conn_handle()

uint32_t cdc::plugin_manager::w_host_ble_conn_handle ( wasm_exec_env_t )
static

Definition at line 861 of file WamrImports.cpp.

References host_ble_conn_handle().

◆ w_host_ble_connect()

int32_t cdc::plugin_manager::w_host_ble_connect ( wasm_exec_env_t ,
const uint8_t * addr,
uint32_t type )
static

Definition at line 859 of file WamrImports.cpp.

References host_ble_connect().

◆ w_host_ble_consume_discovery()

int32_t cdc::plugin_manager::w_host_ble_consume_discovery ( wasm_exec_env_t exec_env,
void * out,
uint32_t * count )
static

Definition at line 865 of file WamrImports.cpp.

References host_ble_consume_discovery(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_ble_consume_notification()

int32_t cdc::plugin_manager::w_host_ble_consume_notification ( wasm_exec_env_t exec_env,
uint16_t * vh_out,
uint8_t * buf,
uint32_t size )
static

Definition at line 884 of file WamrImports.cpp.

References host_ble_consume_notification(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_ble_consume_read()

int32_t cdc::plugin_manager::w_host_ble_consume_read ( wasm_exec_env_t ,
uint8_t * buf,
uint32_t size )
static

Definition at line 877 of file WamrImports.cpp.

References host_ble_consume_read().

◆ w_host_ble_consume_write()

int32_t cdc::plugin_manager::w_host_ble_consume_write ( wasm_exec_env_t ,
uint32_t ch,
uint8_t * buf,
uint32_t size )
static

Definition at line 844 of file WamrImports.cpp.

References host_ble_consume_write().

◆ w_host_ble_device_name()

int32_t cdc::plugin_manager::w_host_ble_device_name ( wasm_exec_env_t ,
char * out,
uint32_t size )
static

Definition at line 827 of file WamrImports.cpp.

References host_ble_device_name().

◆ w_host_ble_disconnect()

int32_t cdc::plugin_manager::w_host_ble_disconnect ( wasm_exec_env_t ,
uint32_t conn )
static

Definition at line 862 of file WamrImports.cpp.

References host_ble_disconnect().

◆ w_host_ble_discover()

int32_t cdc::plugin_manager::w_host_ble_discover ( wasm_exec_env_t ,
uint32_t conn,
const uint8_t * uuid,
uint32_t aid )
static

Definition at line 863 of file WamrImports.cpp.

References host_ble_discover().

◆ w_host_ble_is_enabled()

int32_t cdc::plugin_manager::w_host_ble_is_enabled ( wasm_exec_env_t )
static

Definition at line 824 of file WamrImports.cpp.

References host_ble_is_enabled().

◆ w_host_ble_mac()

int32_t cdc::plugin_manager::w_host_ble_mac ( wasm_exec_env_t exec_env,
uint8_t * out )
static

Definition at line 825 of file WamrImports.cpp.

References host_ble_mac(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_ble_read_char()

int32_t cdc::plugin_manager::w_host_ble_read_char ( wasm_exec_env_t ,
uint32_t conn,
uint32_t vh,
uint32_t aid )
static

Definition at line 875 of file WamrImports.cpp.

References host_ble_read_char().

◆ w_host_ble_register_service()

int32_t cdc::plugin_manager::w_host_ble_register_service ( wasm_exec_env_t exec_env,
void * def,
void * chars,
uint32_t num )
static

Definition at line 830 of file WamrImports.cpp.

References host_ble_register_service(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_ble_rssi()

int32_t cdc::plugin_manager::w_host_ble_rssi ( wasm_exec_env_t )
static

Definition at line 828 of file WamrImports.cpp.

References host_ble_rssi().

◆ w_host_ble_scan_done()

int32_t cdc::plugin_manager::w_host_ble_scan_done ( wasm_exec_env_t )
static

Definition at line 848 of file WamrImports.cpp.

References host_ble_scan_done().

◆ w_host_ble_scan_results()

int32_t cdc::plugin_manager::w_host_ble_scan_results ( wasm_exec_env_t exec_env,
void * out,
uint32_t * count )
static

Definition at line 849 of file WamrImports.cpp.

References host_ble_scan_results(), HOST_ERR_INVALID_ARG, and wbuf_ok().

◆ w_host_ble_scan_start()

int32_t cdc::plugin_manager::w_host_ble_scan_start ( wasm_exec_env_t ,
uint32_t dur )
static

Definition at line 847 of file WamrImports.cpp.

References host_ble_scan_start().

◆ w_host_ble_send_indication()

int32_t cdc::plugin_manager::w_host_ble_send_indication ( wasm_exec_env_t ,
uint32_t ch,
const uint8_t * data,
uint32_t len )
static

Definition at line 842 of file WamrImports.cpp.

References host_ble_send_indication().

◆ w_host_ble_send_notification()

int32_t cdc::plugin_manager::w_host_ble_send_notification ( wasm_exec_env_t ,
uint32_t ch,
const uint8_t * data,
uint32_t len )
static

Definition at line 840 of file WamrImports.cpp.

References host_ble_send_notification().

◆ w_host_ble_subscribe()

int32_t cdc::plugin_manager::w_host_ble_subscribe ( wasm_exec_env_t ,
uint32_t conn,
uint32_t cccd,
uint32_t aid )
static

Definition at line 882 of file WamrImports.cpp.

References host_ble_subscribe().

◆ w_host_ble_unregister_service()

int32_t cdc::plugin_manager::w_host_ble_unregister_service ( wasm_exec_env_t ,
uint32_t h )
static

Definition at line 839 of file WamrImports.cpp.

References host_ble_unregister_service().

◆ w_host_ble_write_char()

int32_t cdc::plugin_manager::w_host_ble_write_char ( wasm_exec_env_t ,
uint32_t conn,
uint32_t vh,
const uint8_t * data,
uint32_t len,
uint32_t wr )
static

Definition at line 879 of file WamrImports.cpp.

References host_ble_write_char().

◆ w_host_charge_status()

uint32_t cdc::plugin_manager::w_host_charge_status ( wasm_exec_env_t )
static

Definition at line 66 of file WamrImports.cpp.

References host_charge_status().

◆ w_host_cmd_consume()

int32_t cdc::plugin_manager::w_host_cmd_consume ( wasm_exec_env_t ,
char * out,
uint32_t out_size )
static

Definition at line 604 of file WamrImports.cpp.

References host_cmd_consume().

◆ w_host_cpu_load()

uint32_t cdc::plugin_manager::w_host_cpu_load ( wasm_exec_env_t )
static

Definition at line 602 of file WamrImports.cpp.

References host_cpu_load().

◆ w_host_display_clear()

int32_t cdc::plugin_manager::w_host_display_clear ( wasm_exec_env_t )
static

Definition at line 798 of file WamrImports.cpp.

References host_display_clear().

◆ w_host_display_draw_line()

int32_t cdc::plugin_manager::w_host_display_draw_line ( wasm_exec_env_t ,
int32_t x0,
int32_t y0,
int32_t x1,
int32_t y1,
uint32_t color )
static

Definition at line 801 of file WamrImports.cpp.

References host_display_draw_line().

◆ w_host_display_draw_pixel()

int32_t cdc::plugin_manager::w_host_display_draw_pixel ( wasm_exec_env_t ,
int32_t x,
int32_t y,
uint32_t color )
static

Definition at line 799 of file WamrImports.cpp.

References host_display_draw_pixel().

◆ w_host_display_draw_rect()

int32_t cdc::plugin_manager::w_host_display_draw_rect ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t w,
int32_t h,
uint32_t color )
static

Definition at line 804 of file WamrImports.cpp.

References host_display_draw_rect().

◆ w_host_display_draw_text()

int32_t cdc::plugin_manager::w_host_display_draw_text ( wasm_exec_env_t ,
int32_t x,
int32_t y,
const char * text,
uint32_t size,
uint32_t color )
static

Definition at line 810 of file WamrImports.cpp.

References host_display_draw_text().

◆ w_host_display_fill_rect()

int32_t cdc::plugin_manager::w_host_display_fill_rect ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t w,
int32_t h,
uint32_t color )
static

Definition at line 807 of file WamrImports.cpp.

References host_display_fill_rect().

◆ w_host_display_flush()

int32_t cdc::plugin_manager::w_host_display_flush ( wasm_exec_env_t ,
uint32_t mode )
static

Definition at line 813 of file WamrImports.cpp.

References host_display_flush().

◆ w_host_display_height()

uint32_t cdc::plugin_manager::w_host_display_height ( wasm_exec_env_t )
static

Definition at line 797 of file WamrImports.cpp.

References host_display_height().

◆ w_host_display_is_busy()

int32_t cdc::plugin_manager::w_host_display_is_busy ( wasm_exec_env_t )
static

Definition at line 814 of file WamrImports.cpp.

References host_display_is_busy().

◆ w_host_display_width()

uint32_t cdc::plugin_manager::w_host_display_width ( wasm_exec_env_t )
static

Definition at line 796 of file WamrImports.cpp.

References host_display_width().

◆ w_host_ecc_delete()

int32_t cdc::plugin_manager::w_host_ecc_delete ( wasm_exec_env_t ,
const char * name )
static

Definition at line 531 of file WamrImports.cpp.

References host_ecc_delete(), and name.

◆ w_host_ecc_exists()

int32_t cdc::plugin_manager::w_host_ecc_exists ( wasm_exec_env_t ,
const char * name )
static

Definition at line 533 of file WamrImports.cpp.

References host_ecc_exists(), and name.

◆ w_host_ecc_generate()

int32_t cdc::plugin_manager::w_host_ecc_generate ( wasm_exec_env_t ,
const char * name,
uint32_t curve )
static

Definition at line 519 of file WamrImports.cpp.

References curve, host_ecc_generate(), and name.

◆ w_host_ecc_import()

int32_t cdc::plugin_manager::w_host_ecc_import ( wasm_exec_env_t exec_env,
const char * name,
const uint8_t * priv,
uint32_t curve )
static

Definition at line 521 of file WamrImports.cpp.

References curve, host_ecc_import(), HOST_ERR_INVALID_ARG, name, and wbuf_ok().

◆ w_host_ecc_pubkey()

int32_t cdc::plugin_manager::w_host_ecc_pubkey ( wasm_exec_env_t exec_env,
const char * name,
uint8_t * pub,
uint32_t curve )
static

Definition at line 526 of file WamrImports.cpp.

References curve, host_ecc_pubkey(), HOST_ERR_INVALID_ARG, name, and wbuf_ok().

◆ w_host_ecdsa_sign()

int32_t cdc::plugin_manager::w_host_ecdsa_sign ( wasm_exec_env_t exec_env,
const char * name,
const uint8_t * msg,
uint32_t len,
uint8_t * sig )
static

Definition at line 535 of file WamrImports.cpp.

References host_ecdsa_sign(), HOST_ERR_INVALID_ARG, name, and wbuf_ok().

◆ w_host_eddsa_sign()

int32_t cdc::plugin_manager::w_host_eddsa_sign ( wasm_exec_env_t exec_env,
const char * name,
const uint8_t * msg,
uint32_t len,
uint8_t * sig )
static

Definition at line 540 of file WamrImports.cpp.

References host_eddsa_sign(), HOST_ERR_INVALID_ARG, name, and wbuf_ok().

◆ w_host_event_publish()

int32_t cdc::plugin_manager::w_host_event_publish ( wasm_exec_env_t ,
uint32_t subtype,
uint32_t value )
static

Definition at line 775 of file WamrImports.cpp.

References host_event_publish().

◆ w_host_event_subscribe()

int32_t cdc::plugin_manager::w_host_event_subscribe ( wasm_exec_env_t ,
uint32_t mask,
uint32_t action_id )
static

Definition at line 548 of file WamrImports.cpp.

References host_event_subscribe().

◆ w_host_event_unsubscribe()

int32_t cdc::plugin_manager::w_host_event_unsubscribe ( wasm_exec_env_t ,
uint32_t sub )
static

Definition at line 550 of file WamrImports.cpp.

References host_event_unsubscribe().

◆ w_host_feature_enabled()

int32_t cdc::plugin_manager::w_host_feature_enabled ( wasm_exec_env_t ,
uint32_t feature_id )
static

Definition at line 599 of file WamrImports.cpp.

References host_feature_enabled().

◆ w_host_fs_list()

int32_t cdc::plugin_manager::w_host_fs_list ( wasm_exec_env_t ,
char * out,
uint32_t out_size )
static

Definition at line 411 of file WamrImports.cpp.

References host_fs_list(), and HOST_OK.

◆ w_host_fs_read()

int32_t cdc::plugin_manager::w_host_fs_read ( wasm_exec_env_t ,
const char * name,
uint8_t * buf,
uint32_t buf_size )
static

Definition at line 395 of file WamrImports.cpp.

References host_fs_read(), HOST_OK, and name.

◆ w_host_fs_remove()

int32_t cdc::plugin_manager::w_host_fs_remove ( wasm_exec_env_t ,
const char * name )
static

Definition at line 402 of file WamrImports.cpp.

References host_fs_remove(), and name.

◆ w_host_fs_size()

int32_t cdc::plugin_manager::w_host_fs_size ( wasm_exec_env_t ,
const char * name )
static

Definition at line 404 of file WamrImports.cpp.

References host_fs_size(), HOST_OK, and name.

◆ w_host_fs_view()

int32_t cdc::plugin_manager::w_host_fs_view ( wasm_exec_env_t ,
const char * name )
static

Definition at line 418 of file WamrImports.cpp.

References host_fs_view(), and name.

◆ w_host_fs_write()

int32_t cdc::plugin_manager::w_host_fs_write ( wasm_exec_env_t ,
const char * name,
const uint8_t * data,
uint32_t len )
static

Definition at line 392 of file WamrImports.cpp.

References host_fs_write(), and name.

◆ w_host_get_build_profile()

int32_t cdc::plugin_manager::w_host_get_build_profile ( wasm_exec_env_t ,
char * out,
uint32_t out_size )
static

Definition at line 596 of file WamrImports.cpp.

References host_get_build_profile().

◆ w_host_get_firmware_version()

int32_t cdc::plugin_manager::w_host_get_firmware_version ( wasm_exec_env_t ,
char * out,
uint32_t out_size )
static

Definition at line 586 of file WamrImports.cpp.

References host_get_firmware_version().

◆ w_host_gpio_pwm_set_duty()

int32_t cdc::plugin_manager::w_host_gpio_pwm_set_duty ( wasm_exec_env_t ,
uint32_t pin,
uint32_t duty )
static

Definition at line 739 of file WamrImports.cpp.

References host_gpio_pwm_set_duty().

◆ w_host_gpio_pwm_start()

int32_t cdc::plugin_manager::w_host_gpio_pwm_start ( wasm_exec_env_t ,
uint32_t pin,
uint32_t freq,
uint32_t duty )
static

Definition at line 570 of file WamrImports.cpp.

References host_gpio_pwm_start().

◆ w_host_gpio_pwm_stop()

int32_t cdc::plugin_manager::w_host_gpio_pwm_stop ( wasm_exec_env_t ,
uint32_t pin )
static

Definition at line 572 of file WamrImports.cpp.

References host_gpio_pwm_stop().

◆ w_host_gpio_read()

int32_t cdc::plugin_manager::w_host_gpio_read ( wasm_exec_env_t exec_env,
uint32_t pin,
int32_t * out )
static

Definition at line 560 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_gpio_read(), HOST_OK, and wbuf_ok().

◆ w_host_gpio_release()

int32_t cdc::plugin_manager::w_host_gpio_release ( wasm_exec_env_t ,
uint32_t pin )
static

Definition at line 568 of file WamrImports.cpp.

References host_gpio_release().

◆ w_host_gpio_set_direction()

int32_t cdc::plugin_manager::w_host_gpio_set_direction ( wasm_exec_env_t ,
uint32_t pin,
uint32_t dir )
static

Definition at line 554 of file WamrImports.cpp.

References host_gpio_set_direction().

◆ w_host_gpio_set_pull()

int32_t cdc::plugin_manager::w_host_gpio_set_pull ( wasm_exec_env_t ,
uint32_t pin,
uint32_t pull )
static

Definition at line 556 of file WamrImports.cpp.

References host_gpio_set_pull().

◆ w_host_gpio_write()

int32_t cdc::plugin_manager::w_host_gpio_write ( wasm_exec_env_t ,
uint32_t pin,
int32_t level )
static

Definition at line 558 of file WamrImports.cpp.

References host_gpio_write().

◆ w_host_hex_decode()

int32_t cdc::plugin_manager::w_host_hex_decode ( wasm_exec_env_t ,
const char * in,
uint32_t in_len,
uint8_t * out,
uint32_t out_size )
static

Definition at line 675 of file WamrImports.cpp.

References host_hex_decode().

◆ w_host_hex_encode()

int32_t cdc::plugin_manager::w_host_hex_encode ( wasm_exec_env_t ,
const uint8_t * in,
uint32_t in_len,
char * out,
uint32_t out_size )
static

Definition at line 444 of file WamrImports.cpp.

References host_hex_encode().

◆ w_host_hmac_sha256()

int32_t cdc::plugin_manager::w_host_hmac_sha256 ( wasm_exec_env_t exec_env,
const uint8_t * key,
uint32_t klen,
const uint8_t * data,
uint32_t dlen,
uint8_t * out )
static

Definition at line 431 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_hmac_sha256(), and wbuf_ok().

◆ w_host_http_close()

int32_t cdc::plugin_manager::w_host_http_close ( wasm_exec_env_t ,
int32_t h )
static

Definition at line 460 of file WamrImports.cpp.

References host_http_close().

◆ w_host_http_content_length()

uint32_t cdc::plugin_manager::w_host_http_content_length ( wasm_exec_env_t ,
int32_t h )
static

Definition at line 772 of file WamrImports.cpp.

References host_http_content_length().

◆ w_host_http_open()

int32_t cdc::plugin_manager::w_host_http_open ( wasm_exec_env_t ,
uint32_t method,
const char * url,
uint32_t timeout )
static

Definition at line 449 of file WamrImports.cpp.

References host_http_open().

◆ w_host_http_perform()

int32_t cdc::plugin_manager::w_host_http_perform ( wasm_exec_env_t ,
int32_t h )
static

Definition at line 458 of file WamrImports.cpp.

References host_http_perform().

◆ w_host_http_read_chunk()

int32_t cdc::plugin_manager::w_host_http_read_chunk ( wasm_exec_env_t ,
int32_t h,
uint8_t * buf,
uint32_t buf_size )
static

Definition at line 462 of file WamrImports.cpp.

References host_http_read_chunk(), and HOST_OK.

◆ w_host_http_set_body()

int32_t cdc::plugin_manager::w_host_http_set_body ( wasm_exec_env_t ,
int32_t h,
const uint8_t * body,
uint32_t len )
static

Definition at line 455 of file WamrImports.cpp.

References host_http_set_body().

◆ w_host_http_set_header()

int32_t cdc::plugin_manager::w_host_http_set_header ( wasm_exec_env_t ,
int32_t h,
const char * k,
const char * v )
static

Definition at line 452 of file WamrImports.cpp.

References host_http_set_header().

◆ w_host_http_status()

int32_t cdc::plugin_manager::w_host_http_status ( wasm_exec_env_t ,
int32_t h )
static

Definition at line 459 of file WamrImports.cpp.

References host_http_status().

◆ w_host_i18n_current_language()

uint32_t cdc::plugin_manager::w_host_i18n_current_language ( wasm_exec_env_t )
static

Definition at line 359 of file WamrImports.cpp.

References host_i18n_current_language().

◆ w_host_i18n_tr_core()

int32_t cdc::plugin_manager::w_host_i18n_tr_core ( wasm_exec_env_t ,
const char * k,
char * o,
uint32_t c )
static

Definition at line 358 of file WamrImports.cpp.

References host_i18n_tr_core().

◆ w_host_i18n_tr_key()

int32_t cdc::plugin_manager::w_host_i18n_tr_key ( wasm_exec_env_t ,
const char * k,
char * o,
uint32_t c )
static

Definition at line 356 of file WamrImports.cpp.

References host_i18n_tr_key().

◆ w_host_i18n_tr_meta()

int32_t cdc::plugin_manager::w_host_i18n_tr_meta ( wasm_exec_env_t ,
const char * f,
char * o,
uint32_t c )
static

Definition at line 357 of file WamrImports.cpp.

References host_i18n_tr_meta().

◆ w_host_i2c_read()

int32_t cdc::plugin_manager::w_host_i2c_read ( wasm_exec_env_t ,
uint32_t bus,
uint32_t addr,
uint8_t * data,
uint32_t len )
static

Definition at line 750 of file WamrImports.cpp.

References host_i2c_read().

◆ w_host_i2c_scan()

int32_t cdc::plugin_manager::w_host_i2c_scan ( wasm_exec_env_t exec_env,
uint32_t bus,
uint8_t * found,
uint32_t * count )
static

Definition at line 755 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_i2c_scan(), and wbuf_ok().

◆ w_host_i2c_write()

int32_t cdc::plugin_manager::w_host_i2c_write ( wasm_exec_env_t ,
uint32_t bus,
uint32_t addr,
const uint8_t * data,
uint32_t len )
static

Definition at line 748 of file WamrImports.cpp.

References host_i2c_write().

◆ w_host_i2c_write_read()

int32_t cdc::plugin_manager::w_host_i2c_write_read ( wasm_exec_env_t ,
uint32_t bus,
uint32_t addr,
const uint8_t * wr,
uint32_t wr_len,
uint8_t * rd,
uint32_t rd_len )
static

Definition at line 752 of file WamrImports.cpp.

References host_i2c_write_read().

◆ w_host_is_battery_critical()

int32_t cdc::plugin_manager::w_host_is_battery_critical ( wasm_exec_env_t )
static

Definition at line 68 of file WamrImports.cpp.

References host_is_battery_critical().

◆ w_host_is_battery_low()

int32_t cdc::plugin_manager::w_host_is_battery_low ( wasm_exec_env_t )
static

Definition at line 67 of file WamrImports.cpp.

References host_is_battery_low().

◆ w_host_is_time_set()

int32_t cdc::plugin_manager::w_host_is_time_set ( wasm_exec_env_t )
static

Definition at line 59 of file WamrImports.cpp.

References host_is_time_set().

◆ w_host_is_usb_connected()

int32_t cdc::plugin_manager::w_host_is_usb_connected ( wasm_exec_env_t )
static

Definition at line 64 of file WamrImports.cpp.

References host_is_usb_connected().

◆ w_host_key_consume_next()

int32_t cdc::plugin_manager::w_host_key_consume_next ( wasm_exec_env_t ,
uint8_t * out )
static

Definition at line 819 of file WamrImports.cpp.

References host_key_consume_next().

◆ w_host_key_pressed()

int32_t cdc::plugin_manager::w_host_key_pressed ( wasm_exec_env_t ,
uint32_t key )
static

Definition at line 818 of file WamrImports.cpp.

References host_key_pressed().

◆ w_host_local_time()

int32_t cdc::plugin_manager::w_host_local_time ( wasm_exec_env_t exec_env,
void * out )
static

Definition at line 698 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_local_time(), and wbuf_ok().

◆ w_host_lockscreen_alert()

int32_t cdc::plugin_manager::w_host_lockscreen_alert ( wasm_exec_env_t ,
const char * text,
uint32_t icon,
uint32_t action_id )
static

Definition at line 663 of file WamrImports.cpp.

References host_lockscreen_alert().

◆ w_host_lockscreen_register_action()

int32_t cdc::plugin_manager::w_host_lockscreen_register_action ( wasm_exec_env_t ,
const char * label_key,
uint32_t action_id )
static

Definition at line 655 of file WamrImports.cpp.

References host_lockscreen_register_action().

◆ w_host_lockscreen_unregister_action()

int32_t cdc::plugin_manager::w_host_lockscreen_unregister_action ( wasm_exec_env_t )
static

Definition at line 660 of file WamrImports.cpp.

References host_lockscreen_unregister_action().

◆ w_host_log()

void cdc::plugin_manager::w_host_log ( wasm_exec_env_t ,
uint32_t level,
const char * tag,
const char * msg )
static

Definition at line 52 of file WamrImports.cpp.

References host_log().

◆ w_host_log_hex()

void cdc::plugin_manager::w_host_log_hex ( wasm_exec_env_t ,
const char * tag,
const char * label,
const uint8_t * data,
uint32_t len )
static

Definition at line 704 of file WamrImports.cpp.

References host_log_hex().

◆ w_host_msg_consume()

int32_t cdc::plugin_manager::w_host_msg_consume ( wasm_exec_env_t ,
uint8_t * buf,
uint32_t buf_size,
char * mime_out,
uint32_t mime_size )
static

Definition at line 612 of file WamrImports.cpp.

References host_msg_consume().

◆ w_host_msg_register_handler()

int32_t cdc::plugin_manager::w_host_msg_register_handler ( wasm_exec_env_t ,
const char * mime,
uint32_t aid )
static

Definition at line 608 of file WamrImports.cpp.

References host_msg_register_handler().

◆ w_host_msg_send()

int32_t cdc::plugin_manager::w_host_msg_send ( wasm_exec_env_t exec_env,
const uint8_t * addr,
uint32_t addr_type,
const char * mime,
const uint8_t * data,
uint32_t len )
static

Definition at line 618 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_msg_send(), and wbuf_ok().

◆ w_host_msg_send_interactive()

int32_t cdc::plugin_manager::w_host_msg_send_interactive ( wasm_exec_env_t ,
const char * mime,
const uint8_t * data,
uint32_t len )
static

Definition at line 615 of file WamrImports.cpp.

References host_msg_send_interactive().

◆ w_host_msg_unregister_handler()

int32_t cdc::plugin_manager::w_host_msg_unregister_handler ( wasm_exec_env_t ,
const char * mime )
static

Definition at line 610 of file WamrImports.cpp.

References host_msg_unregister_handler().

◆ w_host_nvs_erase()

int32_t cdc::plugin_manager::w_host_nvs_erase ( wasm_exec_env_t ,
const char * key )
static

Definition at line 388 of file WamrImports.cpp.

References host_nvs_erase().

◆ w_host_nvs_erase_all()

int32_t cdc::plugin_manager::w_host_nvs_erase_all ( wasm_exec_env_t )
static

Definition at line 708 of file WamrImports.cpp.

References host_nvs_erase_all().

◆ w_host_nvs_get_blob()

int32_t cdc::plugin_manager::w_host_nvs_get_blob ( wasm_exec_env_t ,
const char * key,
uint8_t * buf,
uint32_t buf_size )
static

Definition at line 363 of file WamrImports.cpp.

References host_nvs_get_blob(), and HOST_OK.

◆ w_host_nvs_get_str()

int32_t cdc::plugin_manager::w_host_nvs_get_str ( wasm_exec_env_t ,
const char * key,
char * buf,
uint32_t buf_size )
static

Definition at line 382 of file WamrImports.cpp.

References host_nvs_get_str().

◆ w_host_nvs_get_u32()

int32_t cdc::plugin_manager::w_host_nvs_get_u32 ( wasm_exec_env_t exec_env,
const char * key,
uint32_t * out )
static

Definition at line 373 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_nvs_get_u32(), and wbuf_ok().

◆ w_host_nvs_list_keys()

int32_t cdc::plugin_manager::w_host_nvs_list_keys ( wasm_exec_env_t exec_env,
char * out,
uint32_t * out_len )
static

Definition at line 709 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_nvs_list_keys(), and wbuf_ok().

◆ w_host_nvs_set_blob()

int32_t cdc::plugin_manager::w_host_nvs_set_blob ( wasm_exec_env_t ,
const char * key,
const uint8_t * buf,
uint32_t len )
static

Definition at line 370 of file WamrImports.cpp.

References host_nvs_set_blob().

◆ w_host_nvs_set_str()

int32_t cdc::plugin_manager::w_host_nvs_set_str ( wasm_exec_env_t ,
const char * key,
const char * value )
static

Definition at line 385 of file WamrImports.cpp.

References host_nvs_set_str().

◆ w_host_nvs_set_u32()

int32_t cdc::plugin_manager::w_host_nvs_set_u32 ( wasm_exec_env_t ,
const char * key,
uint32_t value )
static

Definition at line 379 of file WamrImports.cpp.

References host_nvs_set_u32().

◆ w_host_pixel_strip_clear()

int32_t cdc::plugin_manager::w_host_pixel_strip_clear ( wasm_exec_env_t )
static

Definition at line 648 of file WamrImports.cpp.

References host_pixel_strip_clear().

◆ w_host_pixel_strip_deinit()

int32_t cdc::plugin_manager::w_host_pixel_strip_deinit ( wasm_exec_env_t )
static

Definition at line 637 of file WamrImports.cpp.

References host_pixel_strip_deinit().

◆ w_host_pixel_strip_fill()

int32_t cdc::plugin_manager::w_host_pixel_strip_fill ( wasm_exec_env_t ,
uint32_t r,
uint32_t g,
uint32_t b )
static

Definition at line 644 of file WamrImports.cpp.

References host_pixel_strip_fill().

◆ w_host_pixel_strip_init()

int32_t cdc::plugin_manager::w_host_pixel_strip_init ( wasm_exec_env_t ,
uint32_t gpio,
uint32_t num,
uint32_t format )
static

Definition at line 633 of file WamrImports.cpp.

References host_pixel_strip_init().

◆ w_host_pixel_strip_length()

uint32_t cdc::plugin_manager::w_host_pixel_strip_length ( wasm_exec_env_t )
static

Definition at line 650 of file WamrImports.cpp.

References host_pixel_strip_length().

◆ w_host_pixel_strip_ready()

int32_t cdc::plugin_manager::w_host_pixel_strip_ready ( wasm_exec_env_t )
static

Definition at line 651 of file WamrImports.cpp.

References host_pixel_strip_ready().

◆ w_host_pixel_strip_refresh()

int32_t cdc::plugin_manager::w_host_pixel_strip_refresh ( wasm_exec_env_t )
static

Definition at line 649 of file WamrImports.cpp.

References host_pixel_strip_refresh().

◆ w_host_pixel_strip_set()

int32_t cdc::plugin_manager::w_host_pixel_strip_set ( wasm_exec_env_t ,
uint32_t idx,
uint32_t r,
uint32_t g,
uint32_t b )
static

Definition at line 638 of file WamrImports.cpp.

References host_pixel_strip_set().

◆ w_host_power_source()

uint32_t cdc::plugin_manager::w_host_power_source ( wasm_exec_env_t )
static

Definition at line 65 of file WamrImports.cpp.

References host_power_source().

◆ w_host_random()

int32_t cdc::plugin_manager::w_host_random ( wasm_exec_env_t ,
uint8_t * buf,
uint32_t len )
static

Definition at line 422 of file WamrImports.cpp.

References host_random().

◆ w_host_random_strict()

int32_t cdc::plugin_manager::w_host_random_strict ( wasm_exec_env_t ,
uint8_t * buf,
uint32_t len )
static

Definition at line 669 of file WamrImports.cpp.

References host_random_strict().

◆ w_host_rmem_erase_named()

int32_t cdc::plugin_manager::w_host_rmem_erase_named ( wasm_exec_env_t ,
const char * name )
static

Definition at line 510 of file WamrImports.cpp.

References host_rmem_erase_named(), and name.

◆ w_host_rmem_name_used()

int32_t cdc::plugin_manager::w_host_rmem_name_used ( wasm_exec_env_t ,
const char * name )
static

Definition at line 513 of file WamrImports.cpp.

References host_rmem_name_used(), and name.

◆ w_host_rmem_read_named()

int32_t cdc::plugin_manager::w_host_rmem_read_named ( wasm_exec_env_t ,
const char * name,
uint8_t * buf,
uint32_t buf_size )
static

Definition at line 498 of file WamrImports.cpp.

References HOST_OK, host_rmem_read_named(), and name.

◆ w_host_rmem_slot_size()

uint32_t cdc::plugin_manager::w_host_rmem_slot_size ( wasm_exec_env_t )
static

Definition at line 516 of file WamrImports.cpp.

References host_rmem_slot_size().

◆ w_host_rmem_write_named()

int32_t cdc::plugin_manager::w_host_rmem_write_named ( wasm_exec_env_t ,
const char * name,
const uint8_t * buf,
uint32_t len )
static

Definition at line 506 of file WamrImports.cpp.

References host_rmem_write_named(), and name.

◆ w_host_sao_eeprom_read()

int32_t cdc::plugin_manager::w_host_sao_eeprom_read ( wasm_exec_env_t ,
uint32_t off,
uint8_t * buf,
uint32_t len )
static

Definition at line 765 of file WamrImports.cpp.

References host_sao_eeprom_read().

◆ w_host_sao_eeprom_write()

int32_t cdc::plugin_manager::w_host_sao_eeprom_write ( wasm_exec_env_t ,
uint32_t off,
const uint8_t * buf,
uint32_t len )
static

Definition at line 767 of file WamrImports.cpp.

References host_sao_eeprom_write().

◆ w_host_se_chip_id()

int32_t cdc::plugin_manager::w_host_se_chip_id ( wasm_exec_env_t exec_env,
uint8_t * serial,
uint32_t * len )
static

Definition at line 778 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_se_chip_id(), and wbuf_ok().

◆ w_host_se_fw_version()

int32_t cdc::plugin_manager::w_host_se_fw_version ( wasm_exec_env_t exec_env,
uint8_t * riscv,
uint8_t * spect )
static

Definition at line 788 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_se_fw_version(), and wbuf_ok().

◆ w_host_set_sleep_inhibit()

void cdc::plugin_manager::w_host_set_sleep_inhibit ( wasm_exec_env_t ,
uint32_t on )
static

Definition at line 69 of file WamrImports.cpp.

References host_set_sleep_inhibit().

◆ w_host_sha256()

int32_t cdc::plugin_manager::w_host_sha256 ( wasm_exec_env_t exec_env,
const uint8_t * data,
uint32_t len,
uint8_t * out )
static

Definition at line 425 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_sha256(), and wbuf_ok().

◆ w_host_socket_close()

int32_t cdc::plugin_manager::w_host_socket_close ( wasm_exec_env_t ,
int32_t h )
static

Definition at line 484 of file WamrImports.cpp.

References host_socket_close().

◆ w_host_socket_open()

int32_t cdc::plugin_manager::w_host_socket_open ( wasm_exec_env_t ,
uint32_t proto,
const char * host,
uint32_t port,
uint32_t timeout )
static

Definition at line 471 of file WamrImports.cpp.

References host_socket_open().

◆ w_host_socket_read()

int32_t cdc::plugin_manager::w_host_socket_read ( wasm_exec_env_t ,
int32_t h,
uint8_t * out,
uint32_t cap,
uint32_t timeout )
static

Definition at line 480 of file WamrImports.cpp.

References host_socket_read().

◆ w_host_socket_write()

int32_t cdc::plugin_manager::w_host_socket_write ( wasm_exec_env_t ,
int32_t h,
const uint8_t * data,
uint32_t len,
uint32_t timeout )
static

Definition at line 476 of file WamrImports.cpp.

References host_socket_write().

◆ w_host_str_to_display()

int32_t cdc::plugin_manager::w_host_str_to_display ( wasm_exec_env_t ,
const char * in,
char * out,
uint32_t out_size,
uint32_t target )
static

Definition at line 589 of file WamrImports.cpp.

References host_str_to_display().

◆ w_host_str_to_utf8()

int32_t cdc::plugin_manager::w_host_str_to_utf8 ( wasm_exec_env_t ,
const char * in,
char * out,
uint32_t out_size )
static

Definition at line 593 of file WamrImports.cpp.

References host_str_to_utf8().

◆ w_host_text_pick_font_that_fits()

int32_t cdc::plugin_manager::w_host_text_pick_font_that_fits ( wasm_exec_env_t ,
const char * text,
int32_t max_width_px,
const uint8_t * candidates,
uint32_t count,
uint8_t * out_font_id )
static

Definition at line 269 of file WamrImports.cpp.

References host_text_pick_font_that_fits().

◆ w_host_timezone_offset()

int32_t cdc::plugin_manager::w_host_timezone_offset ( wasm_exec_env_t )
static

Definition at line 60 of file WamrImports.cpp.

References host_timezone_offset().

◆ w_host_ui_acquire_exclusive()

int32_t cdc::plugin_manager::w_host_ui_acquire_exclusive ( wasm_exec_env_t )
static

Definition at line 626 of file WamrImports.cpp.

References host_ui_acquire_exclusive().

◆ w_host_ui_consume_input_int()

int32_t cdc::plugin_manager::w_host_ui_consume_input_int ( wasm_exec_env_t exec_env,
int32_t * out )
static

Definition at line 235 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_ui_consume_input_int(), and wbuf_ok().

◆ w_host_ui_consume_input_text()

int32_t cdc::plugin_manager::w_host_ui_consume_input_text ( wasm_exec_env_t ,
char * out,
uint32_t out_size )
static

Definition at line 232 of file WamrImports.cpp.

References host_ui_consume_input_text().

◆ w_host_ui_insert_list_item()

int32_t cdc::plugin_manager::w_host_ui_insert_list_item ( wasm_exec_env_t exec_env,
uint32_t index,
const ui_item_t * item )
static

◆ w_host_ui_pop()

int32_t cdc::plugin_manager::w_host_ui_pop ( wasm_exec_env_t )
static

Definition at line 204 of file WamrImports.cpp.

References host_ui_pop().

◆ w_host_ui_pop_to_plugin()

int32_t cdc::plugin_manager::w_host_ui_pop_to_plugin ( wasm_exec_env_t )
static

Definition at line 205 of file WamrImports.cpp.

References host_ui_pop_to_plugin().

◆ w_host_ui_push_color_picker()

int32_t cdc::plugin_manager::w_host_ui_push_color_picker ( wasm_exec_env_t ,
uint32_t r,
uint32_t g,
uint32_t b,
uint32_t action_id )
static

Definition at line 227 of file WamrImports.cpp.

References host_ui_push_color_picker().

◆ w_host_ui_push_confirm()

int32_t cdc::plugin_manager::w_host_ui_push_confirm ( wasm_exec_env_t ,
const char * text,
uint32_t icon,
uint32_t action_id )
static

Definition at line 82 of file WamrImports.cpp.

References host_ui_push_confirm().

◆ w_host_ui_push_context_menu()

int32_t cdc::plugin_manager::w_host_ui_push_context_menu ( wasm_exec_env_t exec_env,
const char * title,
const ui_item_t * items,
uint32_t count,
uint32_t sel )
static

◆ w_host_ui_push_date()

int32_t cdc::plugin_manager::w_host_ui_push_date ( wasm_exec_env_t ,
const char * title,
uint32_t d,
uint32_t m,
uint32_t y,
uint32_t action_id )
static

Definition at line 577 of file WamrImports.cpp.

References host_ui_push_date().

◆ w_host_ui_push_info()

int32_t cdc::plugin_manager::w_host_ui_push_info ( wasm_exec_env_t ,
const char * title,
const char * body )
static

Definition at line 79 of file WamrImports.cpp.

References host_ui_push_info().

◆ w_host_ui_push_list()

int32_t cdc::plugin_manager::w_host_ui_push_list ( wasm_exec_env_t exec_env,
const char * title,
const ui_item_t * items,
uint32_t count,
uint32_t sel,
uint32_t menu )
static

Definition at line 114 of file WamrImports.cpp.

◆ w_host_ui_push_message()

int32_t cdc::plugin_manager::w_host_ui_push_message ( wasm_exec_env_t ,
const char * t,
uint32_t icon,
uint32_t ms )
static

Definition at line 76 of file WamrImports.cpp.

References host_ui_push_message().

◆ w_host_ui_push_password()

int32_t cdc::plugin_manager::w_host_ui_push_password ( wasm_exec_env_t ,
const char * title,
const char * initial,
uint32_t max_len,
uint32_t action_id )
static

Definition at line 214 of file WamrImports.cpp.

References host_ui_push_password().

◆ w_host_ui_push_pin_entry()

int32_t cdc::plugin_manager::w_host_ui_push_pin_entry ( wasm_exec_env_t ,
const char * title,
uint32_t max_len,
uint32_t max_attempts,
uint32_t action_id )
static

Definition at line 218 of file WamrImports.cpp.

References host_ui_push_pin_entry().

◆ w_host_ui_push_slider()

int32_t cdc::plugin_manager::w_host_ui_push_slider ( wasm_exec_env_t ,
const char * title,
int32_t min,
int32_t max,
int32_t init,
int32_t step,
const char * unit,
uint32_t action_id )
static

Definition at line 223 of file WamrImports.cpp.

References host_ui_push_slider().

◆ w_host_ui_push_t9_input()

int32_t cdc::plugin_manager::w_host_ui_push_t9_input ( wasm_exec_env_t ,
const char * title,
const char * initial,
uint32_t max_len,
uint32_t action_id )
static

Definition at line 210 of file WamrImports.cpp.

References host_ui_push_t9_input().

◆ w_host_ui_push_time()

int32_t cdc::plugin_manager::w_host_ui_push_time ( wasm_exec_env_t ,
const char * title,
uint32_t h,
uint32_t m,
uint32_t action_id )
static

Definition at line 582 of file WamrImports.cpp.

References host_ui_push_time().

◆ w_host_ui_push_toast()

int32_t cdc::plugin_manager::w_host_ui_push_toast ( wasm_exec_env_t ,
const char * t,
uint32_t icon,
uint32_t ms )
static

Definition at line 73 of file WamrImports.cpp.

References host_ui_push_toast().

◆ w_host_ui_release_exclusive()

int32_t cdc::plugin_manager::w_host_ui_release_exclusive ( wasm_exec_env_t )
static

Definition at line 627 of file WamrImports.cpp.

References host_ui_release_exclusive().

◆ w_host_ui_remove_list_item()

int32_t cdc::plugin_manager::w_host_ui_remove_list_item ( wasm_exec_env_t ,
uint32_t index )
static

Definition at line 176 of file WamrImports.cpp.

References host_ui_remove_list_item().

◆ w_host_ui_repaint()

int32_t cdc::plugin_manager::w_host_ui_repaint ( wasm_exec_env_t )
static

Definition at line 206 of file WamrImports.cpp.

References host_ui_repaint().

◆ w_host_ui_replace_list()

int32_t cdc::plugin_manager::w_host_ui_replace_list ( wasm_exec_env_t exec_env,
const char * title,
const ui_item_t * items,
uint32_t count,
uint32_t sel,
uint32_t menu )
static

Definition at line 120 of file WamrImports.cpp.

◆ w_host_ui_set_inactivity()

int32_t cdc::plugin_manager::w_host_ui_set_inactivity ( wasm_exec_env_t ,
uint32_t timeout_ms,
uint32_t action_id )
static

Definition at line 628 of file WamrImports.cpp.

References host_ui_set_inactivity().

◆ w_host_ui_set_view_empty()

int32_t cdc::plugin_manager::w_host_ui_set_view_empty ( wasm_exec_env_t ,
const char * text )
static

Definition at line 131 of file WamrImports.cpp.

References host_ui_set_view_empty().

◆ w_host_ui_set_view_footer()

int32_t cdc::plugin_manager::w_host_ui_set_view_footer ( wasm_exec_env_t ,
const char * hint )
static

Definition at line 126 of file WamrImports.cpp.

References host_ui_set_view_footer().

◆ w_host_ui_set_view_lifecycle()

int32_t cdc::plugin_manager::w_host_ui_set_view_lifecycle ( wasm_exec_env_t ,
uint32_t hide_action_id,
uint32_t show_action_id )
static

Definition at line 136 of file WamrImports.cpp.

References host_ui_set_view_lifecycle().

◆ w_host_ui_update_list_item()

int32_t cdc::plugin_manager::w_host_ui_update_list_item ( wasm_exec_env_t exec_env,
uint32_t index,
const ui_item_t * item )
static

◆ w_host_ui_wink()

int32_t cdc::plugin_manager::w_host_ui_wink ( wasm_exec_env_t ,
uint32_t count,
uint32_t period_ms )
static

Definition at line 207 of file WamrImports.cpp.

References host_ui_wink().

◆ w_host_unix_time()

int64_t cdc::plugin_manager::w_host_unix_time ( wasm_exec_env_t )
static

Definition at line 58 of file WamrImports.cpp.

References host_unix_time().

◆ w_host_uptime_ms()

uint64_t cdc::plugin_manager::w_host_uptime_ms ( wasm_exec_env_t )
static

Definition at line 57 of file WamrImports.cpp.

References host_uptime_ms().

◆ w_host_usb_cdc_write()

int32_t cdc::plugin_manager::w_host_usb_cdc_write ( wasm_exec_env_t ,
const uint8_t * data,
uint32_t len )
static

Definition at line 820 of file WamrImports.cpp.

References host_usb_cdc_write().

◆ w_host_view_canvas_add_button()

int32_t cdc::plugin_manager::w_host_view_canvas_add_button ( wasm_exec_env_t ,
uint32_t widget_id )
static

Definition at line 316 of file WamrImports.cpp.

References host_view_canvas_add_button().

◆ w_host_view_canvas_add_slider()

int32_t cdc::plugin_manager::w_host_view_canvas_add_slider ( wasm_exec_env_t ,
uint32_t widget_id,
int32_t min,
int32_t max,
int32_t initial,
int32_t step )
static

Definition at line 308 of file WamrImports.cpp.

References host_view_canvas_add_slider().

◆ w_host_view_canvas_add_text()

int32_t cdc::plugin_manager::w_host_view_canvas_add_text ( wasm_exec_env_t ,
uint32_t widget_id,
uint32_t max_len,
const char * initial )
static

Definition at line 312 of file WamrImports.cpp.

References host_view_canvas_add_text().

◆ w_host_view_canvas_clear()

int32_t cdc::plugin_manager::w_host_view_canvas_clear ( wasm_exec_env_t )
static

Definition at line 257 of file WamrImports.cpp.

References host_view_canvas_clear().

◆ w_host_view_canvas_commit()

int32_t cdc::plugin_manager::w_host_view_canvas_commit ( wasm_exec_env_t ,
uint32_t full_refresh )
static

Definition at line 305 of file WamrImports.cpp.

References host_view_canvas_commit().

◆ w_host_view_canvas_draw_rect()

int32_t cdc::plugin_manager::w_host_view_canvas_draw_rect ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t w,
int32_t h,
uint32_t filled )
static

Definition at line 286 of file WamrImports.cpp.

References host_view_canvas_draw_rect().

◆ w_host_view_canvas_draw_text()

int32_t cdc::plugin_manager::w_host_view_canvas_draw_text ( wasm_exec_env_t ,
int32_t x,
int32_t y,
const char * text )
static

Definition at line 277 of file WamrImports.cpp.

References host_view_canvas_draw_text().

◆ w_host_view_canvas_draw_text_aligned()

int32_t cdc::plugin_manager::w_host_view_canvas_draw_text_aligned ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t w,
const char * text,
uint32_t align )
static

Definition at line 280 of file WamrImports.cpp.

References host_view_canvas_draw_text_aligned().

◆ w_host_view_canvas_get_body_size()

int32_t cdc::plugin_manager::w_host_view_canvas_get_body_size ( wasm_exec_env_t exec_env,
uint16_t * w,
uint16_t * h )
static

◆ w_host_view_canvas_get_focus()

int32_t cdc::plugin_manager::w_host_view_canvas_get_focus ( wasm_exec_env_t exec_env,
uint32_t * out )
static

Definition at line 341 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_view_canvas_get_focus(), and wbuf_ok().

◆ w_host_view_canvas_get_text()

int32_t cdc::plugin_manager::w_host_view_canvas_get_text ( wasm_exec_env_t ,
uint32_t widget_id,
char * out,
uint32_t cap )
static

Definition at line 334 of file WamrImports.cpp.

References host_view_canvas_get_text().

◆ w_host_view_canvas_get_value()

int32_t cdc::plugin_manager::w_host_view_canvas_get_value ( wasm_exec_env_t exec_env,
uint32_t widget_id,
int32_t * out )
static

Definition at line 325 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_view_canvas_get_value(), and wbuf_ok().

◆ w_host_view_canvas_hline()

int32_t cdc::plugin_manager::w_host_view_canvas_hline ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t w )
static

Definition at line 297 of file WamrImports.cpp.

References host_view_canvas_hline().

◆ w_host_view_canvas_invert_rect()

int32_t cdc::plugin_manager::w_host_view_canvas_invert_rect ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t w,
int32_t h )
static

Definition at line 292 of file WamrImports.cpp.

References host_view_canvas_invert_rect().

◆ w_host_view_canvas_push()

int32_t cdc::plugin_manager::w_host_view_canvas_push ( wasm_exec_env_t ,
const char * title,
uint32_t key_action_id,
uint32_t widget_action_id )
static

Definition at line 243 of file WamrImports.cpp.

References host_view_canvas_push().

◆ w_host_view_canvas_remove_widget()

int32_t cdc::plugin_manager::w_host_view_canvas_remove_widget ( wasm_exec_env_t ,
uint32_t widget_id )
static

Definition at line 319 of file WamrImports.cpp.

References host_view_canvas_remove_widget().

◆ w_host_view_canvas_set_focus()

int32_t cdc::plugin_manager::w_host_view_canvas_set_focus ( wasm_exec_env_t ,
uint32_t widget_id )
static

Definition at line 338 of file WamrImports.cpp.

References host_view_canvas_set_focus().

◆ w_host_view_canvas_set_font()

int32_t cdc::plugin_manager::w_host_view_canvas_set_font ( wasm_exec_env_t ,
uint32_t font_id )
static

Definition at line 266 of file WamrImports.cpp.

References host_view_canvas_set_font().

◆ w_host_view_canvas_set_footer()

int32_t cdc::plugin_manager::w_host_view_canvas_set_footer ( wasm_exec_env_t ,
const char * hint )
static

Definition at line 254 of file WamrImports.cpp.

References host_view_canvas_set_footer().

◆ w_host_view_canvas_set_key_repeat()

int32_t cdc::plugin_manager::w_host_view_canvas_set_key_repeat ( wasm_exec_env_t ,
uint32_t initial_ms,
uint32_t repeat_ms )
static

Definition at line 347 of file WamrImports.cpp.

References host_view_canvas_set_key_repeat().

◆ w_host_view_canvas_set_long_press_action()

int32_t cdc::plugin_manager::w_host_view_canvas_set_long_press_action ( wasm_exec_env_t ,
uint32_t action_id )
static

Definition at line 351 of file WamrImports.cpp.

References host_view_canvas_set_long_press_action().

◆ w_host_view_canvas_set_text()

int32_t cdc::plugin_manager::w_host_view_canvas_set_text ( wasm_exec_env_t ,
uint32_t widget_id,
const char * text )
static

Definition at line 331 of file WamrImports.cpp.

References host_view_canvas_set_text().

◆ w_host_view_canvas_set_text_color()

int32_t cdc::plugin_manager::w_host_view_canvas_set_text_color ( wasm_exec_env_t ,
uint32_t inverted )
static

Definition at line 263 of file WamrImports.cpp.

References host_view_canvas_set_text_color().

◆ w_host_view_canvas_set_text_size()

int32_t cdc::plugin_manager::w_host_view_canvas_set_text_size ( wasm_exec_env_t ,
uint32_t size )
static

Definition at line 260 of file WamrImports.cpp.

References host_view_canvas_set_text_size().

◆ w_host_view_canvas_set_value()

int32_t cdc::plugin_manager::w_host_view_canvas_set_value ( wasm_exec_env_t ,
uint32_t widget_id,
int32_t value )
static

Definition at line 322 of file WamrImports.cpp.

References host_view_canvas_set_value().

◆ w_host_view_canvas_vline()

int32_t cdc::plugin_manager::w_host_view_canvas_vline ( wasm_exec_env_t ,
int32_t x,
int32_t y,
int32_t h )
static

Definition at line 301 of file WamrImports.cpp.

References host_view_canvas_vline().

◆ w_host_wifi_ip()

int32_t cdc::plugin_manager::w_host_wifi_ip ( wasm_exec_env_t ,
char * out,
uint32_t sz )
static

Definition at line 493 of file WamrImports.cpp.

References host_wifi_ip().

◆ w_host_wifi_is_connected()

int32_t cdc::plugin_manager::w_host_wifi_is_connected ( wasm_exec_env_t )
static

Definition at line 490 of file WamrImports.cpp.

References host_wifi_is_connected().

◆ w_host_wifi_mac()

int32_t cdc::plugin_manager::w_host_wifi_mac ( wasm_exec_env_t exec_env,
uint8_t * out )
static

Definition at line 721 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_wifi_mac(), and wbuf_ok().

◆ w_host_wifi_release()

int32_t cdc::plugin_manager::w_host_wifi_release ( wasm_exec_env_t )
static

Definition at line 489 of file WamrImports.cpp.

References host_wifi_release().

◆ w_host_wifi_request()

int32_t cdc::plugin_manager::w_host_wifi_request ( wasm_exec_env_t ,
uint32_t t )
static

Definition at line 488 of file WamrImports.cpp.

References host_wifi_request().

◆ w_host_wifi_rssi()

int32_t cdc::plugin_manager::w_host_wifi_rssi ( wasm_exec_env_t )
static

Definition at line 723 of file WamrImports.cpp.

References host_wifi_rssi().

◆ w_host_wifi_scan_done()

int32_t cdc::plugin_manager::w_host_wifi_scan_done ( wasm_exec_env_t )
static

Definition at line 725 of file WamrImports.cpp.

References host_wifi_scan_done().

◆ w_host_wifi_scan_results()

int32_t cdc::plugin_manager::w_host_wifi_scan_results ( wasm_exec_env_t exec_env,
void * out,
uint32_t * count )
static

Definition at line 726 of file WamrImports.cpp.

References HOST_ERR_INVALID_ARG, host_wifi_scan_results(), and wbuf_ok().

◆ w_host_wifi_ssid()

int32_t cdc::plugin_manager::w_host_wifi_ssid ( wasm_exec_env_t ,
char * out,
uint32_t sz )
static

Definition at line 491 of file WamrImports.cpp.

References host_wifi_ssid().

◆ w_host_wifi_start_scan()

int32_t cdc::plugin_manager::w_host_wifi_start_scan ( wasm_exec_env_t )
static

Definition at line 724 of file WamrImports.cpp.

References host_wifi_start_scan().

◆ wbuf_ok()

Variable Documentation

◆ CMD_MODULE [1/2]

const char* cdc::plugin_manager::CMD_MODULE = "gpio"
static

◆ CMD_MODULE [2/2]

const char* cdc::plugin_manager::CMD_MODULE = "plugin_manager"
static

Definition at line 42 of file PluginSerialCommands.cpp.

◆ MOUNT_POINT

◆ PARTITION_LABEL

const char* cdc::plugin_manager::PARTITION_LABEL = "plugins"
static

Definition at line 20 of file PluginStorage.cpp.

Referenced by cdc::plugin_manager::PluginStorage::mount().

◆ s_active

◆ s_ctxItems

cdc::ui::ContextMenuItem cdc::plugin_manager::s_ctxItems[2]
static

Definition at line 19 of file PluginListView.cpp.

◆ s_ctxPluginId

std::string cdc::plugin_manager::s_ctxPluginId
static

Definition at line 18 of file PluginListView.cpp.

Referenced by onCtxDisable(), onCtxEnable(), onCtxStart(), and onCtxStop().

◆ s_mounted

◆ s_symbols

const NativeSymbol cdc::plugin_manager::s_symbols[]
static

Definition at line 892 of file WamrImports.cpp.

Referenced by register_host_imports().

◆ s_symbols_ram

cdc::core::PsramUniquePtr<NativeSymbol> cdc::plugin_manager::s_symbols_ram
static

Definition at line 1136 of file WamrImports.cpp.

Referenced by register_host_imports(), and unregister_host_imports().

◆ s_wl_handle

wl_handle_t cdc::plugin_manager::s_wl_handle = WL_INVALID_HANDLE
static

◆ TAG [1/7]

◆ TAG [2/7]

const char* cdc::plugin_manager::TAG = "PLG_UI"
static

Definition at line 13 of file PluginListView.cpp.

◆ TAG [3/7]

const char* cdc::plugin_manager::TAG = "PLG_MGR"
static

Definition at line 43 of file PluginManager.cpp.

◆ TAG [4/7]

const char* cdc::plugin_manager::TAG = "PLG_MAN"
static

Definition at line 11 of file PluginManifest.cpp.

◆ TAG [5/7]

const char* cdc::plugin_manager::TAG = "PLG_CMD"
static

Definition at line 41 of file PluginSerialCommands.cpp.

◆ TAG [6/7]

const char* cdc::plugin_manager::TAG = "PLG_STO"
static

Definition at line 19 of file PluginStorage.cpp.

◆ TAG [7/7]

const char* cdc::plugin_manager::TAG = "PLG_PRE"
static

Definition at line 13 of file Prerequisites.cpp.