Fix declaration of tx_buf_empty bit var

__sbit is for SFRs, for regular data __bit should be used.
Otherwise the variables is not correctly declared in the BSEG
section, leading to bit temporaries being allocated in the same
location.

When this causes the tx_buf_empty to be overwritten to 0, then
the next write_char will hang forever.
This commit is contained in:
Tobias Diedrich
2026-04-04 22:02:45 +02:00
parent 4ccb988d70
commit fd9a7717ce
+1 -1
View File
@@ -137,7 +137,7 @@ __xdata char sfp_module_serial[2][17];
__xdata uint8_t sfp_options[2];
__xdata bool button_last;
__xdata uint8_t button_sec_counter_last;
__sbit tx_buf_empty;
volatile __bit tx_buf_empty;
#define ETHERTYPE_OFFSET (12 + VLAN_TAG_SIZE + RTL_TAG_SIZE)