You are not logged in.
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
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.
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 !
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.
> 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
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