pkarashchenko commented on code in PR #6673:
URL: https://github.com/apache/incubator-nuttx/pull/6673#discussion_r927454683
##########
include/nuttx/power/pm.h:
##########
@@ -85,6 +87,14 @@
* own, custom idle loop to support board-specific IDLE time power management
*/
+#define PM_WAKELOCK_INITIALIZER(name, domain, state) {name, domain, state}
+
+#define PM_WAKELOCK_DECLARE(var, name, domain, state) \
+ struct pm_wakelock_s var = PM_WAKELOCK_INITIALIZER(name, domain, state)
+
+#define PM_WAKELOCK_DECLARE_STATIC(var, name, domain, state) \
Review Comment:
why do we need a special macro for static? I mean why `static
PM_WAKELOCK_DECLARE(x, y, z, t);` can't be used?
##########
include/nuttx/power/pm.h:
##########
@@ -631,13 +801,27 @@ void pm_auto_updatestate(int domain);
* avoid so much conditional compilation in driver code when PM is disabled:
*/
+# define PM_WAKELOCK_INITIALIZER(n,d,s) {0}
Review Comment:
is `PM_WAKELOCK_INITIALIZER` going to be used away from
`PM_WAKELOCK_DECLARE` or `PM_WAKELOCK_DECLARE_STATIC`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]