From fd3a2ac058de6bdd69b9f388658e4189a9c5b32d Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 28 Jul 2010 09:54:56 -0700 Subject: Ethernet blinky light changes. Link LED works. D201 (next to PHY) blinks on TX. Yellow LED on connector blinks on TX/RX. --- firmware/microblaze/usrp2p/ethernet.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'firmware/microblaze/usrp2p') diff --git a/firmware/microblaze/usrp2p/ethernet.c b/firmware/microblaze/usrp2p/ethernet.c index 07224d3b7..80c303153 100644 --- a/firmware/microblaze/usrp2p/ethernet.c +++ b/firmware/microblaze/usrp2p/ethernet.c @@ -69,6 +69,10 @@ ed_link_up(int speed) ed_set_mac_speed(speed); + //turn on link LED for USRP2P + hal_set_leds((1 << 0), (1 << 0)); + + if (ed_callback) // fire link changed callback (*ed_callback)(speed); } @@ -78,6 +82,9 @@ ed_link_down(void) { // putstr("ed_link_down\n"); + //turn off link LED for USRP2P + hal_set_leds(0, (1 << 0)); + if (ed_callback) // fire link changed callback (*ed_callback)(0); } @@ -226,7 +233,7 @@ ethernet_init(void) eth_mac_miim_write(PHY_INT_MASK, mask); // enable the ones we want //set the LED behavior to activity instead of link - unsigned led = (LED_ACTIVITY << PHY_LED_LINK_LSB); + unsigned led = (LED_ACTIVITY << PHY_LED_LINK_LSB) | (LED_TX << PHY_LED_TXRX_LSB); eth_mac_miim_write(PHY_LED2, led); pic_register_handler(IRQ_PHY, eth_phy_irq_handler); -- cgit v1.2.3