mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-10 16:49:36 +00:00
Push M0 halt code into a function.
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
#include "lpc43xx_cpp.hpp"
|
||||
using namespace lpc43xx;
|
||||
|
||||
#include "message.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
|
||||
@@ -51,3 +54,10 @@ void m4_init(const portapack::spi_flash::region_t from, const portapack::memory:
|
||||
void m4_request_shutdown() {
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
void m0_halt() {
|
||||
rgu::reset(rgu::Reset::M0APP);
|
||||
while(true) {
|
||||
port_wait_for_interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user