/* sim-driver: calls between the sim port's files (and the page, through the exported functions). */ #pragma once #include #include #ifdef __cplusplus extern "C" { #endif void sim_set_mac(const uint8_t mac[6]); #ifdef SIM_MANUAL_CLOCK void sim_clock_set_us(int64_t us); #endif /** Load the NVS store from JSON ({"ns": {"key": ["str", "v"], ...}}). False if the text is not valid. */ int sim_nvs_load(const char *json); /** The NVS store as JSON. The caller frees it. */ char *sim_nvs_dump(void); /** Copy the strip's last written frame (RGB, pixel 0 first) into out. Returns the LED count. */ int sim_frame(uint8_t *out, int cap); #ifdef __cplusplus } #endif