To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2085
2084  |  2086
Subject: 
power_off()
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 8 Oct 2001 06:54:58 GMT
Viewed: 
1341 times
  
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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR