forked from PAWPAW-Mirror/lib_xua
Add some report time tests & fix comments]
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <xs1.h>
|
||||
|
||||
#include "descriptor_defs.h"
|
||||
#include "xua_hid_report.h"
|
||||
#include "hid_report_descriptor.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define HID_REPORT_ITEM_LOCATION_SIZE ( 1 )
|
||||
#define HID_REPORT_DESCRIPTOR_ITEM_COUNT ( sizeof hidReportDescriptorItems / sizeof ( USB_HID_Short_Item_t* ))
|
||||
@@ -376,6 +378,7 @@ void hidReportInit( void )
|
||||
s_hidCurrentPeriod[ idx ] = ENDPOINT_INT_INTERVAL_IN_HID * MS_IN_TICKS;
|
||||
}
|
||||
memset( s_hidIdleActive, 0, sizeof( s_hidIdleActive ) );
|
||||
memset( s_hidChangePending, 0, sizeof( s_hidChangePending ) );
|
||||
}
|
||||
|
||||
void hidResetReportDescriptor( void )
|
||||
|
||||
@@ -133,9 +133,8 @@ typedef struct
|
||||
* Calling this function for a given Report ID indicates that the changed
|
||||
* HID data has been reported to the USB Host.
|
||||
*
|
||||
* \warning This function will fail silently if given a Report ID outside of
|
||||
* the supported range.
|
||||
* The supported range runs from zero inclusive to HID_REPORT_COUNT exclusive.
|
||||
* \warning This function will fail silently if given an id that is not
|
||||
* either the value zero, or a Report ID that is in use.
|
||||
*
|
||||
* \param[in] id A HID Report ID.
|
||||
* Zero clears the pending status of all Report IDs.
|
||||
@@ -259,7 +258,7 @@ void hidCalcNextReportTime( const unsigned id );
|
||||
void hidCaptureReportTime( const unsigned id, const unsigned time );
|
||||
|
||||
/**
|
||||
* @brief Get the time to send the next HID Report time for the given \a id
|
||||
* @brief Get the time to send the next HID Report for the given \a id
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
@@ -331,11 +330,8 @@ unsigned hidGetReportTime( const unsigned id );
|
||||
* Calling this function with a given Report ID returns an indication of
|
||||
* whether unreported HID data exists for that Report ID.
|
||||
*
|
||||
* \warning This function will return zero if given a Report ID outside of
|
||||
* the supported range.
|
||||
* If not using Report IDs, the supported range consists of the value zero only.
|
||||
* If using Report IDs, the supported range runs from zero inclusive to
|
||||
* HID_REPORT_COUNT exclusive.
|
||||
* \warning This function will return zero if given an id that is not
|
||||
* either the value zero, or a Report ID that is in use.
|
||||
*
|
||||
* \param[in] id A HID Report ID.
|
||||
* Zero reports the pending status of all Report IDs.
|
||||
@@ -410,11 +406,8 @@ void hidResetReportDescriptor( void );
|
||||
* for that Report ID has changed and has not yet been reported to the USB
|
||||
* Host.
|
||||
*
|
||||
* \warning This function will fail silently if given a Report ID outside of
|
||||
* the supported range.
|
||||
* If not using Report IDs, the supported range consists of the value zero only.
|
||||
* If using Report IDs, the supported range runs from one inclusive to
|
||||
* HID_REPORT_COUNT exclusive.
|
||||
* \warning This function will fail silently if given an id that is not
|
||||
* either the value zero, or a Report ID that is in use.
|
||||
*
|
||||
* \param[in] id A HID Report ID.
|
||||
* Use zero if the application does not use Report IDs.
|
||||
|
||||
Reference in New Issue
Block a user