mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-26 14:36:17 -05:00
Enable M4 interrupt on M0 core only when M4 image is running.
This commit is contained in:
parent
c7497577a0
commit
e263420ea3
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user