/*!
@defgroup power_manager_ytm32b1ld0 Power Manager Driver
@ingroup power_manager
@brief This module covers the device-specific power_manager functionality implemented for YTM32B1LD0 SOC.

## Hardware background ##

System Clock Unit(SCU) and Power Control Unit(PCU) is passing the system into and out of all low-power
 and Run modes.\n Controls the power, clocks and memories of the system to achieve
the power consumption and functionality of that mode.


## Driver consideration ##

Power mode entry and sleep-on-exit-value are provided at
initialization time through the power manager user configuration structure.\n
The available power mode entries are the following ones: SLEEP, DEEPSLEEP, STANDBY, POWERDONE.\n

This is an example of configuration:
@code

 power_manager_user_config_t pwrMan_InitConfig = {
     .powerMode = POWER_MANAGER_RUN,
     .sleepOnExitValue = false,
 };

 power_manager_user_config_t *powerConfigsArr[] = {
     &pwrMan_InitConfig
 };

 power_manager_callback_user_config_t * powerCallbacksConfigsArr[] = {(void *)0};

 if (STATUS_SUCCESS != POWER_SYS_Init(&powerConfigsArr,1,&powerCallbacksConfigsArr,0)) {
     ...
 }
 else {
     ...
 }

 if (STATUS_SUCCESS != POWER_SYS_SetMode(0,POWER_MANAGER_POLICY_AGREEMENT)) {
     ...
 }
 else {
     ...
 }

@endcode

### Compilation units ###

The following files need to be compiled in the project:
\verbatim
${SDK_PATH}\platform\drivers\src\power_manager.c
${SDK_PATH}\platform\drivers\src\YTM32B1MDx\power_manager_YTM32B1MDx.c
\endverbatim

### Include path ###

The following paths need to be added to the include path of the toolchain:
\verbatim
${SDK_PATH}\platform\drivers\inc\
${SDK_PATH}\platform\drivers\src\power\
${SDK_PATH}\platform\drivers\src\power\YTM32B1MDx\
\endverbatim

### Compile symbols ###

No special symbols are required for this component

### Dependencies ###

\ref clock_manager



## Important Note

1. The power manager driver won't check if necessary wakeup sources are enabled.
   It is the responsibility of the user to ensure that the wakeup sources are
   enabled before calling the power manager APIs.

2. The debug module is not available under DeepSleep/Standby mode. Please remove
  the debugger before low power mode entry.

3. The power manager driver doesn't call in the interrupt service routine.

4. If user code is configured to enter low power mode right after system start, the
   debugger may not be able to access the system, and user could not program the chip
   again, so add delay during development.

*/
