mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
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:
+1
-1
@@ -137,7 +137,7 @@ __xdata char sfp_module_serial[2][17];
|
|||||||
__xdata uint8_t sfp_options[2];
|
__xdata uint8_t sfp_options[2];
|
||||||
__xdata bool button_last;
|
__xdata bool button_last;
|
||||||
__xdata uint8_t button_sec_counter_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)
|
#define ETHERTYPE_OFFSET (12 + VLAN_TAG_SIZE + RTL_TAG_SIZE)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user