SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);GPIOPinTypeEthernetLED(GPIO_PORTF_BASE, GPIO_PIN_2 | PIO_PIN_3);
GPIOPinConfigure(GPIO_PF2_LED1); GPIOPinConfigure(GPIO_PF3_LED0); GPIOPinTypeEthernetLED(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_3);
Hi,
Have you solve you problem, i have the same trouble?
regards
yves-Marie
This code is working
SysCtlPeripheralEnable(SYSCTL_PERIPH_ETH);SysCtlPeripheralReset(SYSCTL_PERIPH_ETH);SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); GPIOPinConfigure(GPIO_PF2_LED1); GPIOPinConfigure(GPIO_PF3_LED0); GPIOPinTypeEthernetLED(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_3);
I have a requirement to turn off the two ethernet LEDs upon command after they have been on. And also to turn them back on when commanded. I thought this code would work, but they never turn off. Any suggestions?
if (g_bEnableLEDs) { GPIOPinTypeEthernetLED(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_3); } else // turn off Ethernet LEDs { GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_3); GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_3, 0); }
Check to see if the LEDs are wired to be on when the pin is high, or wired to be on when the pin is low. You may have to set the pins high to turn off the LEDs.
That worked. Thanks slandrum.