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:
@@ -1,8 +1,10 @@
|
||||
package usbserial
|
||||
|
||||
import "core:c"
|
||||
import sce "../common"
|
||||
|
||||
foreign import usbserial "system:SceUsbSerial_stub"
|
||||
foreign import usbserialkern "system:SceUsbSerialForDriver_stub"
|
||||
|
||||
@(link_prefix = "sceUsbSerial")
|
||||
foreign usbserial {
|
||||
@@ -76,3 +78,64 @@ foreign usbserial {
|
||||
*/
|
||||
Recv :: proc(buffer: rawptr, max_len: c.uint, unk1: c.int, unk2: c.int) -> c.uint ---
|
||||
}
|
||||
|
||||
foreign usbserialkern {
|
||||
/**
|
||||
* Activate USB serial device
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @note The user is responsible for making sure no other UDC driver is active. This activates UDC as a "PS Vita" Type D device.
|
||||
*/
|
||||
ksceUsbSerialStart :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Setup USB serial device
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*
|
||||
* @param unk Unknown
|
||||
*/
|
||||
ksceUsbSerialSetup :: proc(unk: c.int) -> c.int ---
|
||||
|
||||
/**
|
||||
* Get USB device status
|
||||
*
|
||||
* @return Returns 1 when serial port is open
|
||||
*/
|
||||
ksceUsbSerialStatus :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Close USB serial device
|
||||
*/
|
||||
ksceUsbSerialClose :: proc() -> c.int ---
|
||||
|
||||
/**
|
||||
* Get receive buffer length
|
||||
*
|
||||
* @return Returns length of USB rx buffer
|
||||
*/
|
||||
ksceUsbSerialGetRecvBufferSize :: proc() -> c.uint ---
|
||||
|
||||
/**
|
||||
* Send data
|
||||
*
|
||||
* @param[in] *buffer data to send over usb
|
||||
* @param[in] len int len of serial buffer data
|
||||
* @param unk1 Unknown
|
||||
* @param unk2 Unknown
|
||||
* @note max send length is 0x10000
|
||||
*/
|
||||
ksceUsbSerialSend :: proc(buffer: rawptr, len: sce.Size, unk1: c.int, unk2: c.int) -> sce.Size ---
|
||||
|
||||
/**
|
||||
* Receive Data
|
||||
*
|
||||
* @param[out] *buffer buffer for incoming data
|
||||
* @param[in] max_len max data length to receive
|
||||
* @param unk1 Unknown
|
||||
* @param unk2 Unknown
|
||||
* @note max recv length is 0x10000
|
||||
*/
|
||||
ksceUsbSerialRecv :: proc(buffer: rawptr, max_len: sce.Size, unk1: c.int, unk2: c.int) -> sce.Size ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user