/ * @brief Configure Board Controller bus decode logic * @param[in] mode Mode of operation for decode logic *****************************************************************************/
| 103 | * @param[in] mode Mode of operation for decode logic |
| 104 | *****************************************************************************/ |
| 105 | void DVK_busControlMode(DVK_BusControl_TypeDef mode) |
| 106 | { |
| 107 | /* Configure GPIO pins for Board Bus mode */ |
| 108 | /* Note: Inverter on GPIO lines to BC, so signals are active low */ |
| 109 | CMU_ClockEnable(cmuClock_GPIO, true); |
| 110 | |
| 111 | switch (mode) |
| 112 | { |
| 113 | case DVK_BusControl_OFF: |
| 114 | /* Configure board for OFF mode on PB15 MCU_EBI_CONNECT */ |
| 115 | GPIO_PinModeSet(gpioPortB, 15, gpioModePushPull, 1); |
| 116 | /* Configure board for OFF mode on PD13 MCU_SPI_CONNECT */ |
| 117 | GPIO_PinModeSet(gpioPortD, 13, gpioModePushPull, 1); |
| 118 | break; |
| 119 | case DVK_BusControl_DIRECT: |
| 120 | /* Configure board for DIRECT on PB15 MCU_EBI_CONNECT */ |
| 121 | GPIO_PinModeSet(gpioPortB, 15, gpioModePushPull, 0); |
| 122 | /* Configure board for DIRECT on PD13 MCU_SPI_CONNECT */ |
| 123 | GPIO_PinModeSet(gpioPortD, 13, gpioModePushPull, 0); |
| 124 | break; |
| 125 | case DVK_BusControl_SPI: |
| 126 | /* Configure board for SPI mode on PB15 MCU_EBI_CONNECT */ |
| 127 | GPIO_PinModeSet(gpioPortB, 15, gpioModePushPull, 1); |
| 128 | /* Configure board for SPI mode on PD13 MCU_SPI_CONNECT */ |
| 129 | GPIO_PinModeSet(gpioPortD, 13, gpioModePushPull, 0); |
| 130 | break; |
| 131 | case DVK_BusControl_EBI: |
| 132 | default: |
| 133 | /* Configure board for EBI mode on PB15 MCU_EBI_CONNECT */ |
| 134 | GPIO_PinModeSet(gpioPortB, 15, gpioModePushPull, 0); |
| 135 | /* Configure board for EBI mode on PD13 MCU_SPI_CONNECT */ |
| 136 | GPIO_PinModeSet(gpioPortD, 13, gpioModePushPull, 1); |
| 137 | break; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | |
| 142 | /**************************************************************************//** |
no test coverage detected