XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
uspi.h File Reference
#include "uspi/types.h"
#include <Mm/pmmngr.h>
Include dependency graph for uspi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  USPiGamePadState
 
struct  TUSPiDeviceInformation
 

Macros

#define USPI_NAME   "USPi library"
 
#define USPI_MAJOR_VERSION   2
 
#define USPI_MINOR_VERSION   0
 
#define USPI_VERSION_STRING   "2.00"
 
#define LCTRL   (1 << 0)
 
#define LSHIFT   (1 << 1)
 
#define ALT   (1 << 2)
 
#define LWIN   (1 << 3)
 
#define RCTRL   (1 << 4)
 
#define RSHIFT   (1 << 5)
 
#define ALTGR   (1 << 6)
 
#define RWIN   (1 << 7)
 
#define LED_NUM_LOCK   (1 << 0)
 
#define LED_CAPS_LOCK   (1 << 1)
 
#define LED_SCROLL_LOCK   (1 << 2)
 
#define MOUSE_BUTTON1   (1 << 0)
 
#define MOUSE_BUTTON2   (1 << 1)
 
#define MOUSE_BUTTON3   (1 << 2)
 
#define USPI_BLOCK_SIZE   512
 
#define USPI_FRAME_BUFFER_SIZE   1600
 
#define MAX_AXIS   6
 
#define MAX_HATS   6
 
#define KEYBOARD_CLASS   1
 
#define MOUSE_CLASS   2
 
#define STORAGE_CLASS   3
 
#define ETHERNET_CLASS   4
 
#define GAMEPAD_CLASS   5
 
#define MIDI_CLASS   6
 

Typedefs

typedef void TUSPiKeyPressedHandler(const char *pString)
 
typedef void TUSPiShutdownHandler(void)
 
typedef void TUSPiKeyStatusHandlerRaw(unsigned char ucModifiers, const unsigned char RawKeys[6])
 
typedef void TUSPiMouseStatusHandler(unsigned nButtons, int nDisplacementX, int nDisplacementY)
 
typedef struct USPiGamePadState USPiGamePadState
 
typedef void TGamePadStatusHandler(unsigned nDeviceIndex, const USPiGamePadState *pGamePadState)
 
typedef void TUSPiMIDIPacketHandler(unsigned nCable, unsigned nLength, u8 *pPacket)
 
typedef struct TUSPiDeviceInformation TUSPiDeviceInformation
 

Functions

int USPiInitialize (void)
 
int USPiKeyboardAvailable (void)
 
void USPiKeyboardRegisterKeyPressedHandler (TUSPiKeyPressedHandler *pKeyPressedHandler)
 
void USPiKeyboardRegisterShutdownHandler (TUSPiShutdownHandler *pShutdownHandler)
 
void USPiKeyboardUpdateLEDs (void)
 
void USPiKeyboardRegisterKeyStatusHandlerRaw (TUSPiKeyStatusHandlerRaw *pKeyStatusHandlerRaw)
 
void USPiKeyboardSetLEDs (unsigned char ucLEDMask)
 
int USPiMouseAvailable (void)
 
void USPiMouseRegisterStatusHandler (TUSPiMouseStatusHandler *pStatusHandler)
 
int USPiMassStorageDeviceAvailable (void)
 
int USPiMassStorageDeviceRead (unsigned long long ullOffset, void *pBuffer, unsigned nCount, unsigned nDeviceIndex)
 
int USPiMassStorageDeviceWrite (unsigned long long ullOffset, const void *pBuffer, unsigned nCount, unsigned nDeviceIndex)
 
unsigned USPiMassStorageDeviceGetCapacity (unsigned nDeviceIndex)
 
int USPiEthernetAvailable (void)
 
void USPiGetMACAddress (unsigned char Buffer[6])
 
int USPiEthernetIsLinkUp (void)
 
int USPiSendFrame (const void *pBuffer, unsigned nLength)
 
int USPiReceiveFrame (void *pBuffer, unsigned *pResultLength)
 
int USPiGamePadAvailable (void)
 
const USPiGamePadStateUSPiGamePadGetStatus (unsigned nDeviceIndex)
 
void USPiGamePadRegisterStatusHandler (TGamePadStatusHandler *pStatusHandler)
 
int USPiMIDIAvailable (void)
 
void USPiMIDIRegisterPacketHandler (TUSPiMIDIPacketHandler *pPacketHandler)
 
int USPiDeviceGetInformation (unsigned nClass, unsigned nDeviceIndex, TUSPiDeviceInformation *pInfo)
 

Macro Definition Documentation

◆ ALT

#define ALT   (1 << 2)

◆ ALTGR

#define ALTGR   (1 << 6)

◆ ETHERNET_CLASS

#define ETHERNET_CLASS   4

◆ GAMEPAD_CLASS

#define GAMEPAD_CLASS   5

◆ KEYBOARD_CLASS

#define KEYBOARD_CLASS   1

◆ LCTRL

#define LCTRL   (1 << 0)

◆ LED_CAPS_LOCK

#define LED_CAPS_LOCK   (1 << 1)

◆ LED_NUM_LOCK

#define LED_NUM_LOCK   (1 << 0)

◆ LED_SCROLL_LOCK

#define LED_SCROLL_LOCK   (1 << 2)

◆ LSHIFT

#define LSHIFT   (1 << 1)

◆ LWIN

#define LWIN   (1 << 3)

◆ MAX_AXIS

#define MAX_AXIS   6

◆ MAX_HATS

#define MAX_HATS   6

◆ MIDI_CLASS

#define MIDI_CLASS   6

◆ MOUSE_BUTTON1

#define MOUSE_BUTTON1   (1 << 0)

◆ MOUSE_BUTTON2

#define MOUSE_BUTTON2   (1 << 1)

◆ MOUSE_BUTTON3

#define MOUSE_BUTTON3   (1 << 2)

◆ MOUSE_CLASS

#define MOUSE_CLASS   2

◆ RCTRL

#define RCTRL   (1 << 4)

◆ RSHIFT

#define RSHIFT   (1 << 5)

◆ RWIN

#define RWIN   (1 << 7)

◆ STORAGE_CLASS

#define STORAGE_CLASS   3

◆ USPI_BLOCK_SIZE

#define USPI_BLOCK_SIZE   512

◆ USPI_FRAME_BUFFER_SIZE

#define USPI_FRAME_BUFFER_SIZE   1600

◆ USPI_MAJOR_VERSION

#define USPI_MAJOR_VERSION   2

◆ USPI_MINOR_VERSION

#define USPI_MINOR_VERSION   0

◆ USPI_NAME

#define USPI_NAME   "USPi library"

◆ USPI_VERSION_STRING

#define USPI_VERSION_STRING   "2.00"

Typedef Documentation

◆ TGamePadStatusHandler

typedef void TGamePadStatusHandler(unsigned nDeviceIndex, const USPiGamePadState *pGamePadState)

◆ TUSPiDeviceInformation

◆ TUSPiKeyPressedHandler

typedef void TUSPiKeyPressedHandler(const char *pString)

◆ TUSPiKeyStatusHandlerRaw

typedef void TUSPiKeyStatusHandlerRaw(unsigned char ucModifiers, const unsigned char RawKeys[6])

◆ TUSPiMIDIPacketHandler

typedef void TUSPiMIDIPacketHandler(unsigned nCable, unsigned nLength, u8 *pPacket)

◆ TUSPiMouseStatusHandler

typedef void TUSPiMouseStatusHandler(unsigned nButtons, int nDisplacementX, int nDisplacementY)

◆ TUSPiShutdownHandler

typedef void TUSPiShutdownHandler(void)

◆ USPiGamePadState

Function Documentation

◆ USPiDeviceGetInformation()

int USPiDeviceGetInformation ( unsigned  nClass,
unsigned  nDeviceIndex,
TUSPiDeviceInformation pInfo 
)

◆ USPiEthernetAvailable()

int USPiEthernetAvailable ( void  )

◆ USPiEthernetIsLinkUp()

int USPiEthernetIsLinkUp ( void  )

◆ USPiGamePadAvailable()

int USPiGamePadAvailable ( void  )

◆ USPiGamePadGetStatus()

const USPiGamePadState * USPiGamePadGetStatus ( unsigned  nDeviceIndex)

◆ USPiGamePadRegisterStatusHandler()

void USPiGamePadRegisterStatusHandler ( TGamePadStatusHandler pStatusHandler)

◆ USPiGetMACAddress()

void USPiGetMACAddress ( unsigned char  Buffer[6])

◆ USPiInitialize()

int USPiInitialize ( void  )

◆ USPiKeyboardAvailable()

int USPiKeyboardAvailable ( void  )

◆ USPiKeyboardRegisterKeyPressedHandler()

void USPiKeyboardRegisterKeyPressedHandler ( TUSPiKeyPressedHandler pKeyPressedHandler)

◆ USPiKeyboardRegisterKeyStatusHandlerRaw()

void USPiKeyboardRegisterKeyStatusHandlerRaw ( TUSPiKeyStatusHandlerRaw pKeyStatusHandlerRaw)

◆ USPiKeyboardRegisterShutdownHandler()

void USPiKeyboardRegisterShutdownHandler ( TUSPiShutdownHandler pShutdownHandler)

◆ USPiKeyboardSetLEDs()

void USPiKeyboardSetLEDs ( unsigned char  ucLEDMask)

◆ USPiKeyboardUpdateLEDs()

void USPiKeyboardUpdateLEDs ( void  )

◆ USPiMassStorageDeviceAvailable()

int USPiMassStorageDeviceAvailable ( void  )

◆ USPiMassStorageDeviceGetCapacity()

unsigned USPiMassStorageDeviceGetCapacity ( unsigned  nDeviceIndex)

◆ USPiMassStorageDeviceRead()

int USPiMassStorageDeviceRead ( unsigned long long  ullOffset,
void *  pBuffer,
unsigned  nCount,
unsigned  nDeviceIndex 
)

◆ USPiMassStorageDeviceWrite()

int USPiMassStorageDeviceWrite ( unsigned long long  ullOffset,
const void *  pBuffer,
unsigned  nCount,
unsigned  nDeviceIndex 
)

◆ USPiMIDIAvailable()

int USPiMIDIAvailable ( void  )

◆ USPiMIDIRegisterPacketHandler()

void USPiMIDIRegisterPacketHandler ( TUSPiMIDIPacketHandler pPacketHandler)

◆ USPiMouseAvailable()

int USPiMouseAvailable ( void  )

◆ USPiMouseRegisterStatusHandler()

void USPiMouseRegisterStatusHandler ( TUSPiMouseStatusHandler pStatusHandler)

◆ USPiReceiveFrame()

int USPiReceiveFrame ( void *  pBuffer,
unsigned *  pResultLength 
)

◆ USPiSendFrame()

int USPiSendFrame ( const void *  pBuffer,
unsigned  nLength 
)