esp-hosted: fix warnings.
This commit is contained in:
@ -16,6 +16,7 @@ pub struct Control<'a> {
|
||||
shared: &'a Shared,
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
enum WifiMode {
|
||||
None = 0,
|
||||
Sta = 1,
|
||||
@ -34,6 +35,7 @@ impl<'a> Control<'a> {
|
||||
|
||||
debug!("set wifi mode");
|
||||
self.set_wifi_mode(WifiMode::Sta as _).await;
|
||||
|
||||
let mac_addr = self.get_mac_addr().await;
|
||||
debug!("mac addr: {:02x}", mac_addr);
|
||||
self.state_ch.set_ethernet_address(mac_addr);
|
||||
@ -91,18 +93,6 @@ impl<'a> Control<'a> {
|
||||
res
|
||||
}
|
||||
|
||||
async fn get_wifi_mode(&mut self) -> u32 {
|
||||
let req = proto::CtrlMsg {
|
||||
msg_id: proto::CtrlMsgId::ReqGetWifiMode as _,
|
||||
msg_type: proto::CtrlMsgType::Req as _,
|
||||
payload: Some(proto::CtrlMsgPayload::ReqGetWifiMode(proto::CtrlMsgReqGetMode {})),
|
||||
};
|
||||
let resp = self.ioctl(req).await;
|
||||
let proto::CtrlMsgPayload::RespGetWifiMode(resp) = resp.payload.unwrap() else { panic!("unexpected resp") };
|
||||
assert_eq!(resp.resp, 0);
|
||||
resp.mode
|
||||
}
|
||||
|
||||
async fn set_wifi_mode(&mut self, mode: u32) {
|
||||
let req = proto::CtrlMsg {
|
||||
msg_id: proto::CtrlMsgId::ReqSetWifiMode as _,
|
||||
|
Reference in New Issue
Block a user