CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
host_api_lifecycle.cpp
Go to the documentation of this file.
1
11
14
15namespace pm = cdc::plugin_manager;
16
17extern "C" void* plg_get_active_plugin(void);
18
19extern "C" int host_set_resident(bool resident)
20{
21 auto* p = static_cast<pm::Plugin*>(plg_get_active_plugin());
22 if (!p) return HOST_ERR_GENERIC;
23 p->setResidentRequested(resident);
24 return HOST_OK;
25}
Owned WAMR module instance + per-plugin state.
bool resident
int host_set_resident(bool resident)
Request (true) or drop (false) background residency. Needs the background or autoload capability to h...
CDC Badge OS plugin host API - canonical C ABI contract.
#define HOST_OK
Definition host_api.h:37
#define HOST_ERR_GENERIC
Definition host_api.h:38
void * plg_get_active_plugin(void)