Skip to content

Commit ca4f251

Browse files
ardnewdeadprogram
authored andcommitted
relax restriction on configuration with duplicate settings
1 parent 1e92e5f commit ca4f251

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/machine/machine_mimxrt1062_uart.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ func (uart *UART) resetTransmitting() {
4545
uart.Bus.GLOBAL.ClearBits(nxp.LPUART_GLOBAL_RST)
4646
}
4747

48-
func (uart *UART) usesConfig(c UARTConfig) bool {
49-
return uart.configured && uart.baud == c.BaudRate &&
50-
uart.rx == c.RX && uart.tx == c.TX
51-
}
52-
5348
// Configure initializes a UART with the given UARTConfig and other default
5449
// settings.
5550
func (uart *UART) Configure(config UARTConfig) {
@@ -67,11 +62,6 @@ func (uart *UART) Configure(config UARTConfig) {
6762
config.TX = UART_TX_PIN
6863
}
6964

70-
// Do not reconfigure pins and device buffers if duplicate config provided.
71-
if uart.usesConfig(config) {
72-
return
73-
}
74-
7565
uart.baud = config.BaudRate
7666
uart.rx = config.RX
7767
uart.tx = config.TX

0 commit comments

Comments
 (0)