File tree 1 file changed +7
-7
lines changed
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)
147
147
148
148
_written = false ;
149
149
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
-
157
150
int8_t sigrow_val = SIGROW.OSC16ERR5V ;
158
151
baud_setting *= (1024 + sigrow_val);
159
152
baud_setting /= (1024 - abs (sigrow_val));
@@ -169,6 +162,13 @@ void UartClass::begin(unsigned long baud, uint16_t config)
169
162
170
163
(*_hwserial_module).CTRLA |= USART_RXCIE_bm;
171
164
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
+
172
172
// Restore SREG content
173
173
SREG = oldSREG;
174
174
}
You can’t perform that action at this time.
0 commit comments