Skip to content

Commit 625dae5

Browse files
committed
boards: particle_boron: update for new GPIO API
Use the non-deprecated flags and configure the modem power switch as active-low. The UBLOX_PWR_DETECT signal appears to be active high. Signed-off-by: Peter Bigot <[email protected]>
1 parent 61aa9f3 commit 625dae5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

boards/arm/particle_boron/board.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ static int board_particle_boron_init(struct device *dev)
4545
return -ENODEV;
4646
}
4747

48-
gpio_pin_configure(gpio_dev, V_INT_DETECT_GPIO_PIN, GPIO_DIR_IN);
48+
gpio_pin_configure(gpio_dev, V_INT_DETECT_GPIO_PIN,
49+
GPIO_INPUT | V_INT_DETECT_GPIO_FLAGS);
4950

5051
gpio_pin_configure(gpio_dev, SERIAL_BUFFER_ENABLE_GPIO_PIN,
51-
GPIO_DIR_OUT);
52-
gpio_pin_write(gpio_dev, SERIAL_BUFFER_ENABLE_GPIO_PIN, 0);
52+
GPIO_OUTPUT_ACTIVE
53+
| SERIAL_BUFFER_ENABLE_GPIO_FLAGS);
5354
#endif
5455

5556
return 0;

boards/arm/particle_boron/board.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
/* pin used to enable the buffer power */
1111
#define SERIAL_BUFFER_ENABLE_GPIO_NAME DT_INST_0_NORDIC_NRF_GPIO_LABEL
1212
#define SERIAL_BUFFER_ENABLE_GPIO_PIN 25
13+
#define SERIAL_BUFFER_ENABLE_GPIO_FLAGS GPIO_ACTIVE_LOW
1314

1415
/* pin used to detect V_INT (buffer power) */
15-
#define V_INT_DETECT_GPIO_PIN 2
16+
#define V_INT_DETECT_GPIO_PIN 2
17+
#define V_INT_DETECT_GPIO_FLAGS GPIO_ACTIVE_HIGH
1618

1719
/* SKYWORKS SKY13351 antenna selection settings (only use vctl1) */
1820
#define ANT_UFLn_GPIO_NAME DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_CONTROLLER

0 commit comments

Comments
 (0)