1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

cpu/saml21: define required power modes

We can get rid initially blocked pm modes \o/
This commit is contained in:
Jue 2022-10-29 14:13:33 +02:00
parent 24461b43f8
commit 73e6886b2c

View File

@ -41,6 +41,27 @@ extern "C" {
#define SAML21_PM_MODE_IDLE (2) /**< CPU sleeping, peripherals are active */
/** @} */
/**
* @name Peripheral power mode requirements
* @{
*/
#define SAM0_GPIO_PM_BLOCK SAML21_PM_MODE_BACKUP /**< GPIO IRQs require STANDBY mode */
#define SAM0_RTCRTT_PM_BLOCK SAML21_PM_MODE_BACKUP /**< RTC/TRR require STANDBY mode */
#define SAM0_SPI_PM_BLOCK SAML21_PM_MODE_STANDBY /**< SPI in DMA mode require IDLE mode */
#define SAM0_TIMER_PM_BLOCK SAML21_PM_MODE_STANDBY /**< Timers require IDLE mode */
#define SAM0_UART_PM_BLOCK SAML21_PM_MODE_STANDBY /**< UART RX IRQ require IDLE mode */
#define SAM0_USB_IDLE_PM_BLOCK SAML21_PM_MODE_BACKUP /**< Idle USB require STANDBY mode */
#define SAM0_USB_ACTIVE_PM_BLOCK SAML21_PM_MODE_STANDBY /**< Active USB require IDLE mode */
/** @} */
/**
* @brief Override the default initial PM blocker
* All peripheral drivers ensure required pm modes are blocked
*/
#ifndef PM_BLOCKER_INITIAL
#define PM_BLOCKER_INITIAL { 0, 0, 0 }
#endif
/**
* @name SAML21 GCLK definitions
* @{