wes3 commented on a change in pull request #2035: [WIP] DA1469x UART rx pullup
URL: https://github.com/apache/mynewt-core/pull/2035#discussion_r334071840
##########
File path: hw/mcu/dialog/da1469x/src/hal_uart.c
##########
@@ -463,6 +477,34 @@ hal_uart_config(int port, int32_t baudrate, uint8_t
databits, uint8_t stopbits,
if (!baudrate_cfg) {
return SYS_ENOTSUP;
}
+
+ /* Enable pullup if configured */
+ if (uart->cfg->rx_pullup) {
+ mcu_gpio_set_pin_function(uart->cfg->pin_rx,
MCU_GPIO_MODE_INPUT_PULLUP,
+ uart->rx_pin_func);
+ }
Review comment:
Debated putting it in hal_uart_init() as opposed to config and close but
since hal_uart_init is only called once (typically) decided to put in
hal_uart_config(). This would allow an app to close the uart, repurpose that
pin, and not have to call hal_uart_init again.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services