- Remove unnecessary includes
- Remove redundant definitions (sample is not portable anyway)
- Use printf
- Check for device readiness
- Do not check for zero ticks (not possible for the given
timeout/driver), also, driver should likely error for such case anyway
- Check for all error codes
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1. Enable os_timer as a wakeup-source in the board
dts file.
2. Enable PM_DEVICE when PM is enabled.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add a sample to put the part into Deep power down mode by
setting the state to PM_STATE_SOFT_OFF.
Wakup the part using an RTC alarm.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>