2020-01-27 05:37:50 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020 Piotr Mienkowski
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file
|
|
|
|
* @brief Silabs EFR32BG13P MCU pin definitions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SOC_PINMAP_H_
|
|
|
|
#define SOC_PINMAP_H_
|
|
|
|
|
2020-04-22 18:18:45 +08:00
|
|
|
#include <devicetree.h>
|
2020-01-27 05:37:50 +08:00
|
|
|
#include <em_gpio.h>
|
|
|
|
|
2020-04-22 18:18:45 +08:00
|
|
|
#define GPIO_NODE DT_INST(0, silabs_gecko_gpio)
|
|
|
|
#if DT_NODE_HAS_PROP(GPIO_NODE, location_swo)
|
|
|
|
#define SWO_LOCATION DT_PROP(GPIO_NODE, location_swo)
|
|
|
|
#endif
|
|
|
|
|
2020-01-27 05:37:50 +08:00
|
|
|
/* Serial Wire Output (SWO) */
|
2020-04-22 18:18:45 +08:00
|
|
|
#if (SWO_LOCATION == 0)
|
2020-01-27 05:37:50 +08:00
|
|
|
#define PIN_SWO {gpioPortF, 2, gpioModePushPull, 1}
|
2020-04-22 18:18:45 +08:00
|
|
|
#elif (SWO_LOCATION == 1)
|
2020-01-27 05:37:50 +08:00
|
|
|
#define PIN_SWO {gpioPortB, 13, gpioModePushPull, 1}
|
2020-04-22 18:18:45 +08:00
|
|
|
#elif (SWO_LOCATION == 2)
|
2020-01-27 05:37:50 +08:00
|
|
|
#define PIN_SWO {gpioPortD, 15, gpioModePushPull, 1}
|
2020-04-22 18:18:45 +08:00
|
|
|
#elif (SWO_LOCATION == 3)
|
2020-01-27 05:37:50 +08:00
|
|
|
#define PIN_SWO {gpioPortC, 11, gpioModePushPull, 1}
|
2020-04-22 18:18:45 +08:00
|
|
|
#elif (SWO_LOCATION >= 4)
|
2020-01-27 05:37:50 +08:00
|
|
|
#error ("Invalid SWO pin location")
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* SOC_PINMAP_H_ */
|