Skip to content

Commit df1e47d

Browse files
committed
tests: gpio_basic_api: Enable test on nucleo_f103rb
Update nucleo_f103rb device tree description to fit new API and add overlay to enable test with gpio_basic_api. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent cfd7323 commit df1e47d

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

boards/arm/nucleo_f103rb/nucleo_f103rb.dts

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
leds {
2222
compatible = "gpio-leds";
2323
green_led_2: led_2 {
24-
gpios = <&gpioa 5 GPIO_INT_ACTIVE_HIGH>;
24+
gpios = <&gpioa 5 0>;
2525
label = "User LD2";
2626
};
2727
};
@@ -30,10 +30,37 @@
3030
compatible = "gpio-keys";
3131
user_button: button {
3232
label = "User";
33-
gpios = <&gpioc 13 GPIO_INT_ACTIVE_LOW>;
33+
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
3434
};
3535
};
3636

37+
arduino_header: connector {
38+
compatible = "arduino-header-r3";
39+
#gpio-cells = <2>;
40+
gpio-map = <0 0 &gpioa 0 0>, /* A0 */
41+
<1 0 &gpioa 1 0>, /* A1 */
42+
<2 0 &gpioa 4 0>, /* A2 */
43+
<3 0 &gpiob 0 0>, /* A3 */
44+
<4 0 &gpioc 1 0>, /* A4 */
45+
<5 0 &gpioc 0 0>, /* A5 */
46+
<6 0 &gpioa 3 0>, /* D0 */
47+
<7 0 &gpioa 2 0>, /* D1 */
48+
<8 0 &gpioa 10 0>, /* D2 */
49+
<9 0 &gpiob 3 0>, /* D3 */
50+
<10 0 &gpiob 5 0>, /* D4 */
51+
<11 0 &gpiob 4 0>, /* D5 */
52+
<12 0 &gpiob 10 0>, /* D6 */
53+
<13 0 &gpioa 8 0>, /* D7 */
54+
<14 0 &gpioa 9 0>, /* D8 */
55+
<15 0 &gpioc 7 0>, /* D9 */
56+
<16 0 &gpiob 6 0>, /* D10 */
57+
<17 0 &gpioa 7 0>, /* D11 */
58+
<18 0 &gpioa 6 0>, /* D12 */
59+
<19 0 &gpioa 5 0>, /* D13 */
60+
<20 0 &gpiob 9 0>, /* D14 */
61+
<21 0 &gpiob 8 0>; /* D15 */
62+
};
63+
3764
aliases {
3865
led0 = &green_led_2;
3966
sw0 = &user_button;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2019 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
resources {
9+
compatible = "test,gpio_basic_api";
10+
out-gpios = <&arduino_header 0 0>; /* Arduino A0 */
11+
in-gpios = <&arduino_header 1 0>; /* Arduino A1 */
12+
};
13+
};

0 commit comments

Comments
 (0)