tests: gpio: Enable gpio_basic_api test on rv32m1_vega_ri5cy
Enables the 2-pin gpio test on the rv32m1_vega_ri5cy board by adding a dts overlay and configuring pinmuxes on the arduino header. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
03c3b4bed5
commit
16cdb774b3
2 changed files with 20 additions and 1 deletions
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
resources {
|
||||
compatible = "test,gpio_basic_api";
|
||||
out-gpios = <&arduino_header 6 0>; /* Arduino D0 */
|
||||
in-gpios = <&arduino_header 7 0>; /* Arduino D1 */
|
||||
};
|
||||
};
|
|
@ -8,7 +8,7 @@
|
|||
#include "test_gpio.h"
|
||||
|
||||
/* Grotesque hack for pinmux boards */
|
||||
#if defined(CONFIG_BOARD_FRDM_K64F)
|
||||
#if defined(CONFIG_BOARD_FRDM_K64F) || defined(CONFIG_BOARD_RV32M1_VEGA)
|
||||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
#elif defined(CONFIG_BOARD_UDOO_NEO_FULL_M4)
|
||||
|
@ -109,6 +109,12 @@ static void board_setup(void)
|
|||
);
|
||||
pinmux_pin_set(port0, PIN_IN, pin_config);
|
||||
pinmux_pin_set(port0, PIN_OUT, pin_config);
|
||||
#elif defined(CONFIG_BOARD_RV32M1_VEGA)
|
||||
const char *pmx_name = CONFIG_PINMUX_RV32M1_PORTA_NAME;
|
||||
struct device *pmx = device_get_binding(pmx_name);
|
||||
|
||||
pinmux_pin_set(pmx, PIN_OUT, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
pinmux_pin_set(pmx, PIN_IN, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue