Difference between revisions of "/dev/stm/immediate"
WiibrewBot (talk | contribs) m (Robot: Cosmetic changes) |
|||
Line 1: | Line 1: | ||
this handles the shutdown/reset button on the front of the Wii, maybe it handles more. | this handles the shutdown/reset button on the front of the Wii, maybe it handles more. | ||
+ | (Perhaps It's An APM Like Sub-System?) | ||
In all code that has been studied, the ioctls take in an input buffer of 0x20 bytes and an io buffer of 0x20 bytes, e.g. | In all code that has been studied, the ioctls take in an input buffer of 0x20 bytes and an io buffer of 0x20 bytes, e.g. |
Revision as of 19:53, 17 October 2009
this handles the shutdown/reset button on the front of the Wii, maybe it handles more. (Perhaps It's An APM Like Sub-System?)
In all code that has been studied, the 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 seem to matter for the shutdown / reset functions. You should not expect to actually receive a return code, due to the nature of the functions -- any return value can then be treated as some sort of error.
Shutdown To Standby
STM_ShutdownToStandby: ioctl 0x2003
This will power the Wii off (red LED).
Shutdown To Idle
STM_ShutdownToIdle: ioctl 0x2004
This will put the Wii into idle mode (yellow LED). This might be useful, but not for known Homebrew-related purposes.
Hot Reset
STM_HotReset: ioctl 0x2001
This will reset the Wii.
Force Dimming
STM_SetVIForceDimming: ioctl 0x5001
The 32-bit parameter changes the brightness it sets the screen to. The parameter is the first word of inbuf. The brightness change stays until either the Wii reboots, or it is changed back.
Set Idle LED Mode
STM_SetIdleLEDMode: ioctl 0x6002
Please figure out what I do and update me! 32-bit parameter is passed in as the first word of inbuf.
Unregister State Event
STM_UnregisterStateEvent: ioctl 0x3002
Please figure out what I do and update me!
Get state
#define ISTM_CMD_GETSTATE 0x3001
Found in IOS37 KD driver 0x13db0710 and on.
Please figure out what I do and update me!
Wake up
#define ISTM_CMD_WAKEUP 0x2005
Found in IOS37 KD driver 0x13db0746 and on.
Please figure out what I do and update me!
LED Flash???
0x6001
Found in IOS37 KD driver 0x13db0660 and on.
Please figure out what I do and update me!