Skip to content

Commit 89d2dee

Browse files
committed
fix image, improve comments
1 parent f9aadc2 commit 89d2dee

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

megaavr/cores/megatinycore/HardwareSerial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
value the user overode them with, likely 0. Also high byte of UART address always 0x08, so replace
2727
2-clock ldd with 1 clock ldi. - Spence
2828
* 03/12/23: Correct bug in TxD1' and XCK1'
29+
* 07/10/25: Correct bug causing strange compilation failures in ModBus and possibly other conditions.
2930
*/
3031

3132
#pragma once
@@ -420,7 +421,7 @@ class HardwareSerial : public Stream {
420421

421422
private:
422423
void _poll_tx_data_empty(void);
423-
static void _set_pins(uint8_t port_num, uint8_t mux_setting, uint8_t enmask);
424+
static void _set_pins(uint8_t port_num, uint8_t mux_setting, uint8_t enmask);
424425
static uint8_t _pins_to_swap(uint8_t port_num, uint8_t tx_pin, uint8_t rx_pin);
425426

426427

megaavr/cores/megatinycore/UART.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@
543543
void HardwareSerial::begin(unsigned long baud, uint16_t options) {
544544
// Make sure no transmissions are ongoing and USART is disabled in case begin() is called by accident
545545
// without first calling end()
546-
_poll_tx_data_empty();
546+
_poll_tx_data_empty(); // Workaround to fix compiler omitting this function, causing compile to fail.
547547
if (_state & 1) {
548548
this->end();
549549
}
225 KB
Loading

0 commit comments

Comments
 (0)