espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
706 stars 169 forks source link

Should rpc be used for custom hosts (esp-hosted/features) #282

Closed claydonkey closed 12 months ago

claydonkey commented 12 months ago

I'll keep it brief here.

Should I attempt to use the rpc_wrap calls for a new host? Although the branch code, as it stands seems incomplete - it seems like this is where I should concentrate my efforts.

If this action is recommended then Should I scrap esp_wifi_init and go for: esp_hosted_init(esp_hosted_up_cb) and register the rpc calls?

Any pointers as how to hook previous slave code would be appreciated...

  1. What is the purpose of esp_hosted_up_cb. Is it just a generic callback for the user to implement stuff after initialization?
  2. I had been working with station_example.c from examples/wifi/station. I assume I should start with TEST_RAW_TP?
  3. Where should a new "esp_wifi_init" (for port) be invoked?
  4. Does esp_netif_init remain where it is?
void app_task(void const *arg)
{
#if !TEST_RAW_TP
    app_main();
#else
    H_ERROR_CHECK(esp_hosted_init(NULL));
#endif
    while (1) {
        hosted_sleep(5U);
    }
}