mirror of
https://github.com/t-crest/rtems.git
synced 2025-12-05 15:15:48 +00:00
Implemented ISR management routines
This commit is contained in:
@@ -44,8 +44,6 @@ extern char _cpuinfo_base; /* linker symbol giving the address of the CPU info *
|
|||||||
|
|
||||||
extern uint32_t get_cpu_freq_mhz(void);
|
extern uint32_t get_cpu_freq_mhz(void);
|
||||||
|
|
||||||
#define __PATMOS_INF 0xFFFFFFFF /* maximum cycles the clock can run without interrupts */
|
|
||||||
|
|
||||||
/* Address to access the CPU id */
|
/* Address to access the CPU id */
|
||||||
#define __PATMOS_CPU_ID_ADDR (&_cpuinfo_base + 0x00)
|
#define __PATMOS_CPU_ID_ADDR (&_cpuinfo_base + 0x00)
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,24 @@ extern "C" {
|
|||||||
asm volatile ( "nop" ); \
|
asm volatile ( "nop" ); \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Manipulate the interrupt level
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define patmos_flash_interrupts( _level ) \
|
||||||
|
do { \
|
||||||
|
register uint32_t _ignored = 0; \
|
||||||
|
\
|
||||||
|
patmos_enable_interrupts( (_level) ); \
|
||||||
|
_ignored = patmos_disable_interrupts(); \
|
||||||
|
} while ( 0 )
|
||||||
|
|
||||||
|
#define patmos_get_interrupt_level( _level ) \
|
||||||
|
do { \
|
||||||
|
(_level) = \
|
||||||
|
~EXC_STATUS & CPU_MODES_INTERRUPT_MASK; \
|
||||||
|
} while ( 0 )
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user