mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 02:59:43 +00:00
Enable M4 interrupt on M0 core only when M4 image is running.
This commit is contained in:
@@ -85,9 +85,13 @@ void stop() {
|
||||
|
||||
void run_image(const portapack::spi_flash::region_t image_region) {
|
||||
m4_init(image_region, portapack::memory::map::m4_code);
|
||||
|
||||
creg::m4txevent::enable();
|
||||
}
|
||||
|
||||
void shutdown() {
|
||||
creg::m4txevent::disable();
|
||||
|
||||
ShutdownMessage shutdown_message;
|
||||
shared_memory.baseband_queue.push_and_wait(shutdown_message);
|
||||
}
|
||||
|
@@ -105,14 +105,10 @@ EventDispatcher::EventDispatcher(
|
||||
}
|
||||
|
||||
void EventDispatcher::run() {
|
||||
creg::m4txevent::enable();
|
||||
|
||||
while(is_running) {
|
||||
const auto events = wait();
|
||||
dispatch(events);
|
||||
}
|
||||
|
||||
creg::m4txevent::disable();
|
||||
}
|
||||
|
||||
void EventDispatcher::request_stop() {
|
||||
|
Reference in New Issue
Block a user