I'm a beginner in embedded programming. I'm working on craneboard (ARM Cortex A8). The source code is available at github.
I have created a C code to make an external LED connected via GPIO, to blink. It can be executed in the u-boot console as a command. Currently,
I can't stop the blinking of LED by Ctrl-C.
 Where does the coding for Ctrl-C interrupt reside?
ret=set_mmc_mux();
if(ret<0)
    printf("\n\nLED failed to glow!\n\n");
else{
        if(!omap_request_gpio(lpin))
    {
        omap_set_gpio_direction(lpin,0);
        for(i=1;i<21;i++)
        {
            ctr=0;
            if((i%2)==0)
            {
                num=num-1;
                omap_set_gpio_dataout(lpin,num);
            }
            else
            {
                num=num+1;
                omap_set_gpio_dataout(lpin,num);
            }
                    udelay(3000000);
             }
        }
}
Kindly guide me.
Try the uboot ctrlc function:
if(ctrlc())
    return 1; // or whatever else you want to do
                        You are working at a low level, so the methods you need to use are also low-level:
0x03) character, exit if so, discard if notHaving now seen nneonneo's answer, I assume that's what the ctrlc() function does...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With