forked from Imagelibrary/rtems
Optional Clock_driver_support_shutdown_hardware()
Make Clock_driver_support_shutdown_hardware() optional. This avoids the atexit() support on memory constrained targets.
This commit is contained in:
@@ -67,13 +67,12 @@ static void Clock_driver_support_initialize_hardware(void)
|
||||
lm32_interrupt_unmask(CLOCK_IRQMASK);
|
||||
}
|
||||
|
||||
static void Clock_driver_support_shutdown_hardware(void)
|
||||
{
|
||||
/* Disable clock interrupts and stop */
|
||||
|
||||
lm32_interrupt_unmask(CLOCK_IRQMASK);
|
||||
clockwrite(LM32_CLOCK_CR, LM32_CLOCK_CR_STOP);
|
||||
}
|
||||
#define Clock_driver_support_shutdown_hardware() \
|
||||
do { \
|
||||
/* Disable clock interrupts and stop */ \
|
||||
lm32_interrupt_unmask(CLOCK_IRQMASK); \
|
||||
clockwrite(LM32_CLOCK_CR, LM32_CLOCK_CR_STOP); \
|
||||
} while (0)
|
||||
|
||||
#define CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER
|
||||
|
||||
|
||||
@@ -40,11 +40,11 @@ static void Clock_driver_support_initialize_hardware(void)
|
||||
bsp_interrupt_vector_enable(MM_IRQ_TIMER0);
|
||||
}
|
||||
|
||||
static void Clock_driver_support_shutdown_hardware(void)
|
||||
{
|
||||
bsp_interrupt_vector_disable(MM_IRQ_TIMER0);
|
||||
MM_WRITE(MM_TIMER0_CONTROL, 0);
|
||||
}
|
||||
#define Clock_driver_support_shutdown_hardware() \
|
||||
do { \
|
||||
bsp_interrupt_vector_disable(MM_IRQ_TIMER0); \
|
||||
MM_WRITE(MM_TIMER0_CONTROL, 0); \
|
||||
} while (0)
|
||||
|
||||
#define CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user