aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorardnew <[email protected]>2021-09-11 05:30:26 -0500
committerRon Evans <[email protected]>2021-09-13 09:29:20 +0200
commitca4f2510509fc6e3195e046a5198980a4ad5fe53 (patch)
tree833ab1b5ea708254dba9d51b5afaae6b0ecee09a
parent1e92e5f6c6e1e56baf4c695032ab275a9bdd7eb4 (diff)
downloadtinygo-ca4f2510509fc6e3195e046a5198980a4ad5fe53.tar.gz
tinygo-ca4f2510509fc6e3195e046a5198980a4ad5fe53.zip
relax restriction on configuration with duplicate settings
-rw-r--r--src/machine/machine_mimxrt1062_uart.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/machine/machine_mimxrt1062_uart.go b/src/machine/machine_mimxrt1062_uart.go
index bb43f4be5..b61fd04f0 100644
--- a/src/machine/machine_mimxrt1062_uart.go
+++ b/src/machine/machine_mimxrt1062_uart.go
@@ -45,11 +45,6 @@ func (uart *UART) resetTransmitting() {
uart.Bus.GLOBAL.ClearBits(nxp.LPUART_GLOBAL_RST)
}
-func (uart *UART) usesConfig(c UARTConfig) bool {
- return uart.configured && uart.baud == c.BaudRate &&
- uart.rx == c.RX && uart.tx == c.TX
-}
-
// Configure initializes a UART with the given UARTConfig and other default
// settings.
func (uart *UART) Configure(config UARTConfig) {
@@ -67,11 +62,6 @@ func (uart *UART) Configure(config UARTConfig) {
config.TX = UART_TX_PIN
}
- // Do not reconfigure pins and device buffers if duplicate config provided.
- if uart.usesConfig(config) {
- return
- }
-
uart.baud = config.BaudRate
uart.rx = config.RX
uart.tx = config.TX