File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -147,13 +147,6 @@ void UartClass::begin(unsigned long baud, uint16_t config)
147147
148148 _written = false ;
149149
150- // Set up the rx pin
151- pinMode (_hwserial_rx_pin, INPUT_PULLUP);
152-
153- // Set up the tx pin
154- digitalWrite (_hwserial_tx_pin, HIGH);
155- pinMode (_hwserial_tx_pin, OUTPUT);
156-
157150 int8_t sigrow_val = SIGROW.OSC16ERR5V ;
158151 baud_setting *= (1024 + sigrow_val);
159152 baud_setting /= (1024 - abs (sigrow_val));
@@ -169,6 +162,13 @@ void UartClass::begin(unsigned long baud, uint16_t config)
169162
170163 (*_hwserial_module).CTRLA |= USART_RXCIE_bm;
171164
165+ // Set up the rx pin
166+ pinMode (_hwserial_rx_pin, INPUT_PULLUP);
167+
168+ // Set up the tx pin
169+ digitalWrite (_hwserial_tx_pin, HIGH);
170+ pinMode (_hwserial_tx_pin, OUTPUT);
171+
172172 // Restore SREG content
173173 SREG = oldSREG;
174174}
You can’t perform that action at this time.
0 commit comments