Additional documentation and a minor renaming of an automatic variable

This commit is contained in:
mbanth
2021-11-30 15:05:37 +00:00
parent dc22b0593f
commit 966d8db9a9
2 changed files with 8 additions and 4 deletions

View File

@@ -99,7 +99,8 @@ static unsigned hidGetItemType( const unsigned char header );
* *
* Parameters: * Parameters:
* *
* @param[in] id The HID Report ID for the Usage Page * @param[in] id The HID Report ID for the Usage Page.
* A value of zero means the application does not use Report IDs.
* *
* @return The USB HID Usage Page code or zero if the \a id parameter is out-of-range * @return The USB HID Usage Page code or zero if the \a id parameter is out-of-range
*/ */
@@ -140,8 +141,8 @@ static unsigned hidGetElementReportId( const unsigned short location )
static size_t hidGetElementReportLength( const unsigned short location ) static size_t hidGetElementReportLength( const unsigned short location )
{ {
size_t bReportId = (size_t)( location & HID_REPORT_ELEMENT_LOC_LEN_MASK ) >> HID_REPORT_ELEMENT_LOC_LEN_SHIFT; size_t bReportLen = (size_t)( location & HID_REPORT_ELEMENT_LOC_LEN_MASK ) >> HID_REPORT_ELEMENT_LOC_LEN_SHIFT;
return bReportId; return bReportLen;
} }
static unsigned hidGetItemSize( const unsigned char header ) static unsigned hidGetItemSize( const unsigned char header )

View File

@@ -131,7 +131,8 @@ unsigned hidGetReportIdLimit ( void );
* *
* Parameters: * Parameters:
* *
* @param[in] id The identifier for the HID Report (see 5.6, 6.2.2.7, 8.1 and 8.2) * @param[in] id The identifier for the HID Report (see 5.6, 6.2.2.7, 8.1 and 8.2).
* A value of zero means the application does not use Report IDs.
* @param[in] byte The byte position of the control within the HID Report * @param[in] byte The byte position of the control within the HID Report
* @param[in] bit The bit position of the control within the \a byte * @param[in] bit The bit position of the control within the \a byte
* @param[out] page The USB HID Usage Page code for the Item (see 5.5) * @param[out] page The USB HID Usage Page code for the Item (see 5.5)
@@ -173,6 +174,7 @@ unsigned hidGetReportItem(
* Parameters: * Parameters:
* *
* @param[in] id The identifier for the HID Report (see 5.6, 6.2.2.7, 8.1 and 8.2) * @param[in] id The identifier for the HID Report (see 5.6, 6.2.2.7, 8.1 and 8.2)
* A value of zero means the application does not use Report IDs.
* *
* @return The length of the Report in bytes * @return The length of the Report in bytes
*/ */
@@ -205,6 +207,7 @@ void hidResetReportDescriptor( void );
* Parameters: * Parameters:
* *
* @param[in] id The identifier for the HID Report (see 5.6, 6.2.2.7, 8.1 and 8.2) * @param[in] id The identifier for the HID Report (see 5.6, 6.2.2.7, 8.1 and 8.2)
* A value of zero means the application does not use Report IDs.
* @param[in] byte The byte position of the control within the HID Report * @param[in] byte The byte position of the control within the HID Report
* @param[in] bit The bit position of the control within the \a byte * @param[in] bit The bit position of the control within the \a byte
* @param[in] page The USB HID Usage Page code for the Item (see 5.5) * @param[in] page The USB HID Usage Page code for the Item (see 5.5)