|
Hi
I have been trying to get the power_off() function to work, but every time I
call it it either hangs the RCX just before turning off, or turns the RCX
off and I can not turn it back on. In both cases I have to remove the
batteries and wait for the memory to die.
The code I have is something like:
shutdown()
{
cputs("end");
msleep(1000);
lcd_clear;
power_off();
}
I have included system.h. I am using legOS 0.2.5 on a Win98 machine with cygwin.
Is this function faulty, or do I need to enable/disable something else
before calling this function?
Thanks in advance for any help.
Mike McFarlane
|
|
Message has 1 Reply: | | RE: power_off()
|
| (...) Mike, I ran into a similar problem when debugging pbForth years ago. Make sure that the stack pointer is saved somewhere in the on-chip memory of the RCX BEFORE putting the RCX to sleep. The sleep function puts the external RAM into a (...) (23 years ago, 8-Oct-01, to lugnet.robotics.rcx.legos)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|