[riot-notifications] [RIOT-OS/RIOT] pm: WIP for power management that uses submodules (#7597)

Kaspar Schleiser notifications at github.com
Fri Sep 15 13:17:27 CEST 2017


kaspar030 requested changes on this pull request.



> @@ -3,6 +3,9 @@ export CFLAGS += -DCOREIF_NG=1
 
 # tell the build system that the CPU depends on the atmega common files
 USEMODULE += atmega_common
+USEMODULE += pm_fallback_set_lowest

can these be moved to atmega_common?

> @@ -26,6 +26,14 @@
 #include "irq.h"
 #include "periph/pm.h"
 
+void pm_set_lowest(void) {}

shouldn't this be in the common pm_fallback_set_lowest?

> @@ -26,6 +26,14 @@
 #include "irq.h"
 #include "periph/pm.h"
 
+void pm_set_lowest(void) {}
+
+void pm_off(void)

dito

> @@ -3,5 +3,6 @@ INCLUDES += -I$(RIOTCPU)/cortexm_common/include
 INCLUDES += -I$(RIOTCPU)/cortexm_common/include/vendor
 
 USEMODULE += cortexm_common_periph
+include $(RIOTCPU)/cortexm_common/Makefile.dep

cannot include Makefile.dep from a different makefile

> @@ -1,3 +1,7 @@
 export CPU_ARCH = cortex-m4f
 
+USEMODULE += pm_cortexm_common_set_lowest
+USEMODULE += pm_cortexm_common_off

don't all cortexm  boards use the cortexm_common off and reboot?

>  # use common periph functions
 USEMODULE += periph_common
+USEMODULE += pm_cortexm_common_set_lowest

IMO we can generalize this for all cortexm boards:
if not (feature_provided(periph/pm)) -> use ...._common_set_lowest
of make it dependend on whether pm_layered is used.

> @@ -23,6 +23,14 @@
 
 #include "cpu.h"
 
+void pm_set_lowest(void) {

use pm_fallback_coretexm_common_

> + *
+ * @file
+ * @brief       Platform-independent power management fallback code
+ *
+ * @author      Kaspar Schleiser <kaspar at schleiser.de>
+ *
+ * @}
+ */
+
+#include "irq.h"
+#include "periph/pm.h"
+
+#define ENABLE_DEBUG (0)
+#include "debug.h"
+
+void pm_set_lowest(void) {}

I don't like this file much... ;)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/7597#pullrequestreview-63012729
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170915/2b0ec535/attachment.html>


More information about the notifications mailing list