how are LEDs controlled

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
red_mamba
DD-WRT Novice


Joined: 30 Mar 2010
Posts: 33

PostPosted: Wed Mar 14, 2012 16:57    Post subject: how are LEDs controlled Reply with quote
I'm trying to figure out how LEDs are controled on GPIO pins. i found a gpio.c that looks like a general control for individual pins.

So if I understand correctly all modules that blink the leds (wlan, lan, pwr...) call this function?
Or do they manipulate the GPIO pins directly?

any explanation would be appreciated Smile
Sponsor
jumran
DD-WRT User


Joined: 31 Jul 2009
Posts: 492
Location: Toronto, ON, CA

PostPosted: Wed Mar 14, 2012 20:10    Post subject: Reply with quote
http://www.dd-wrt.com/wiki/index.php/LED_Scripts
_________________
Asus RT-N16 [Build King Kong 18050M NEWD-2 K2.6 + Optware + My Page] Mr. Green
red_mamba
DD-WRT Novice


Joined: 30 Mar 2010
Posts: 33

PostPosted: Thu Mar 15, 2012 9:02    Post subject: Reply with quote
Ok so I was right, its done with gpio command Very Happy

So this means that driver for SD cards uses the same method. I would like to change the pins it uses. Anyone knows where the driver is located in source?
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 12825
Location: Behind The Reset Button

PostPosted: Thu Mar 15, 2012 13:03    Post subject: Reply with quote
the firmware allows you to select / change the gpio's.

select manual instead of auto..

also note the free size is not being reported correctly in the last few builds. I submitted a ticket quite a while ago..



gpio.jpg
 Description:
 Filesize:  28.33 KB
 Viewed:  1377 Time(s)

gpio.jpg



_________________
[Moderator Deleted] Shocked
red_mamba
DD-WRT Novice


Joined: 30 Mar 2010
Posts: 33

PostPosted: Fri Mar 16, 2012 11:04    Post subject: Reply with quote
thanks barry,

I'm trying to understand how this works because I wan't to rewrite the source to allow me to control status LEDs via SPI and shift registers. So I would like to share the SPI with LEDs and MMC card.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum