Difference between revisions of "SceSyscon"

From Vita Development Wiki
Jump to navigation Jump to search
Line 60: Line 60:
 
|}
 
|}
 
<source lang="c">int syscon_send_command(uint32_t id, void *args, int size);</source>
 
<source lang="c">int syscon_send_command(uint32_t id, void *args, int size);</source>
 +
 +
=== Read command ===
 +
{| class="wikitable"
 +
|-
 +
! Version
 +
! NID
 +
|-
 +
| 3.60 (non-secure)
 +
| 0x299B1CE7
 +
|}
 +
<source lang="c">int syscon_read_command(uint32_t id, void *buffer, int size);</source>
  
 
=== Reset device ===
 
=== Reset device ===

Revision as of 12:35, 14 February 2017

Module

Known NIDs

Version Name World Privilege NID
1.69 SceSyscon Non-secure Kernel 0x250E65E7

Libraries

Known NIDs

Version Name World Visibility NID
1.69 SceSysconForDriver Non-secure Kernel 0x60A35F64

SceSysconForDriver

struct SceSysconPacket

typedef struct SceSysconPacket {
	struct SceSysconPacket *next;
	u32 status;
	SceUID semaId; // correct
	u8 tx[16];
	u8 rx[16];
	s32 (*callback)(struct SceSysconPacket *, void *argp);
	u32 gp;
	void *argp;
	u32 time;
	u32 delay;
	u8 reserved[32];
} SceSysconPacket;

Sync

Version NID
3.60 (non-secure) 0x6E517D22
int ksceSysconCmdSync(SceSysconPacket *packet, int noWait);

Send command

Version NID
1.69 (non-secure) 0xE26488B9
int syscon_send_command(uint32_t id, void *args, int size);

Read command

Version NID
3.60 (non-secure) 0x299B1CE7
int syscon_read_command(uint32_t id, void *buffer, int size);

Reset device

Version NID
1.69 (non-secure) 0x8A95D35C
int syscon_reset_device(int type, int unk);

The unk argument is usually set to 0x2 or sometimes 0x8002 (which seems to correspond to some request by the UDC and BT drivers).

The type argument determines what to do.

Type Description
0 Power of the device
1 Enter low-power (suspend) state.
17 Suspend and immediately resume (soft reset).