The Pedigree Project  0.1
Functions
HidUtils Namespace Reference

Various utility functions used in HID. More...

Functions

uint64_t getBufferField (uint8_t *pBuffer, size_t nStart, size_t nLength)
 Retrieves a field in a buffer.
 
void fixNegativeMinimum (int64_t &nMin, int64_t nMax)
 Converts. More...
 
void fixNegativeValue (int64_t nMin, int64_t nMax, int64_t &nValue)
 Converts. More...
 
void sendInputToManager (HidDeviceType deviceType, uint16_t nUsagePage, uint16_t nUsage, int64_t nRelativeValue)
 Sends the input to the right handler in HidInputManager or InputManager. More...
 

Detailed Description

Various utility functions used in HID.

Function Documentation

void HidUtils::fixNegativeMinimum ( int64_t &  nMin,
int64_t  nMax 
)

Converts.

Parameters
nMinto a negative value, if it has the signed bit set

Definition at line 42 of file HidUtils.cc.

Referenced by HidReport::parseDescriptor().

+ Here is the caller graph for this function:

void HidUtils::fixNegativeValue ( int64_t  nMin,
int64_t  nMax,
int64_t &  nValue 
)

Converts.

Parameters
nValueto a negative value, if it has the signed bit set

Definition at line 59 of file HidUtils.cc.

Referenced by HidReport::InputBlock::feedInput().

+ Here is the caller graph for this function:

void HidUtils::sendInputToManager ( HidDeviceType  deviceType,
uint16_t  nUsagePage,
uint16_t  nUsage,
int64_t  nRelativeValue 
)

Sends the input to the right handler in HidInputManager or InputManager.

Todo:
Matt, fix the damn input manager!!!

Definition at line 83 of file HidUtils.cc.

References HidInputManager::instance(), InputManager::instance(), InputManager::joystickUpdate(), HidInputManager::keyDown(), HidInputManager::keyUp(), and InputManager::mouseUpdate().

Referenced by HidReport::InputBlock::feedInput().

+ Here is the caller graph for this function: