Push M0 halt code into a function.

This commit is contained in:
Jared Boone
2016-02-16 11:04:35 -08:00
parent 64da082306
commit 7fbe57931e
3 changed files with 13 additions and 5 deletions
+10
View File
@@ -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();
}
}