mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
use macro for min_port and max_port for code optimization
This commit is contained in:
1 parent
c9e8403c6e
commit
7346977f91
12 files changed
+64
-61
No files matched your search
+1
-1
@@ -87,7 +87,7 @@ void leds_dump(void) __banked
|
||||
}
|
||||
write_char('\n');
|
||||
}
|
||||
for (uint8_t i = machine.min_port; i <= machine.max_port; i++) {
|
||||
for (uint8_t i = MACHINE_MIN_PORT; i <= MACHINE_MAX_PORT; i++) {
|
||||
reg_read_m(RTL837X_LED_PORT_SET_SEL);
|
||||
__xdata uint8_t set = sfr_data[3 - (i >> 2)];
|
||||
set = (set >> ((i & 3) << 1));
|
||||
|
||||
Reference in new issue
Block a user