23#include "pedigree/kernel/Spinlock.h"
24#include "pedigree/kernel/processor/types.h"
27enum HidDeviceType {
Keyboard, Mouse, Joystick, UnknownDevice = ~0 };
42 static uint32_t buttons(HidDeviceType deviceType);
47 uint32_t m_MouseButtons;
48 uint32_t m_JoystickButtons;
52uint64_t
getBufferField(uint8_t* pBuffer,
size_t nStart,
size_t nLength);
Various utility functions used in HID.
void fixNegativeMinimum(int64_t &nMin, int64_t nMax)
Converts.
uint64_t getBufferField(uint8_t *pBuffer, size_t nStart, size_t nLength)
Retrieves a field in a buffer.
void fixNegativeValue(int64_t nMin, int64_t nMax, int64_t &nValue)
Converts.
void sendInputToManager(HidDeviceType deviceType, uint16_t nUsagePage, uint16_t nUsage, int64_t nRelativeValue, InputState &state)
Sends the input to the right handler in HidInputManager or InputManager.