Difference between revisions of "/dev/net/kd/time"

From WiiBrew
< /dev‎ | net
Jump to navigation Jump to search
m (Reverted edits by IMacros (Talk) to last version by Bushing)
(Added KD_SetUTCTime, KD_GetUTCTime, and kd_timebuf.)
Line 1: Line 1:
 
== Ioctl listing ==
 
== Ioctl listing ==
 +
 +
typedef struct _skd_timebuf//This is used by all ioctls for at least outbuf. For ioctl 0x18, inbuf addr & 3 is written to retval.
 +
{
 +
        s32 retval;//Zero for success, -30 when "Universal time is not ready.".
 +
        u64 time;//UTC time in seconds.
 +
} kd_timebuf;
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 8: Line 14:
 
! Output
 
! Output
 
! Notes
 
! Notes
 +
|-
 +
| 0x14
 +
| KD_GetUTCTime
 +
| 12 bytes
 +
| 12 bytes
 +
| Writes the current UTC time to inbuf kd_timebuf->time.
 +
|-
 +
| 0x15
 +
| KD_SetUTCTime
 +
| 12 bytes
 +
| 12 bytes
 +
| Sets the current UTC time to inbuf kd_timebuf->time.
 
|-
 
|-
 
| 0x17
 
| 0x17
 
| NWC24iSetRtcCounter
 
| NWC24iSetRtcCounter
| 32 bytes
+
| 12 bytes
| 32 bytes
+
| 12 bytes
|  
+
| Corrects the internal KD RTC by adding the input u64.
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| NWC24iGetTimeDifference
 
| NWC24iGetTimeDifference
 
| none
 
| none
| 32 bytes
+
| 12 bytes
 
|  
 
|  
 
|}
 
|}

Revision as of 21:15, 1 June 2010

Ioctl listing

typedef struct _skd_timebuf//This is used by all ioctls for at least outbuf. For ioctl 0x18, inbuf addr & 3 is written to retval.
{
       s32 retval;//Zero for success, -30 when "Universal time is not ready.".
       u64 time;//UTC time in seconds.
} kd_timebuf;
Request number Name Input Output Notes
0x14 KD_GetUTCTime 12 bytes 12 bytes Writes the current UTC time to inbuf kd_timebuf->time.
0x15 KD_SetUTCTime 12 bytes 12 bytes Sets the current UTC time to inbuf kd_timebuf->time.
0x17 NWC24iSetRtcCounter 12 bytes 12 bytes Corrects the internal KD RTC by adding the input u64.
0x18 NWC24iGetTimeDifference none 12 bytes