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;
}
IOWarrior40 disables computer sleep mode
Moderator: Guido Körber
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact: