mirror of
https://github.com/IllusionMan1212/vitasdk-odin.git
synced 2026-10-24 02:12:38 +00:00
added kernel libraries bindings and cleaned up todos
This commit is contained in:
+72
-1
@@ -1,10 +1,11 @@
|
||||
package usbserv
|
||||
|
||||
import "core:c"
|
||||
import sce "../common"
|
||||
|
||||
foreign import usbserv "system:SceUsbServ_stub"
|
||||
foreign import usbservkern "system:SceUsbServForDriver_stub"
|
||||
|
||||
// TODO:
|
||||
SceUsbservErrorCode :: enum c.uint {
|
||||
UNAVAILABLE = 0x80248002,
|
||||
INVALID_PARAM = 0x80248003,
|
||||
@@ -30,3 +31,73 @@ foreign usbserv {
|
||||
*/
|
||||
AccessoryDeactivate :: proc() -> c.int ---
|
||||
}
|
||||
|
||||
foreign usbservkern {
|
||||
/**
|
||||
* Enable PSTV ethernet
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @note NID 0x30AE5F66
|
||||
*/
|
||||
ksceUsbServEtherEnable :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Disable PSTV ethernet
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @note NID 0xD787B191
|
||||
*/
|
||||
ksceUsbServEtherDisable :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Enable accessory port
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @note NID 0xAA6D4409
|
||||
*/
|
||||
ksceUsbServAccessoryActivate :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Disable accessory port
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @note NID 0x853CB8E4
|
||||
*/
|
||||
ksceUsbServAccessoryDeactivate :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Set USB port mode
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @param usbPort usb port number (0,1,2)
|
||||
* @param clientMode 0 = host mode, 1 = client mode
|
||||
*
|
||||
* @note NID 0x7AD36284
|
||||
*/
|
||||
ksceUsbServMacSelect :: proc(usbPort: sce.UInt, clientMode: sce.Bool) -> c.int ---
|
||||
|
||||
/**
|
||||
* Get USB port mode
|
||||
*
|
||||
* @return usb port mode (1 = client, 0 = host)
|
||||
*
|
||||
* @param usbPort usb port number (0,1,2)
|
||||
*
|
||||
* @note NID 0xF0553A69
|
||||
*/
|
||||
ksceUsbServMacGet :: proc(usbPort: sce.UInt) -> sce.Bool ---
|
||||
|
||||
/**
|
||||
* Prevent PSTV ethernet hibernation
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @note NID 0x6D738018, guessed name
|
||||
*/
|
||||
ksceUsbServDisableEtherSuspend :: proc() -> c.int ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user