From 409c49f057f2d1cdea1fc2856ac20771bc0089d1 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 24 Sep 2009 02:05:33 +0000 Subject: [PATCH] Doxygen fixes to \param directives to give data direction in all projects. Make HID item filtering routines clearer in the HID WithParser demos. --- .../KeyboardHostWithParser.c | 17 ++++++----------- .../MouseHostWithParser/MouseHostWithParser.c | 19 +++++++------------ .../KeyboardHostWithParser/HIDReport.c | 17 ++++++----------- .../LowLevel/MouseHostWithParser/HIDReport.c | 19 +++++++------------ LUFA/Drivers/Board/Dataflash.h | 6 ++++-- LUFA/Drivers/USB/Class/Host/HIDParser.h | 2 +- LUFA/Drivers/USB/LowLevel/Endpoint.h | 2 +- LUFA/Drivers/USB/LowLevel/Pipe.h | 2 +- Projects/AVRISP/Lib/V2Protocol.c | 12 ++++++------ Projects/AVRISP/Lib/V2ProtocolParams.c | 10 +++++----- Projects/AVRISP/Lib/V2ProtocolTarget.c | 12 ++++++------ Projects/AVRISP/Lib/V2ProtocolTarget.h | 2 +- 12 files changed, 51 insertions(+), 69 deletions(-) diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index d8a719d488..520c651621 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -251,20 +251,15 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8 * we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would * have occupied). * - * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with + * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with * * \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded */ bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes) { - /* Check the attributes of the current item - see if we are interested in it or not */ - if (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD) - { - /* Only store KEYBOARD usage page items into the Processed HID Report structure to save RAM */ - return true; - } - else - { - return false; - } + /* Check the attributes of the current item - see if we are interested in it or not; + * only store KEYBOARD usage page items into the Processed HID Report structure to + * save RAM and ignore the rest + */ + return (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD) } diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index 0beec9a12c..00cdb7242d 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c @@ -250,21 +250,16 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8 * we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would * have occupied). * - * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with + * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with * * \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded */ bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes) { - /* Check the attributes of the current item - see if we are interested in it or not */ - if ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) || - (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL)) - { - /* Only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report structure to save RAM */ - return true; - } - else - { - return false; - } + /* Check the attributes of the current item - see if we are interested in it or not; + * only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report + * structure to save RAM and ignore the rest + */ + return ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) || + (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL)) } diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c b/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c index 2623878d1f..78ed985a0c 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c @@ -75,20 +75,15 @@ uint8_t GetHIDReportData(void) * we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would * have occupied). * - * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with + * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with * * \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded */ bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes) { - /* Check the attributes of the current item - see if we are interested in it or not */ - if (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD) - { - /* Only store KEYBOARD usage page items into the Processed HID Report structure to save RAM */ - return true; - } - else - { - return false; - } + /* Check the attributes of the current item - see if we are interested in it or not; + * only store KEYBOARD usage page items into the Processed HID Report structure to + * save RAM and ignore the rest + */ + return (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD) } diff --git a/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c b/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c index 41abcb2213..1abf3ce3a7 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c @@ -75,21 +75,16 @@ uint8_t GetHIDReportData(void) * we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would * have occupied). * - * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with + * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with * * \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded */ bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes) { - /* Check the attributes of the current item - see if we are interested in it or not */ - if ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) || - (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL)) - { - /* Only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report structure to save RAM */ - return true; - } - else - { - return false; - } + /* Check the attributes of the current item - see if we are interested in it or not; + * only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report + * structure to save RAM and ignore the rest + */ + return ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) || + (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL)) } diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h index 1b9b71f3cc..63aca2dc18 100644 --- a/LUFA/Drivers/Board/Dataflash.h +++ b/LUFA/Drivers/Board/Dataflash.h @@ -81,9 +81,11 @@ #define __GET_DATAFLASH_MASK(x) __GET_DATAFLASH_MASK2(DATAFLASH_CHIP,x) #endif - /* Retrieves the Dataflash chip select mask for the given Dataflash chip index. + /** Retrieves the Dataflash chip select mask for the given Dataflash chip index. * - * \param index Index of the dataflash chip mask to retrieve + * \param[in] index Index of the dataflash chip mask to retrieve + * + * \return Mask for the given Dataflash chip's /CS pin */ #define DATAFLASH_CHIP_MASK(index) __GET_DATAFLASH_MASK(index) diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.h b/LUFA/Drivers/USB/Class/Host/HIDParser.h index 4322c5106e..e9716f3fc4 100644 --- a/LUFA/Drivers/USB/Class/Host/HIDParser.h +++ b/LUFA/Drivers/USB/Class/Host/HIDParser.h @@ -288,7 +288,7 @@ * HID_ReportInfo_t structure. This can be used to filter only those items the application will be using, so that * no RAM is wasted storing the attributes for report items which will never be referenced by the application. * - * \param CurrentItemAttributes Pointer to the current report item attributes for user checking + * \param[in] CurrentItemAttributes Pointer to the current report item attributes for user checking * * \return Boolean true if the item should be stored into the HID_ReportInfo_t structure, false if it should be ignored */ diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index 2fa20dfe79..ffeeb7fc49 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -334,7 +334,7 @@ /** Sets the direction of the currently selected endpoint. * - * \param DirectionMask New endpoint direction, as a ENDPOINT_DIR_* mask. + * \param[in] DirectionMask New endpoint direction, as a ENDPOINT_DIR_* mask. */ static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask); #else diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 25ca94b820..39e95cc24b 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -805,7 +805,7 @@ /** Determines if a pipe has been bound to the given device endpoint address. If a pipe which is bound to the given * endpoint is found, it is automatically selected. * - * \param EndpointAddress Address of the endpoint within the attached device to check + * \param[in] EndpointAddress Address of the endpoint within the attached device to check * * \return Boolean true if a pipe bound to the given endpoint address is found, false otherwise */ diff --git a/Projects/AVRISP/Lib/V2Protocol.c b/Projects/AVRISP/Lib/V2Protocol.c index 3aa2d89cad..6099234fae 100644 --- a/Projects/AVRISP/Lib/V2Protocol.c +++ b/Projects/AVRISP/Lib/V2Protocol.c @@ -101,7 +101,7 @@ void V2Protocol_ProcessCommand(void) /** Handler for unknown V2 protocol commands. This discards all sent data and returns a * STATUS_CMD_UNKNOWN status back to the host. * - * \param V2Command Issued V2 Protocol command byte from the host + * \param[in] V2Command Issued V2 Protocol command byte from the host */ static void V2Protocol_Command_Unknown(uint8_t V2Command) { @@ -136,7 +136,7 @@ static void V2Protocol_Command_SignOn(void) /** Handler for the CMD_SET_PARAMETER and CMD_GET_PARAMETER commands from the host, setting or * getting a device parameter's value from the parameter table. * - * \param V2Command Issued V2 Protocol command byte from the host + * \param[in] V2Command Issued V2 Protocol command byte from the host */ static void V2Protocol_Command_GetSetParam(uint8_t V2Command) { @@ -289,7 +289,7 @@ static void V2Protocol_Command_LeaveISPMode(void) /** Handler for the CMD_PROGRAM_FLASH_ISP and CMD_PROGRAM_EEPROM_ISP commands, writing out bytes, * words or pages of data to the attached device. * - * \param V2Command Issued V2 Protocol command byte from the host + * \param[in] V2Command Issued V2 Protocol command byte from the host */ static void V2Protocol_Command_ProgramMemory(uint8_t V2Command) { @@ -425,7 +425,7 @@ static void V2Protocol_Command_ProgramMemory(uint8_t V2Command) /** Handler for the CMD_READ_FLASH_ISP and CMD_READ_EEPROM_ISP commands, reading in bytes, * words or pages of data from the attached device. * - * \param V2Command Issued V2 Protocol command byte from the host + * \param[in] V2Command Issued V2 Protocol command byte from the host */ static void V2Protocol_Command_ReadMemory(uint8_t V2Command) { @@ -516,7 +516,7 @@ static void V2Protocol_Command_ChipErase(void) /** Handler for the CMD_READ_FUSE_ISP, CMD_READ_LOCK_ISP, CMD_READ_SIGNATURE_ISP and CMD_READ_OSCCAL commands, * reading the requested configuration byte from the device. * - * \param V2Command Issued V2 Protocol command byte from the host + * \param[in] V2Command Issued V2 Protocol command byte from the host */ static void V2Protocol_Command_ReadFuseLockSigOSCCAL(uint8_t V2Command) { @@ -546,7 +546,7 @@ static void V2Protocol_Command_ReadFuseLockSigOSCCAL(uint8_t V2Command) /** Handler for the CMD_WRITE_FUSE_ISP and CMD_WRITE_LOCK_ISP commands, writing the requested configuration * byte to the device. * - * \param V2Command Issued V2 Protocol command byte from the host + * \param[in] V2Command Issued V2 Protocol command byte from the host */ static void V2Protocol_Command_WriteFuseLock(uint8_t V2Command) { diff --git a/Projects/AVRISP/Lib/V2ProtocolParams.c b/Projects/AVRISP/Lib/V2ProtocolParams.c index 2d646a93cc..6aaa9558ed 100644 --- a/Projects/AVRISP/Lib/V2ProtocolParams.c +++ b/Projects/AVRISP/Lib/V2ProtocolParams.c @@ -108,7 +108,7 @@ void V2Params_UpdateParamValues(void) * be called before calls to \ref V2Params_GetParameterValue() or \ref V2Params_SetParameterValue() when * getting or setting parameter values in response to requests from the host. * - * \param ParamID Parameter ID whose privellages are to be retrieved from the table + * \param[in] ParamID Parameter ID whose privellages are to be retrieved from the table * * \return Privellages for the requested parameter, as a mask of PARAM_PRIV_* masks */ @@ -124,7 +124,7 @@ uint8_t V2Params_GetParameterPrivellages(uint8_t ParamID) /** Retrieves the current value for a given parameter in the parameter table. * - * \param ParamID Parameter ID whose value is to be retrieved from the table + * \param[in] ParamID Parameter ID whose value is to be retrieved from the table * * \return Current value of the parameter in the table, or 0 if not found */ @@ -140,8 +140,8 @@ uint8_t V2Params_GetParameterValue(uint8_t ParamID) /** Sets the value for a given parameter in the parameter table. * - * \param ParamID Parameter ID whose value is to be set in the table - * \param Value New value to set the parameter to + * \param[in] ParamID Parameter ID whose value is to be set in the table + * \param[in] Value New value to set the parameter to * * \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise */ @@ -162,7 +162,7 @@ void V2Params_SetParameterValue(uint8_t ParamID, uint8_t Value) /** Retrieves a parameter entry (including ID, value and privellages) from the parameter table that matches the given * parameter ID. * - * \param ParamID Parameter ID to find in the table + * \param[in] ParamID Parameter ID to find in the table * * \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise */ diff --git a/Projects/AVRISP/Lib/V2ProtocolTarget.c b/Projects/AVRISP/Lib/V2ProtocolTarget.c index 24cd941a4a..9f8978a708 100644 --- a/Projects/AVRISP/Lib/V2ProtocolTarget.c +++ b/Projects/AVRISP/Lib/V2ProtocolTarget.c @@ -79,7 +79,7 @@ uint8_t V2Protocol_GetSPIPrescalerMask(void) /** Asserts or deasserts the target's reset line, using the correct polarity as set by the host using a SET PARAM command. * When not asserted, the line is tristated so as not to intefere with normal device operation. * - * \param ResetTarget Boolean true when the target should be held in reset, false otherwise + * \param[in] ResetTarget Boolean true when the target should be held in reset, false otherwise */ void V2Protocol_ChangeTargetResetLine(bool ResetTarget) { @@ -100,11 +100,11 @@ void V2Protocol_ChangeTargetResetLine(bool ResetTarget) /** Waits until the last issued target memory programming command has completed, via the check mode given and using * the given parameters. * - * \param ProgrammingMode Programming mode used and completion check to use, a mask of PROG_MODE_* constants - * \param PollAddress Memory address to poll for completion if polling check mode used - * \param PollValue Poll value to check against if polling check mode used - * \param DelayMS Milliseconds to delay before returning if delay check mode used - * \param ReadMemCommand Device low-level READ MEMORY command to send if value check mode used + * \param[in] ProgrammingMode Programming mode used and completion check to use, a mask of PROG_MODE_* constants + * \param[in] PollAddress Memory address to poll for completion if polling check mode used + * \param[in] PollValue Poll value to check against if polling check mode used + * \param[in] DelayMS Milliseconds to delay before returning if delay check mode used + * \param[in] ReadMemCommand Device low-level READ MEMORY command to send if value check mode used * * \return V2 Protocol status \ref STATUS_CMD_OK if the no timeout occurred, \ref STATUS_RDY_BSY_TOUT or * \ref STATUS_CMD_TOUT otherwise diff --git a/Projects/AVRISP/Lib/V2ProtocolTarget.h b/Projects/AVRISP/Lib/V2ProtocolTarget.h index 6322b9f336..0de7b39cc2 100644 --- a/Projects/AVRISP/Lib/V2ProtocolTarget.h +++ b/Projects/AVRISP/Lib/V2ProtocolTarget.h @@ -60,7 +60,7 @@ /* Inline Functions: */ /** Blocking delay for a given number of milliseconds, via a hardware timer. * - * \param DelayMS Number of milliseconds to delay for + * \param[in] DelayMS Number of milliseconds to delay for */ static inline void V2Protocol_DelayMS(uint8_t DelayMS) {