| // Copyright 2022 Google LLC. |
| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| |
| #ifndef MATCHA_SW_DEVICE_LIB_TESTING_PINMUX_TESTUTILS_H_ |
| #define MATCHA_SW_DEVICE_LIB_TESTING_PINMUX_TESTUTILS_H_ |
| |
| #include <stdint.h> |
| |
| #include "sw/device/lib/dif/dif_gpio.h" |
| #include "sw/device/lib/dif/dif_pinmux.h" |
| |
| /** |
| * Default pinmux initialization. |
| * |
| * Initializes GPIOs to map to the lowest-numbered MIOs, except where it |
| * conflicts with UARTs. Then initializes 2 UART mappings to (IOC3,IOC10) and |
| * (IOC4,IOC10), denoted as (RX pin,TX pin). |
| * |
| * This function is specific to top_matcha |
| */ |
| void pinmux_testutils_init(dif_pinmux_t *pinmux); |
| |
| extern const dif_pinmux_index_t kPinmuxTestutilsGpioInselPins[kDifGpioNumPins]; |
| extern const dif_pinmux_index_t kPinmuxTestutilsGpioMioOutPins[kDifGpioNumPins]; |
| |
| #endif // MATCHA_SW_DEVICE_LIB_TESTING_PINMUX_TESTUTILS_H_ |