summaryrefslogtreecommitdiff
path: root/include/user
diff options
context:
space:
mode:
Diffstat (limited to 'include/user')
-rw-r--r--include/user/appmgr.h3
-rw-r--r--include/user/kernel/threadmgr.h2
-rw-r--r--include/user/power.h7
-rw-r--r--include/user/usbd.h87
4 files changed, 97 insertions, 2 deletions
diff --git a/include/user/appmgr.h b/include/user/appmgr.h
index f93e608..8a4a9d7 100644
--- a/include/user/appmgr.h
+++ b/include/user/appmgr.h
@@ -60,6 +60,9 @@ typedef struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam; // Missing
#define SCE_APPMGR_MAX_APP_NAME_LENGTH (31)
+//! Destroy all other apps
+int sceAppMgrDestroyOtherApp(void);
+
//! name: The Title ID of the application
int sceAppMgrDestroyAppByName(char *name);
diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h
index e8376d0..3681c19 100644
--- a/include/user/kernel/threadmgr.h
+++ b/include/user/kernel/threadmgr.h
@@ -1099,7 +1099,6 @@ typedef enum SceKernelIdListType {
SceKernelIdListType sceKernelGetThreadmgrUIDClass(SceUID uid);
-
typedef struct SceKernelLwMutexWork {
SceInt64 data[4];
} SceKernelLwMutexWork;
@@ -1127,7 +1126,6 @@ int sceKernelSignalLwCond(SceKernelLwCondWork *pWork);
int sceKernelWaitLwCond(SceKernelLwCondWork *pWork, unsigned int *pTimeout);
-
/**
* Get the system time (wide version)
*
diff --git a/include/user/power.h b/include/user/power.h
index 75f1673..8eadf1a 100644
--- a/include/user/power.h
+++ b/include/user/power.h
@@ -148,6 +148,13 @@ int scePowerRequestStandby(void);
int scePowerRequestSuspend(void);
/**
+ * Request display off
+ *
+ * @return always 0
+ */
+int scePowerRequestDisplayOff(void);
+
+/**
* Sets CPU clock frequency
*
* @param freq - Frequency to set in Mhz
diff --git a/include/user/usbd.h b/include/user/usbd.h
new file mode 100644
index 0000000..2399abe
--- /dev/null
+++ b/include/user/usbd.h
@@ -0,0 +1,87 @@
+#ifndef _PSP2_USBD_H_
+#define _PSP2_USBD_H_
+
+#include <psp2/kernel/threadmgr.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SCE_USBD_ERROR_ACCESS 0x80240003
+#define SCE_USBD_ERROR_BUSY 0x80240006
+#define SCE_USBD_ERROR_FATAL 0x802400ff
+#define SCE_USBD_ERROR_INTERRUPTED 0x8024000a
+#define SCE_USBD_ERROR_INVALID_ARG 0x80240002
+#define SCE_USBD_ERROR_IO 0x80240001
+#define SCE_USBD_ERROR_NO_DEVICE 0x80240004
+#define SCE_USBD_ERROR_NO_MEM 0x8024000b
+#define SCE_USBD_ERROR_NOT_FOUND 0x80240005
+#define SCE_USBD_ERROR_NOT_SUPPORTED 0x8024000c
+#define SCE_USBD_ERROR_OVERFLOW 0x80240008
+#define SCE_USBD_ERROR_PIPE 0x80240009
+#define SCE_USBD_ERROR_TIMEOUT 0x80240007
+
+typedef struct SceUsbdDeviceInfo {
+ unsigned int unk0;
+ unsigned int device_id;
+ unsigned int unk2;
+} SceUsbdDeviceInfo; /* size = 0xC */
+
+typedef struct SceUsbdDeviceAddress {
+ unsigned int unk0;
+ unsigned short unk1;
+} SceUsbdDeviceAddress; /* size = 0x6 */
+
+typedef struct SceUsbdTransferData {
+ unsigned int pipe;
+ const void *buff1;
+ unsigned int size1;
+ void *buff2;
+ unsigned int size2;
+} SceUsbdTransferData; /* size = 0x14 */
+
+typedef struct SceUsbdReceiveEvent {
+ unsigned int unk0;
+ unsigned int unk1;
+ unsigned int unk2;
+ unsigned int unk3;
+ unsigned int unk4;
+ unsigned int unk5;
+ unsigned int transfer_id;
+} SceUsbdReceiveEvent; /* size = 0x1C */
+
+int sceUsbdInit(SceUID *uid);
+int sceUsbdEnd(SceUID uid);
+
+int sceUsbdRegisterCallback(SceUID cbid, int);
+int sceUsbdUnregisterCallback(SceUID cbid);
+
+int sceUsbdResetDevice(SceUID uid, unsigned int device_id);
+int sceUsbdAttach(SceUID uid, int, int, int);
+
+int sceUsbdGetDeviceList(SceUID uid, unsigned int num, SceUsbdDeviceInfo *info);
+int sceUsbdGetDescriptor(SceUID uid, unsigned int device_id, unsigned char *descriptor, unsigned int size);
+int sceUsbdGetDescriptorSize(SceUID uid, unsigned int device_id);
+int sceUsbdGetDeviceAddress(SceUID uid, unsigned int device_id, SceUsbdDeviceAddress *addr);
+int sceUsbdGetDeviceSpeed(SceUID uid, unsigned int device_id, unsigned int *speed);
+int sceUsbdGetTransferStatus(SceUID uid, unsigned char buff[0x10]);
+int sceUsbdGetIsochTransferStatus(SceUID uid, unsigned char buff[0x10]);
+
+int sceUsbdOpenDefaultPipe(SceUID uid, unsigned int device_id);
+int sceUsbdOpenPipe(SceUID uid, unsigned char unk[0x18]);
+int sceUsbdClosePipe(SceUID uid, unsigned int device_id);
+
+int sceUsbdTransferData(SceUID uid, SceUsbdTransferData *data);
+int sceUsbdIsochTransferData(SceUID uid, int unk, unsigned char buff[0x28]);
+int sceUsbdReceiveEvent(SceUID uid, SceUsbdReceiveEvent *event);
+
+int sceUsbdRegisterLdd(SceUID uid, const char str[0x100]);
+int sceUsbdUnregisterLdd(SceUID uid, const char str[0x100]);
+int sceUsbdRegisterCompositeLdd(SceUID uid, const char str[0x100]);
+int sceUsbdAttachCompositeLdd(SceUID, unsigned char unk[0x14]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PSP2_USBD_H_ */