forked from M-Labs/kirdy
main: poll iface for dfu & hard rst ctrl msgs
This commit is contained in:
parent
51913f2e2f
commit
9c611fc861
|
@ -261,6 +261,7 @@ fn main() -> ! {
|
||||||
None,
|
None,
|
||||||
&mut socket,
|
&mut socket,
|
||||||
);
|
);
|
||||||
|
net::net::eth_poll_iface();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,6 +296,7 @@ pub fn execute_cmd(
|
||||||
unsafe {
|
unsafe {
|
||||||
dfu::set_dfu_trigger();
|
dfu::set_dfu_trigger();
|
||||||
}
|
}
|
||||||
|
net::eth_poll_iface();
|
||||||
*state = State::HardReset;
|
*state = State::HardReset;
|
||||||
}
|
}
|
||||||
Some(DeviceCmd::SetActiveReportMode) => match cmd.json.data_bool {
|
Some(DeviceCmd::SetActiveReportMode) => match cmd.json.data_bool {
|
||||||
|
@ -364,6 +365,7 @@ pub fn execute_cmd(
|
||||||
}
|
}
|
||||||
Some(DeviceCmd::HardReset) => {
|
Some(DeviceCmd::HardReset) => {
|
||||||
send_response(buffer, ResponseEnum::Acknowledge, None, socket);
|
send_response(buffer, ResponseEnum::Acknowledge, None, socket);
|
||||||
|
net::eth_poll_iface();
|
||||||
*state = State::PrepareForHardReset;
|
*state = State::PrepareForHardReset;
|
||||||
}
|
}
|
||||||
None => { /* Do Nothing */ }
|
None => { /* Do Nothing */ }
|
||||||
|
|
|
@ -433,7 +433,7 @@ pub fn eth_update_iface_poll_timer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn eth_poll_iface() {
|
pub fn eth_poll_iface() {
|
||||||
unsafe {
|
unsafe {
|
||||||
if let Some(ref mut server_handle) = SERVER_HANDLE {
|
if let Some(ref mut server_handle) = SERVER_HANDLE {
|
||||||
server_handle.poll_iface();
|
server_handle.poll_iface();
|
||||||
|
|
Loading…
Reference in New Issue