Consolidate M0-specific code.

This commit is contained in:
Jared Boone 2016-01-04 12:07:30 -08:00
parent a27489eb21
commit b058c0fe00
4 changed files with 11 additions and 7 deletions

View file

@ -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();