OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: clofland on December 19, 2005, 03:50:46 pm
-
Is there a way to turn on the green "mail" LED from a script in pdaXrom?
-
On my C-1000 (pdaXrom), I has device named sharp_led in /dev. Maybe this can help you...
-
not an answer but :
https://www.oesf.org/index.php?title=Led_Howto (https://www.oesf.org/index.php?title=Led_Howto)
-
look at the command :
xset --help ... it talk about a led fonction ...
Perhaps ...
-
attached: ledmail
usage:
ledmail on
ledmail off (whatever in fact)
source:
#include
#include
#include
#include
#include
#include
#include
#include "sharp_char.h"
int main(int argc,char **argv)
{
int fd;
int status=0;
sharp_led_status st;
if ((argc>1) && (strcmp(argv[1],"on")==0))
{
status=1;
}
fd = open ("/dev/sharp_led", O_WRONLY);
st.which = 9;
st.status = status;
ioctl(fd, SHARP_LED_SETSTATUS, &st);
close(fd);
return 0;
}
-
Thanks pgas! I was just about to try patching something together when I saw your binary. Very cool, this is exactly what I needed!
FYI, you can set "which" to 13 instead of 9 and give several other status numbers to have the mail LED flash/blink in many different ways. If you set "which" to 12 you can control the battery LED.
If I get ambitios, I'll modify your code to take more options later this week, unless someone with real C++ skills gets to it first.
Now it is just too bad that there is no way to keep that LED blinking after the Z goes to sleep.