mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
deprecate instances of llio reboot in favor of susres reboot
This commit is contained in:
parent
746ab64c2f
commit
9a4b530046
3 changed files with 10 additions and 2 deletions
|
|
@ -67,6 +67,7 @@ impl Com {
|
||||||
pub fn conn(&self) -> CID {self.conn}
|
pub fn conn(&self) -> CID {self.conn}
|
||||||
pub fn getop_backlight(&self) -> u32 {Opcode::SetBackLight.to_u32().unwrap()}
|
pub fn getop_backlight(&self) -> u32 {Opcode::SetBackLight.to_u32().unwrap()}
|
||||||
|
|
||||||
|
#[deprecated(note = "Uses susres.immediate_poweroff() instead, as power sequencing requirements have changed.")]
|
||||||
pub fn power_off_soc(&self) -> Result<(), xous::Error> {
|
pub fn power_off_soc(&self) -> Result<(), xous::Error> {
|
||||||
send_message(self.conn,
|
send_message(self.conn,
|
||||||
Message::new_scalar(Opcode::PowerOffSoc.to_usize().unwrap(), 0, 0, 0, 0)
|
Message::new_scalar(Opcode::PowerOffSoc.to_usize().unwrap(), 0, 0, 0, 0)
|
||||||
|
|
|
||||||
|
|
@ -654,7 +654,14 @@ fn main() -> ! {
|
||||||
//info!("0x{:04x}", word);
|
//info!("0x{:04x}", word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(Opcode::PowerOffSoc) => {
|
Some(Opcode::PowerOffSoc) => { // NOTE: this is deprecated, use susres.immediate_poweroff() instead. Power sequencing requirements have changed since this was created, this routine does not actually cut power anymore.
|
||||||
|
com.txrx(ComState::CHG_BOOST_OFF.verb);
|
||||||
|
com.txrx(ComState::LINK_SET_INTMASK.verb);
|
||||||
|
com.txrx(0); // suppress interrupts on suspend
|
||||||
|
|
||||||
|
if bl_main != 0 || bl_sec != 0 {
|
||||||
|
com.txrx(ComState::BL_START.verb); // this will turn off the backlights
|
||||||
|
}
|
||||||
info!("power off called");
|
info!("power off called");
|
||||||
com.txrx(ComState::POWER_OFF.verb);
|
com.txrx(ComState::POWER_OFF.verb);
|
||||||
com.wait_txrx(ComState::LINK_READ.verb, Some(STD_TIMEOUT)); // consume the obligatory return value, even if not used
|
com.wait_txrx(ComState::LINK_READ.verb, Some(STD_TIMEOUT)); // consume the obligatory return value, even if not used
|
||||||
|
|
|
||||||
|
|
@ -805,7 +805,7 @@ fn main() -> ! {
|
||||||
// allow the EC to power me down
|
// allow the EC to power me down
|
||||||
llio.allow_power_off(true).unwrap();
|
llio.allow_power_off(true).unwrap();
|
||||||
// now send the power off command
|
// now send the power off command
|
||||||
com.power_off_soc().unwrap(); // not that at this point, the screen freezes with the last thing displayed...
|
susres.immediate_poweroff().unwrap();
|
||||||
|
|
||||||
log::info!("rebooting now!");
|
log::info!("rebooting now!");
|
||||||
reboot_initiated = true;
|
reboot_initiated = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue