diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-28 15:17:20 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-28 15:17:20 +0200 |
commit | 460ecf074d133cbe026cbddb7cf5fad1180c9831 (patch) | |
tree | 2beb0cfa84698dbb723c7c62acec703fad3437da /src/arch/stm32f446re-nucleo | |
parent | cf3ba89c46301bb8c0a1eda470c353801117fc0b (diff) |
Set loop/wakeup/ostream either via .config or via app/commandline
Diffstat (limited to 'src/arch/stm32f446re-nucleo')
-rw-r--r-- | src/arch/stm32f446re-nucleo/arch.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arch/stm32f446re-nucleo/arch.cc b/src/arch/stm32f446re-nucleo/arch.cc index 6216843..c7566b6 100644 --- a/src/arch/stm32f446re-nucleo/arch.cc +++ b/src/arch/stm32f446re-nucleo/arch.cc @@ -39,7 +39,7 @@ void Arch::setup(void) timer_set_period(TIM2, 4294967295); timer_enable_irq(TIM2, TIM_DIER_UIE); -#ifdef WITH_LOOP +#ifdef CONFIG_loop rcc_periph_clock_enable(RCC_TIM3); nvic_enable_irq(NVIC_TIM3_IRQ); rcc_periph_reset_pulse(RST_TIM3); @@ -59,11 +59,11 @@ void Arch::setup(void) #endif } -#ifdef WITH_WAKEUP +#ifdef CONFIG_wakeup extern void wakeup(); #endif -#if defined(WITH_LOOP) +#if defined(CONFIG_loop) extern void loop(); volatile char run_loop = 0; #endif @@ -91,7 +91,7 @@ void Arch::idle_loop(void) while (1) { pwr_set_standby_mode(); __asm__("wfi"); -#ifdef WITH_LOOP +#ifdef CONFIG_loop if (run_loop) { loop(); run_loop = 0; @@ -102,14 +102,14 @@ void Arch::idle_loop(void) void Arch::idle(void) { -#ifdef WITH_WAKEUP +#ifdef CONFIG_wakeup wakeup(); #endif } Arch arch; -#if defined(WITH_LOOP) || defined(TIMER_S) +#if defined(CONFIG_loop) || defined(TIMER_S) #include "driver/uptime.h" @@ -117,7 +117,7 @@ void tim3_isr(void) { if (timer_get_flag(TIM3, TIM_SR_UIF)) { timer_clear_flag(TIM3, TIM_SR_UIF); -#ifdef WITH_LOOP +#ifdef CONFIG_loop run_loop = 1; #endif #ifdef TIMER_S |