mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 06:49:24 -05:00
Consolidate M0-specific code.
This commit is contained in:
parent
a27489eb21
commit
b058c0fe00
@ -29,10 +29,6 @@
|
||||
#include "lpc43xx_cpp.hpp"
|
||||
using namespace lpc43xx;
|
||||
|
||||
void m4txevent_interrupt_enable() {
|
||||
nvicEnableVector(M4CORE_IRQn, CORTEX_PRIORITY_MASK(LPC43XX_M4TXEVENT_IRQ_PRIORITY));
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
CH_IRQ_HANDLER(M4Core_IRQHandler) {
|
||||
|
@ -22,6 +22,4 @@
|
||||
#ifndef __IRQ_IPC_H__
|
||||
#define __IRQ_IPC_H__
|
||||
|
||||
void m4txevent_interrupt_enable();
|
||||
|
||||
#endif/*__IRQ_IPC_H__*/
|
||||
|
@ -259,7 +259,7 @@ int main(void) {
|
||||
controls_init();
|
||||
lcd_frame_sync_configure();
|
||||
rtc_interrupt_enable();
|
||||
m4txevent_interrupt_enable();
|
||||
lpc43xx::creg::m4txevent::enable();
|
||||
|
||||
event_dispatcher.run();
|
||||
|
||||
|
@ -58,6 +58,16 @@ static_assert(offsetof(LPC_CREG_Type, USB1FLADJ) == 0x600, "USB1FLADJ offset wro
|
||||
|
||||
namespace m4txevent {
|
||||
|
||||
#if defined(LPC43XX_M0)
|
||||
inline void enable() {
|
||||
nvicEnableVector(M4CORE_IRQn, CORTEX_PRIORITY_MASK(LPC43XX_M4TXEVENT_IRQ_PRIORITY));
|
||||
}
|
||||
|
||||
inline void disable() {
|
||||
nvicDisableVector(M4CORE_IRQn);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LPC43XX_M4)
|
||||
inline void assert() {
|
||||
__SEV();
|
||||
|
Loading…
Reference in New Issue
Block a user