[rtems commit] bsp/atsam: Use proper API

Sebastian Huber sebh at rtems.org
Tue Jun 18 09:27:00 UTC 2019


Module:    rtems
Branch:    master
Commit:    bb24892ad431861dfb6236e47d674e20fea60850
Changeset: http://git.rtems.org/rtems/commit/?id=bb24892ad431861dfb6236e47d674e20fea60850

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jun 18 11:10:55 2019 +0200

bsp/atsam: Use proper API

---

 bsps/arm/atsam/start/power.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/bsps/arm/atsam/start/power.c b/bsps/arm/atsam/start/power.c
index f9b5a39..c32dbd3 100644
--- a/bsps/arm/atsam/start/power.c
+++ b/bsps/arm/atsam/start/power.c
@@ -18,9 +18,6 @@
 
 #include <libchip/chip.h>
 
-/* SCR Sleep deep bit */
-#define SCR_SLEEPDEEP (1u << 2)
-
 void atsam_power_change_state(
     const atsam_power_control *controls,
     size_t n,
@@ -92,7 +89,7 @@ void atsam_power_handler_sleep_mode(const atsam_power_control *control, atsam_po
 			/* Enable Low Power Mode in the Fast Startup Mode Register */
 			PMC->PMC_FSMR &= (uint32_t)~PMC_FSMR_LPM;
 			/* Do not set deep sleep, but "normal" sleep */
-			SCB->SCR &= (uint32_t)~SCR_SLEEPDEEP;
+			SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
 
 			__asm__ volatile ("wfi");
 			break;




More information about the vc mailing list