/dev/stm

From WiiBrew
Jump to navigation Jump to search

The State Transition Manager handles transitioning between power states (idle, on, standby, reset, etc). It has event handlers for GPIO (power button), the reset button and the DI cover.

Unless otherwise noted, ioctls take in an input buffer of 0x20 bytes and an io buffer of 0x20 bytes, e.g.

static u8 stm_inbuf[0x20] ATTRIBUTE_ALIGN(32);
static u8 stm_iobuf[0x20] ATTRIBUTE_ALIGN(32);
retval = IOS_Ioctl(fd, ioctl_no, inbuf, 0x20, outbuf, 0x20);

The contents of the buffers do not matter.

Events

Event Notes
0x00020000 Triggered when the reset button is pressed.
0x00000800 Triggered when the power button is pressed (by the GPIO event handler).

Contents