diff --git a/Libraries/PeriphDrivers/Source/AFE/afe.c b/Libraries/PeriphDrivers/Source/AFE/afe.c index 2356519986..d64d3a5c7a 100644 --- a/Libraries/PeriphDrivers/Source/AFE/afe.c +++ b/Libraries/PeriphDrivers/Source/AFE/afe.c @@ -65,7 +65,7 @@ // // Enabling this will use the afe timer to timeout polling of the AFE. -// This avoid any chance of the blocking function afe_spi_transceive from never returning. +// This avoids any chance of the blocking function afe_spi_transceive from never returning. // However, as this low level function can be called several times for even a single // AFE register read, it decreases throughput to and from the AFE. // When running at lower system clock frequencies this can be more of a concern. @@ -524,7 +524,7 @@ static int afe_spi_transceive(uint8_t *data, int byte_length) #else // Not AFE_SPI_TRANSCEIVE_SAFE_BUT_SLOWER // -// This function blocks until transceive is completed, or times out +// This function blocks until transceive is completed // This version does not use the afe timer to interrupt potential infinite polling. // static int afe_spi_transceive(uint8_t *data, int byte_length) diff --git a/Libraries/PeriphDrivers/Source/AFE/hart_uart.c b/Libraries/PeriphDrivers/Source/AFE/hart_uart.c index 2258f71512..c1782bae8e 100644 --- a/Libraries/PeriphDrivers/Source/AFE/hart_uart.c +++ b/Libraries/PeriphDrivers/Source/AFE/hart_uart.c @@ -487,7 +487,7 @@ static int hart_uart_pins_external_test_mode_state(void) int retval = 0; mxc_gpio_cfg_t hart_pin; - // RTS Input to AFE, LOW is transmit mode, so Pulling Up + // HART_RTS Input to AFE, LOW is transmit mode, so Pulling Up hart_pin.port = HART_RTS_GPIO_PORT; hart_pin.mask = HART_RTS_GPIO_PIN; hart_pin.pad = MXC_GPIO_PAD_PULL_UP; @@ -498,30 +498,33 @@ static int hart_uart_pins_external_test_mode_state(void) return retval; } - // CD output from AFE, Tristate + // HART_CD output from AFE, Tristate hart_pin.port = HART_CD_GPIO_PORT; hart_pin.mask = HART_CD_GPIO_PIN; hart_pin.pad = MXC_GPIO_PAD_NONE; + hart_pin.func = MXC_GPIO_FUNC_IN; retval = MXC_AFE_GPIO_Config(&hart_pin); if (retval != E_NO_ERROR) { return retval; } - // IN input to AFE, pulling Up + // HART_IN input to AFE, pulling Up hart_pin.port = HART_IN_GPIO_PORT; hart_pin.mask = HART_IN_GPIO_PIN; hart_pin.pad = MXC_GPIO_PAD_PULL_UP; + hart_pin.func = MXC_GPIO_FUNC_IN; retval = MXC_AFE_GPIO_Config(&hart_pin); if (retval != E_NO_ERROR) { return retval; } - // IN output from AFE, Tristate + // HART_OUT output from AFE, Tristate hart_pin.port = HART_OUT_GPIO_PORT; hart_pin.mask = HART_OUT_GPIO_PIN; hart_pin.pad = MXC_GPIO_PAD_NONE; + hart_pin.func = MXC_GPIO_FUNC_IN; retval = MXC_AFE_GPIO_Config(&hart_pin); if (retval != E_NO_ERROR) {