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
@@ -108,7 +108,7 @@ void lldp_send(void) __banked __reentrant
|
||||
*/
|
||||
uip_len = MAC_ADDR_LEN + MAC_ADDR_LEN + sizeof(struct rtl_tag) + LLDP_ETHERTYPE_LENGTH + (p - LLDP_O->payload);
|
||||
|
||||
for (uint8_t port = machine.min_port; port <= machine.max_port; port++) {
|
||||
for (uint8_t port = MACHINE_MIN_PORT; port <= MACHINE_MAX_PORT; port++) {
|
||||
|
||||
if ((1 << port) & lldp_logical_port_status) {
|
||||
LLDP_O->payload[port_position] = '0' + machine.log_to_phys_port[port];
|
||||
|
||||
Reference in new issue
Block a user