AMiLDA FORUM

You are not logged in.

Announcement

### Our Homepage is down at the moment...work in progress !! ###

#1 2006-04-25 22:31:50

margro
New member
Netherlands
Registered: 2006-03-15
Last visit: 2006-04-25
Posts: 4
Website

adm5120gpio extension for controlling the switch leds

Sergio,

I've modified your adm5120gpio driver (and commandline tool) a bit to control also the 10 switch leds (on a Sweex/Edimax). This gives us up to 18 controllable GPIO lines big_smile

You can find the modified files here:
http://www.scintilla.utwente.nl/~marcel … itch_leds/

The devices /dev/gpio8 to /dev/gpio17 can be used to control the switch leds.

Besides the normal "LED ON/OFF/BLINK", I've added a "LED SWITCH value" option to be able to select the original modes again.

Example: echo "LED SWITCH 5" > /dev/gpio9 turns the the second led of the WAN port into "SPEED" mode (default)

The numbers come from the datasheet.

/Marcel


2x Sweex LB000021 with USB mod 2 serial ports and LCD; Linksys WRT54G

Offline

 

#2 2006-04-26 15:41:36

sergioag
Developer
Peru
From: Lima
Registered: 2006-02-16
Last visit: 2011-08-15
Posts: 166
Website

Re: adm5120gpio extension for controlling the switch leds

Cool!

I'll review it and possibly it will be included on the next release!

Sergio

Offline

 

#3 2006-05-26 12:05:21

Sunspot
Member
United Kingdom
From: New Forest
Registered: 2006-03-23
Last visit: 2008-04-25
Posts: 12
Website

Re: adm5120gpio extension for controlling the switch leds

I am trying to build a complete software set for users rather than developers.
A sort of Sweex/Edimax "distro" with no tool chain needed.

I have all 15 ethernet status LEDs working as outputs and 4 GPIO as inputs or outputs. Plus 2 RS232 ports.
It boots off a 1Gig USB memory stick which a non linux expert (like me) can easily load with new web pages etc.
It is Midge based at present but, as I say, it is the function not the code that attracts add-on hardware enthusiasts.

Many linux experts have been kind enough to help me get this far

The feature still lacking is an INPUT mode on the 15 ethernet status lines. The data sheet says mode 0000 will do it.
Can you or someone offer an Amilda based system that offers the above spec - but a with version of your LED driver that adds input mode on all lines?
Or - sorry to say it here - can such a code be offered for the Midge base sytem that is described at the site below?
http://www.sunspot.co.uk/Projects/SWEEX … ntrol.html

That would be an amazingly powerful experimenter's tool for less than 20 !

Offline

 

#4 2006-05-26 14:49:32

sergioag
Developer
Peru
From: Lima
Registered: 2006-02-16
Last visit: 2011-08-15
Posts: 166
Website

Re: adm5120gpio extension for controlling the switch leds

Hi

I see no problem in incorporating the enhaced driver into AMiLDA (i think i'll do it on next release). There's no problem on incorporating it into midge either, as it's GPLed.

Sergio

Offline

 

#5 2006-05-26 19:32:57

Sunspot
Member
United Kingdom
From: New Forest
Registered: 2006-03-23
Last visit: 2008-04-25
Posts: 12
Website

Re: adm5120gpio extension for controlling the switch leds

I may be wrong but I do not think there is an "input data" mode.
Only several output modes?

Offline

 

#6 2006-06-05 22:49:39

electrickery
New member
Netherlands
From: Rotterdam
Registered: 2006-03-22
Last visit: 2006-08-28
Posts: 1

Re: adm5120gpio extension for controlling the switch leds

> I may be wrong but I do not think there is an "input data" mode.
> Only several output modes?

Yes, there is. In the adm5120gpio.h file, all the modes are listed. The first four, including input (0x00 = 0000) are listed below:

/* SWITCH PORTx_LED */
#define SW_LED_GPIO_IN           0x00
#define SW_LED_GPIO_OUTPUT_FLASH 0x01
#define SW_LED_GPIO_OUTPUT_1     0x02
#define SW_LED_GPIO_OUTPUT_0     0x03

Offline

 

#7 2006-06-12 00:25:57

Sunspot
Member
United Kingdom
From: New Forest
Registered: 2006-03-23
Last visit: 2008-04-25
Posts: 12
Website

Re: adm5120gpio extension for controlling the switch leds

This does seem to be what is missing for a fully GPIO controlled router!

I use led.c and led.h (in arch/mips/am5120) using this toolchain recipe recorded at
http://www.sunspot.co.uk/Projects/SWEEX … notes.html

I do not yet have the Linux or C knowledge to include adm5120gpio.c and h and get the chain to complete.
If I remove led.c and h the chain fails and also no adm5120gpio.o is produced.
What else needs to be changed among the config files?

Please forgive a user in the developer forum - and email me if this is a problem at
http://www.sunspot.co.uk//patandgraham/ … email.html

Offline

 

#8 2008-09-11 16:01:49

scoot_eruk
New member
Registered: 2008-09-08
Last visit: 2008-11-13
Posts: 3

Re: adm5120gpio extension for controlling the switch leds

In which folder do these modified GPIO files go? Is it under AMilda or somewhere in the toolchain?
Regards

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB