Skip to content

Commit

Permalink
samples: fix zephyr/drivers/gpio.h usage
Browse files Browse the repository at this point in the history
Only include the header if using any of the GPIO API calls/
struct/defines.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
  • Loading branch information
gmarull committed Dec 16, 2024
1 parent 974ba2d commit 3864c89
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 20 deletions.
1 change: 0 additions & 1 deletion samples/bluetooth/central_past/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <zephyr/bluetooth/gap.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/hci.h>
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <zephyr/settings/settings.h>
#include <zephyr/devicetree.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/hwinfo.h>
#include <zephyr/sys/byteorder.h>

Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/peripheral_past/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/hci.h>
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/st_ble_sensor/src/button_svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "button_svc.h"

#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>

Expand Down
1 change: 0 additions & 1 deletion samples/boards/bbc/microbit/display/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/device.h>

#include <zephyr/display/mb_display.h>
Expand Down
1 change: 0 additions & 1 deletion samples/boards/bbc/microbit/pong/src/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/device.h>
#include <string.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/drivers/gpio.h>

#include "ble_mesh.h"
#include "common.h"
#include "device_composition.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

#include <math.h>
#include <zephyr/drivers/gpio.h>

#include "ble_mesh.h"
#include "device_composition.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/drivers/gpio.h>

#include "ble_mesh.h"
#include "common.h"
#include "device_composition.h"
Expand Down
1 change: 0 additions & 1 deletion samples/boards/phytec/reel_board/mesh_badge/src/periphs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include "board.h"
#include "mesh.h"
Expand Down
1 change: 0 additions & 1 deletion samples/drivers/espi/src/espi_oob_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <zephyr/device.h>
#include <soc.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/espi.h>
#include <zephyr/logging/log_ctrl.h>
#include <zephyr/logging/log.h>
Expand Down
1 change: 0 additions & 1 deletion samples/drivers/i2s/i2s_codec/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <zephyr/sys/printk.h>
#include <zephyr/audio/dmic.h>
#include <zephyr/drivers/i2s.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/audio/codec.h>
#include <string.h>

Expand Down
1 change: 0 additions & 1 deletion samples/drivers/ipm/ipm_esp32/src/procpu_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <stdlib.h>

#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/regulator.h>
#include <zephyr/drivers/watchdog.h>
#include <zephyr/dt-bindings/gpio/nordic-npm6001-gpio.h>
Expand Down
1 change: 0 additions & 1 deletion samples/drivers/kscan/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/gpio.h>
#include <soc.h>
#include <zephyr/drivers/kscan.h>

Expand Down
1 change: 0 additions & 1 deletion samples/net/lwm2m_client/src/lwm2m-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);

#include <zephyr/drivers/hwinfo.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/net/lwm2m.h>
#include <zephyr/net/conn_mgr_monitor.h>
Expand Down
1 change: 0 additions & 1 deletion samples/sensor/grow_r502a/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor/grow_r502a.h>
#include <zephyr/drivers/led.h>

Expand Down
1 change: 0 additions & 1 deletion samples/subsys/modbus/rtu_client/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/modbus/modbus.h>

#include <zephyr/logging/log.h>
Expand Down
1 change: 0 additions & 1 deletion samples/subsys/usb_c/sink/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/usb_c/usbc.h>

#include <zephyr/logging/log.h>
Expand Down
1 change: 0 additions & 1 deletion samples/subsys/usb_c/source/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/usb_c/usbc.h>

#include <zephyr/logging/log.h>
Expand Down

0 comments on commit 3864c89

Please sign in to comment.