IOWarrior40 disables computer sleep mode

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
kroosu
Posts: 2
Joined: Wed Jul 05, 2006 9:23 am

IOWarrior40 disables computer sleep mode

Post by kroosu »

when i use IOWarrior40 my computer does not enter sleepmode; with that i mean disabling my monitor when i'm idle for a some time.
i've also noticed that it enables the screensaver instead of disabling the monitor.

does anybody knows how to solve it?
i'm running MacOS-X (10.4.6) and have my monitor connected via ADC (i have a 450Mhz MP G4).
i've connected IOWarrior on my keyboard (monitor = usb-hub) and i've
connected it directly on an usb-card.


typedef union {
char port[4];
UInt32 port3210;
} portBuffer;


int main (int argc, const char * argv[])
{
int result;
portBuffer pbPort;

printf ("Calling IOWarriorInit\n");
result = IOWarriorInit ();
if (result)
{
printf ("IOWarriorInit returned %d\n", result);
return -1;
};

if (IOWarriorIsPresent ()) {
printf ("IOWarrior is present\n");
} else {
printf ("IOWarrior is not present\n");
return 0;
}

while (1) {
for (i=0;i<=7;i++) {
(void) IOWarriorReadInterface0(&(pbPort->port3210));
pbPort->port[PORT0]=0xff-(1<<i);
(void) IOWarriorWriteInterface0(&(pbPort->port3210));
usleep(70000);
}
for (i=6;i>=1;i--) {
(void) IOWarriorReadInterface0(&(pbPort->port3210));
pbPort->port[PORT0]=0xff-(1<<i);
(void) IOWarriorWriteInterface0(&(pbPort->port3210));
usleep(70000);
}
}

return 0;
}
kroosu
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

That depends on what is connected to the IO-Warrior. If any of the IO-Warrior pins is pulled low it will generate a remote wakeup immediately upon entering sleep.
kroosu
Posts: 2
Joined: Wed Jul 05, 2006 9:23 am

Post by kroosu »

it's the default kit; a switch, 100/500[mA] selector and 8 leds. i've disconnected the selector after i plugged the kit in my usb-port.

but i'll check all the connections, because i cannot determine if the switch is pressed via IOWarriorReadInterface0().
kroosu
Post Reply