X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fpower.h;h=93c40c0394936d09552074b905eb423e9b4113aa;hb=a826f128ef56409cf87f60a0748bae388ccf42de;hp=04c06076d75330da1c9e47f0c15189e654ef0401;hpb=81ac20d5d87b2262381f15e0a2d1cdb46ea80791;p=bertos.git diff --git a/bertos/cpu/power.h b/bertos/cpu/power.h index 04c06076..93c40c03 100644 --- a/bertos/cpu/power.h +++ b/bertos/cpu/power.h @@ -37,10 +37,10 @@ #ifndef CPU_POWER_H #define CPU_POWER_H -#include -#include +#include "cfg/cfg_proc.h" +#include "cfg/cfg_wdt.h" -#if CONFIG_KERNEL +#if CONFIG_KERN #include #endif @@ -52,7 +52,7 @@ * Let the CPU rest in tight busy loops * * User code that sits in a busy loop should call cpu_relax() every - * once in a while to perform system-depndent idle processing. + * once in a while to perform system-dependent idle processing. * * Depending on the system configuration, this might perform different * actions: @@ -61,10 +61,12 @@ * - reset the watchdog timer to avoid it from triggering * - scale the CPU speed down to save power (unimplemented) * - let the event loop of the emulator process a few events + * + * \see proc_yield() cpu_pause() */ INLINE void cpu_relax(void) { -#if CONFIG_KERNEL +#if CONFIG_KERN proc_yield(); #endif @@ -90,10 +92,12 @@ INLINE void cpu_relax(void) * IRQ_ENABLE(); * \endcode * - * \note Some implementations of cpu_pause() may return before any interrupt has occurred - * Caller code should be written taking this into account. + * \note Some implementations of cpu_pause() may return before any interrupt + * has occurred. Calling code should take this possibility into account. * * \note This function is currently unimplemented + * + * \see cpu_relax() cpu_yield() */ INLINE void cpu_pause(void) {