* we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would\r
* have occupied).\r
*\r
- * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
+ * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
*\r
* \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded\r
*/\r
bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes)\r
{\r
- /* Check the attributes of the current item - see if we are interested in it or not */\r
- if (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD)\r
- {\r
- /* Only store KEYBOARD usage page items into the Processed HID Report structure to save RAM */\r
- return true;\r
- }\r
- else\r
- {\r
- return false;\r
- }\r
+ /* Check the attributes of the current item - see if we are interested in it or not;\r
+ * only store KEYBOARD usage page items into the Processed HID Report structure to\r
+ * save RAM and ignore the rest\r
+ */\r
+ return (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD)\r
}\r
* we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would\r
* have occupied).\r
*\r
- * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
+ * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
*\r
* \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded\r
*/\r
bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes)\r
{\r
- /* Check the attributes of the current item - see if we are interested in it or not */\r
- if ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) ||\r
- (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL))\r
- {\r
- /* Only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report structure to save RAM */\r
- return true;\r
- }\r
- else\r
- {\r
- return false;\r
- }\r
+ /* Check the attributes of the current item - see if we are interested in it or not;\r
+ * only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report\r
+ * structure to save RAM and ignore the rest\r
+ */\r
+ return ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) ||\r
+ (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL))\r
}\r
* we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would\r
* have occupied).\r
*\r
- * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
+ * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
*\r
* \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded\r
*/\r
bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes)\r
{\r
- /* Check the attributes of the current item - see if we are interested in it or not */\r
- if (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD)\r
- {\r
- /* Only store KEYBOARD usage page items into the Processed HID Report structure to save RAM */\r
- return true;\r
- }\r
- else\r
- {\r
- return false;\r
- }\r
+ /* Check the attributes of the current item - see if we are interested in it or not;\r
+ * only store KEYBOARD usage page items into the Processed HID Report structure to\r
+ * save RAM and ignore the rest\r
+ */\r
+ return (CurrentItemAttributes->Usage.Page == USAGE_PAGE_KEYBOARD)\r
}\r
* we aren't interested in (preventing us from being able to extract them later on, but saving on the RAM they would\r
* have occupied).\r
*\r
- * \param CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
+ * \param[in] CurrentItemAttributes Pointer to the attrbutes of the item the HID report parser is currently working with\r
*\r
* \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded\r
*/\r
bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_Attributes_t* CurrentItemAttributes)\r
{\r
- /* Check the attributes of the current item - see if we are interested in it or not */\r
- if ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) ||\r
- (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL))\r
- {\r
- /* Only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report structure to save RAM */\r
- return true;\r
- }\r
- else\r
- {\r
- return false;\r
- }\r
+ /* Check the attributes of the current item - see if we are interested in it or not;\r
+ * only store BUTTON and GENERIC_DESKTOP_CONTROL items into the Processed HID Report\r
+ * structure to save RAM and ignore the rest\r
+ */\r
+ return ((CurrentItemAttributes->Usage.Page == USAGE_PAGE_BUTTON) ||\r
+ (CurrentItemAttributes->Usage.Page == USAGE_PAGE_GENERIC_DCTRL))\r
}\r
#define __GET_DATAFLASH_MASK(x) __GET_DATAFLASH_MASK2(DATAFLASH_CHIP,x)\r
#endif\r
\r
- /* Retrieves the Dataflash chip select mask for the given Dataflash chip index.\r
+ /** Retrieves the Dataflash chip select mask for the given Dataflash chip index.\r
*\r
- * \param index Index of the dataflash chip mask to retrieve\r
+ * \param[in] index Index of the dataflash chip mask to retrieve\r
+ *\r
+ * \return Mask for the given Dataflash chip's /CS pin\r
*/\r
#define DATAFLASH_CHIP_MASK(index) __GET_DATAFLASH_MASK(index)\r
\r
* HID_ReportInfo_t structure. This can be used to filter only those items the application will be using, so that\r
* no RAM is wasted storing the attributes for report items which will never be referenced by the application.\r
*\r
- * \param CurrentItemAttributes Pointer to the current report item attributes for user checking\r
+ * \param[in] CurrentItemAttributes Pointer to the current report item attributes for user checking\r
*\r
* \return Boolean true if the item should be stored into the HID_ReportInfo_t structure, false if it should be ignored\r
*/\r
\r
/** Sets the direction of the currently selected endpoint.\r
*\r
- * \param DirectionMask New endpoint direction, as a ENDPOINT_DIR_* mask.\r
+ * \param[in] DirectionMask New endpoint direction, as a ENDPOINT_DIR_* mask.\r
*/\r
static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask);\r
#else\r
/** Determines if a pipe has been bound to the given device endpoint address. If a pipe which is bound to the given\r
* endpoint is found, it is automatically selected.\r
*\r
- * \param EndpointAddress Address of the endpoint within the attached device to check\r
+ * \param[in] EndpointAddress Address of the endpoint within the attached device to check\r
*\r
* \return Boolean true if a pipe bound to the given endpoint address is found, false otherwise\r
*/\r
/** Handler for unknown V2 protocol commands. This discards all sent data and returns a\r
* STATUS_CMD_UNKNOWN status back to the host.\r
*\r
- * \param V2Command Issued V2 Protocol command byte from the host\r
+ * \param[in] V2Command Issued V2 Protocol command byte from the host\r
*/\r
static void V2Protocol_Command_Unknown(uint8_t V2Command)\r
{\r
/** Handler for the CMD_SET_PARAMETER and CMD_GET_PARAMETER commands from the host, setting or\r
* getting a device parameter's value from the parameter table.\r
*\r
- * \param V2Command Issued V2 Protocol command byte from the host\r
+ * \param[in] V2Command Issued V2 Protocol command byte from the host\r
*/\r
static void V2Protocol_Command_GetSetParam(uint8_t V2Command)\r
{\r
/** Handler for the CMD_PROGRAM_FLASH_ISP and CMD_PROGRAM_EEPROM_ISP commands, writing out bytes,\r
* words or pages of data to the attached device.\r
*\r
- * \param V2Command Issued V2 Protocol command byte from the host\r
+ * \param[in] V2Command Issued V2 Protocol command byte from the host\r
*/\r
static void V2Protocol_Command_ProgramMemory(uint8_t V2Command)\r
{\r
/** Handler for the CMD_READ_FLASH_ISP and CMD_READ_EEPROM_ISP commands, reading in bytes,\r
* words or pages of data from the attached device.\r
*\r
- * \param V2Command Issued V2 Protocol command byte from the host\r
+ * \param[in] V2Command Issued V2 Protocol command byte from the host\r
*/\r
static void V2Protocol_Command_ReadMemory(uint8_t V2Command)\r
{\r
/** Handler for the CMD_READ_FUSE_ISP, CMD_READ_LOCK_ISP, CMD_READ_SIGNATURE_ISP and CMD_READ_OSCCAL commands,\r
* reading the requested configuration byte from the device.\r
*\r
- * \param V2Command Issued V2 Protocol command byte from the host\r
+ * \param[in] V2Command Issued V2 Protocol command byte from the host\r
*/\r
static void V2Protocol_Command_ReadFuseLockSigOSCCAL(uint8_t V2Command)\r
{\r
/** Handler for the CMD_WRITE_FUSE_ISP and CMD_WRITE_LOCK_ISP commands, writing the requested configuration\r
* byte to the device.\r
*\r
- * \param V2Command Issued V2 Protocol command byte from the host\r
+ * \param[in] V2Command Issued V2 Protocol command byte from the host\r
*/\r
static void V2Protocol_Command_WriteFuseLock(uint8_t V2Command)\r
{\r
* be called before calls to \ref V2Params_GetParameterValue() or \ref V2Params_SetParameterValue() when\r
* getting or setting parameter values in response to requests from the host.\r
*\r
- * \param ParamID Parameter ID whose privellages are to be retrieved from the table\r
+ * \param[in] ParamID Parameter ID whose privellages are to be retrieved from the table\r
*\r
* \return Privellages for the requested parameter, as a mask of PARAM_PRIV_* masks\r
*/ \r
\r
/** Retrieves the current value for a given parameter in the parameter table.\r
*\r
- * \param ParamID Parameter ID whose value is to be retrieved from the table\r
+ * \param[in] ParamID Parameter ID whose value is to be retrieved from the table\r
*\r
* \return Current value of the parameter in the table, or 0 if not found\r
*/ \r
\r
/** Sets the value for a given parameter in the parameter table.\r
*\r
- * \param ParamID Parameter ID whose value is to be set in the table\r
- * \param Value New value to set the parameter to\r
+ * \param[in] ParamID Parameter ID whose value is to be set in the table\r
+ * \param[in] Value New value to set the parameter to\r
*\r
* \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise\r
*/\r
/** Retrieves a parameter entry (including ID, value and privellages) from the parameter table that matches the given\r
* parameter ID.\r
*\r
- * \param ParamID Parameter ID to find in the table\r
+ * \param[in] ParamID Parameter ID to find in the table\r
*\r
* \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise\r
*/\r
/** Asserts or deasserts the target's reset line, using the correct polarity as set by the host using a SET PARAM command.\r
* When not asserted, the line is tristated so as not to intefere with normal device operation.\r
*\r
- * \param ResetTarget Boolean true when the target should be held in reset, false otherwise\r
+ * \param[in] ResetTarget Boolean true when the target should be held in reset, false otherwise\r
*/\r
void V2Protocol_ChangeTargetResetLine(bool ResetTarget)\r
{\r
/** Waits until the last issued target memory programming command has completed, via the check mode given and using\r
* the given parameters.\r
*\r
- * \param ProgrammingMode Programming mode used and completion check to use, a mask of PROG_MODE_* constants\r
- * \param PollAddress Memory address to poll for completion if polling check mode used\r
- * \param PollValue Poll value to check against if polling check mode used\r
- * \param DelayMS Milliseconds to delay before returning if delay check mode used\r
- * \param ReadMemCommand Device low-level READ MEMORY command to send if value check mode used\r
+ * \param[in] ProgrammingMode Programming mode used and completion check to use, a mask of PROG_MODE_* constants\r
+ * \param[in] PollAddress Memory address to poll for completion if polling check mode used\r
+ * \param[in] PollValue Poll value to check against if polling check mode used\r
+ * \param[in] DelayMS Milliseconds to delay before returning if delay check mode used\r
+ * \param[in] ReadMemCommand Device low-level READ MEMORY command to send if value check mode used\r
*\r
* \return V2 Protocol status \ref STATUS_CMD_OK if the no timeout occurred, \ref STATUS_RDY_BSY_TOUT or\r
* \ref STATUS_CMD_TOUT otherwise\r
/* Inline Functions: */\r
/** Blocking delay for a given number of milliseconds, via a hardware timer.\r
*\r
- * \param DelayMS Number of milliseconds to delay for\r
+ * \param[in] DelayMS Number of milliseconds to delay for\r
*/\r
static inline void V2Protocol_DelayMS(uint8_t DelayMS)\r
{\r