Difference between revisions of "/dev/stm/immediate"

From WiiBrew
< /dev‎ | stm
Jump to navigation Jump to search
(Removing "Confused with Pastebin" category.)
(completed ioctl list)
Line 1: Line 1:
{{stub}}
+
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.
+
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===
 
===Shutdown To Standby===
 
   
 
   
  STM_ShutdownToStandby
+
  STM_ShutdownToStandby: ioctl 0x2003
inbuf can(/must?) by empty
+
This will power the Wii off (red LED).
 +
 
 +
===Shutdown To Idle===
 
   
 
   
  ios_ioctl( fd, 0x2003, inbuf, 0x20, outbuf, 0x20);
+
  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===
 
===Hot Reset===
  
  STM_HotReset
+
  STM_HotReset: ioctl 0x2001
  inbuf can(/must?) by empty
+
This will reset the Wii.
   
+
 
  ios_ioctl( fd, 0x2001, inbuf, 0x20, outbuf, 0x20);
+
===Force Dimming ===
 +
 
 +
  STM_SetVIForceDimming: ioctl 0x5001
 +
Please figure out what I do and update me! 32-bit parameter is passed in as the first word of inbuf.
 +
 
 +
===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!
 
[[Category:IOS API documentation]] [[Category:Ugly pages]] [[Category:API documentation that doesn't explain how to use the API]]
 
[[Category:IOS API documentation]] [[Category:Ugly pages]] [[Category:API documentation that doesn't explain how to use the API]]

Revision as of 13:49, 1 April 2008

this handles the shutdown/reset button on the front of the Wii, maybe it handles more.

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

Please figure out what I do and update me! 32-bit parameter is passed in as the first word of inbuf.

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!