hello ,
FSLBOT (Freescale Mechatronics Robot) is built by MCF52259 and Tower Mechatronics board.
Guess the codes to control LEDs should be something simple like :
void leds_init(void){
// Enable signals as GPIO
MCF_GPIO_PTCPAR = 0
| MCF_GPIO_PTCPAR_DTIN3_GPIO
| MCF_GPIO_PTCPAR_DTIN2_GPIO
| MCF_GPIO_PTCPAR_DTIN1_GPIO
| MCF_GPIO_PTCPAR_DTIN0_GPIO;
// Enable signals as digital outputs
MCF_GPIO_DDRTC = 0
| MCF_GPIO_DDRTC_DDRTC3
| MCF_GPIO_DDRTC_DDRTC2
| MCF_GPIO_DDRTC_DDRTC1
| MCF_GPIO_DDRTC_DDRTC0;
MCF_GPIO_PORTTC = 0; // TURN LEDS OFF
}
void board_led_display( int numLed )
{
MCF_GPIO_PORTTC = numLed;
}
however, these codes don't work and LEDs are not turned on.
probably due to the GPIO/registers are not correctly specified, or anything we're still missing?
hope for kind advices.
--
mg