Program to Blink LED
I have a PXA270 based hardware in which I have LED connected to GPIO X.
I have ported uboot 1.1.4 and kernel 2.6.19 on that.
I need to write a program that blinks this LED (by toggling GPIO X) as soon as the hardware is booted up. I need to have this LED blinking till I load kernel, filesystem. When it loads the filesystem, I have one user application that should make this LED solid ON.
In short I need to blink LED as soon as hardware is powered on till my user level application gets loaded.
How should I achieve this through bootloader/kernel? Are there any timers available that can be started through bootloader (may be using assembly code) and tuned off through user application?
I presume this is part of your job? You want us to do your job? There are many means to accomplish this, and they all depend upon hardware peculiarities. You really need to understand kernel-level programming better so you can deal with such stuff. Many people who contribute to these forums (myself included) are professionals who are paid well to do this in real life. We enjoy helping people to get up to speed, but we (at least I do) REALLY resent it when a fellow professional wants us to do their work for them... :-(
I'm sorry if it seems like I'm flaming at you - I'm not, really. But this sort of question makes me question your competence for this work. After 30 years in this field, I still have to dig into the details to work out this sort of problems, and my clients pay me upwards of $200 USD per hour to do it for them, so you might understand my attitude.
I salute to your attitude. Thanks for encouraging me.
As I am application programmer, I am slightly unknown towards means of accomplishing this. Now you have mentioned, it is possible then I will definietely look into kernel programming.
Again, thanks for encouraging me.
I do apologize for my "flame". I do encourage you to look into kernel programming. If your English language skills are up to it, check these sites for documentation and help to get started:
The Linux Kernel Archives
The Linux Documentation Project
found solution for this??
I also have requirement like this..
and @rubberman yes this is part of my job :p
I am working on netgear ap software development.
I want that leds on the panel should blink while transferring data, but they are ON only
there are 5 leds on panel
1 for 2.4 GHz data transfer
1 for 5 GHz data transfer
1 for Ethernet input
1 for I don't know some recycle symbol is there
1 for power
so I need a patch which includes code for led blinking
m using kernel v2.6.36
I am interested in ethernet led
I found out that it is conected to gpio pin 9..so I added an entry for pin9 in .dts(device tree structure) file of device. I have a clue that I need to add some function in drivers/led/leds-gpio.c file and export the symbol.
so when ethernet link is up ethernet module will call this fuction to switch on led(currently it is ON)
when ethernet link is down ethernet module will call this fuction to switch OFF led
and when there is data transfer through ethernet port then led should blink
This thread is nearly 2 years old so I'm going to lock it, but don't hesitate to start a new thread of your own if you are having any issues with Linux.