feat: add the clock functionality with NTP support
This commit is contained in:
+3
-1
@@ -19,7 +19,7 @@ use esp_println as _;
|
||||
use esp_radio::wifi::sta::StationConfig;
|
||||
use esp_radio::wifi::{ControllerConfig, Interface, WifiController};
|
||||
|
||||
use cover_theif::http_api::{self, HttpApiProps, HttpApiService};
|
||||
use cover_theif::{http_api::{self, HttpApiProps, HttpApiService}, clock};
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
@@ -99,6 +99,8 @@ async fn main(spawner: Spawner) -> ! {
|
||||
info!("Got IP: {}", config.address);
|
||||
}
|
||||
|
||||
spawner.spawn(clock::ntp_upkeep_service(net_stack).unwrap());
|
||||
|
||||
spawner.spawn(http_api_serve_task(HttpApiService::new(net_stack, Default::default(), Default::default())).unwrap());
|
||||
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user