forked from renet/ENC424J600
Fix MAC address ordering
This commit is contained in:
parent
6b9f58a98f
commit
5deab5db9b
|
@ -36,6 +36,7 @@ fn main() -> ! {
|
||||||
.freeze();
|
.freeze();
|
||||||
let mut delay = Delay::new(cp.SYST, clocks);
|
let mut delay = Delay::new(cp.SYST, clocks);
|
||||||
|
|
||||||
|
// Init ITM & use Stimulus Port 0
|
||||||
let mut itm = cp.ITM;
|
let mut itm = cp.ITM;
|
||||||
let stim0 = &mut itm.stim[0];
|
let stim0 = &mut itm.stim[0];
|
||||||
|
|
||||||
|
@ -79,9 +80,9 @@ fn main() -> ! {
|
||||||
spi_eth.read_from_mac(&mut eth_mac_addr);
|
spi_eth.read_from_mac(&mut eth_mac_addr);
|
||||||
iprintln!(stim0,
|
iprintln!(stim0,
|
||||||
"MAC Address = {:02x}-{:02x}-{:02x}-{:02x}-{:02x}-{:02x}",
|
"MAC Address = {:02x}-{:02x}-{:02x}-{:02x}-{:02x}-{:02x}",
|
||||||
eth_mac_addr[5], eth_mac_addr[4],
|
eth_mac_addr[0], eth_mac_addr[1],
|
||||||
eth_mac_addr[3], eth_mac_addr[2],
|
eth_mac_addr[2], eth_mac_addr[3],
|
||||||
eth_mac_addr[1], eth_mac_addr[0]);
|
eth_mac_addr[4], eth_mac_addr[5]);
|
||||||
// Set to promiscuous mode
|
// Set to promiscuous mode
|
||||||
spi_eth.set_promiscuous();
|
spi_eth.set_promiscuous();
|
||||||
iprintln!(stim0,
|
iprintln!(stim0,
|
||||||
|
@ -119,7 +120,7 @@ fn main() -> ! {
|
||||||
eth_tx_packet.get_frame_byte(16), eth_tx_packet.get_frame_byte(17),
|
eth_tx_packet.get_frame_byte(16), eth_tx_packet.get_frame_byte(17),
|
||||||
eth_tx_packet.get_frame_byte(18), eth_tx_packet.get_frame_byte(19)
|
eth_tx_packet.get_frame_byte(18), eth_tx_packet.get_frame_byte(19)
|
||||||
);
|
);
|
||||||
spi_eth.send_raw_packet(eth_tx_packet);
|
spi_eth.send_raw_packet(ð_tx_packet);
|
||||||
iprintln!(stim0,
|
iprintln!(stim0,
|
||||||
"Packet sent");
|
"Packet sent");
|
||||||
delay.delay_ms(100_u32);
|
delay.delay_ms(100_u32);
|
||||||
|
|
Loading…
Reference in New Issue