/*! * \file hal_sleep.h * * \brief The header of hal_sleep.c * * \copyright Revised BSD License, see section \ref LICENSE. * * \code * * _ __ _ ________ _ * | |/ /(_)___ / ____/ /_ (_)___ * | // / __ \/ / / __ \/ / __ \ * / |/ / / / / /___/ / / / / /_/ / * /_/|_/_/_/ /_/\____/_/ /_/_/ .___/ * /_/ * (C) 2022-2025 XinChip * * \endcode * * \author ( XinChip ) Alex-J * * \author ( XinChip ) */ #ifndef HAL_SLEEP_H #define HAL_SLEEP_H #ifdef __cplusplus extern "C" { #endif #include "hal_types.h" /********************************************************************* * FUNCTIONS */ extern void system_sleep_init(void); /* * Execute power management procedure */ extern void halSleep( uint32 osal_timer ); /* * Used in mac_mcu */ extern void halSleepWait(uint16 duration); /* * Used in hal_drivers, AN044 - DELAY EXTERNAL INTERRUPTS */ extern void halRestoreSleepLevel( void ); /* * Used by the interrupt routines to exit from sleep. */ extern void halSleepExit(void); /* * Set the max sleep loop time lesser than the T2 rollover period. */ extern void halSetMaxSleepLoopTime(uint32 rolloverTime); /********************************************************************* *********************************************************************/ #ifdef __cplusplus } #endif #endif