mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-12 07:49:32 -05:00
Halt M4 right after sending M0 the shutdown message.
Addresses issue #55.
This commit is contained in:
parent
805442d46f
commit
5d8c636f40
@ -205,6 +205,13 @@ static void shutdown() {
|
|||||||
systick_stop();
|
systick_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void halt() {
|
||||||
|
port_disable();
|
||||||
|
while(true) {
|
||||||
|
port_wait_for_interrupt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class EventDispatcher {
|
class EventDispatcher {
|
||||||
public:
|
public:
|
||||||
MessageHandlerMap& message_handlers() {
|
MessageHandlerMap& message_handlers() {
|
||||||
@ -346,5 +353,7 @@ int main(void) {
|
|||||||
ShutdownMessage shutdown_message;
|
ShutdownMessage shutdown_message;
|
||||||
shared_memory.application_queue.push(shutdown_message);
|
shared_memory.application_queue.push(shutdown_message);
|
||||||
|
|
||||||
|
halt();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user