samples: boards: nrf: system_off: fix includes

Include only what is needed, also sort includes properly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2023-08-31 15:44:16 +02:00 committed by Carles Cufí
commit 7fb662032d
3 changed files with 14 additions and 5 deletions

View file

@ -4,15 +4,19 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include "retained.h"
#include <inttypes.h>
#include <stdio.h> #include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h> #include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/pm/device.h> #include <zephyr/pm/device.h>
#include <zephyr/sys/poweroff.h> #include <zephyr/sys/poweroff.h>
#include <soc.h> #include <zephyr/sys/util.h>
#include "retained.h"
#include <hal/nrf_gpio.h> #include <hal/nrf_gpio.h>
#include <soc.h>
#define BUSY_WAIT_S 2U #define BUSY_WAIT_S 2U
#define SLEEP_S 2U #define SLEEP_S 2U

View file

@ -4,13 +4,17 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include "retained.h"
#include <stdint.h>
#include <string.h> #include <string.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/devicetree.h> #include <zephyr/devicetree.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/crc.h> #include <zephyr/sys/crc.h>
#include <hal/nrf_power.h> #include <hal/nrf_power.h>
#include "retained.h"
/* nRF52 RAM (really, RAM AHB slaves) are partitioned as: /* nRF52 RAM (really, RAM AHB slaves) are partitioned as:
* * Up to 8 blocks of two 4 KiBy byte "small" sections * * Up to 8 blocks of two 4 KiBy byte "small" sections

View file

@ -7,7 +7,8 @@
#ifndef RETAINED_H_ #ifndef RETAINED_H_
#define RETAINED_H_ #define RETAINED_H_
#include <inttypes.h> #include <stdbool.h>
#include <stdint.h>
/* Example of validatable retained data. */ /* Example of validatable retained data. */
struct retained_data { struct retained_data {