forked from PAWPAW-Mirror/lib_xua
Change interface to UserHIDRecordEvent function to support only binary event states
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#if( 0 < HID_CONTROLS )
|
#if( 0 < HID_CONTROLS )
|
||||||
#include "user_hid.h"
|
#include "user_hid.h"
|
||||||
unsigned char g_hidData[HID_DATA_BYTES] = {0};
|
unsigned char g_hidData[HID_MAX_DATA_BYTES] = {0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max);
|
void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ typedef enum hidEventId_t {
|
|||||||
HID_EVENT_ID_INVALID = 0xffffffff,
|
HID_EVENT_ID_INVALID = 0xffffffff,
|
||||||
} hidEventId_t;
|
} hidEventId_t;
|
||||||
|
|
||||||
#define HID_DATA_BYTES 4
|
#define HID_MAX_DATA_BYTES 4
|
||||||
|
|
||||||
#if( 0 < HID_CONTROLS )
|
#if( 0 < HID_CONTROLS )
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ typedef enum hidEventId_t {
|
|||||||
*
|
*
|
||||||
* \param{out} hidData The HID data
|
* \param{out} hidData The HID data
|
||||||
*/
|
*/
|
||||||
void UserHIDGetData( unsigned char hidData[ HID_DATA_BYTES ]);
|
void UserHIDGetData( unsigned char hidData[ HID_MAX_DATA_BYTES ]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Initialize HID processing
|
* \brief Initialize HID processing
|
||||||
@@ -70,17 +70,15 @@ void UserHIDInit( void );
|
|||||||
/**
|
/**
|
||||||
* \brief Record that a HID event has occurred
|
* \brief Record that a HID event has occurred
|
||||||
*
|
*
|
||||||
* \param{in} hidEventId The identifier of an event which has occurred
|
* \param{in} hidEventId The identifier of an event which has occurred.
|
||||||
* \param{in} hidEventData A list of data associated with the event
|
* Each event corresponds to bit in the HID Report:
|
||||||
* \param{in} hidEventDataSize The length of the event data list
|
* Events 0- 7 to bits 0-7 of byte 0,
|
||||||
*
|
* Events 8-15 to bits 0-7 of byte 1, etc.
|
||||||
* \note At present, this function only takes a single element of event data, i.e.
|
* \param{in} hidEventData A Boolean indicating the state of the event:
|
||||||
* hidEventDataSize must equal 1.
|
* Zero = deasserted,
|
||||||
*
|
* Any other value = asserted.
|
||||||
* \note At present, this function treats the event data as a Boolean flag.
|
|
||||||
* Zero means False; all other values mean True.
|
|
||||||
*/
|
*/
|
||||||
void UserHIDRecordEvent( const hidEventId_t hidEventId, const int * hidEventData, const unsigned hidEventDataSize );
|
void UserHIDRecordEvent( const hidEventId_t hidEventId, const unsigned hidEventData );
|
||||||
|
|
||||||
#endif /* ( 0 < HID_CONTROLS ) */
|
#endif /* ( 0 < HID_CONTROLS ) */
|
||||||
#endif /* __USER_HID_H__ */
|
#endif /* __USER_HID_H__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user