Add missing function and definition documentation.
*
* \param[in] SectionIndex Initialization section number where the function should be placed.
*/
- #define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((naked, section (".init" #SectionIndex )))
+ #define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((used, naked, section (".init" #SectionIndex )))
/** Marks a function as an alias for another function.
*
* etc.
*
* \param[in] Byte Byte of data whose bits are to be reversed.
+ *
+ * \return Input data with the individual bits reversed (mirrored).
*/
static inline uint8_t BitReverse(uint8_t Byte) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint8_t BitReverse(uint8_t Byte)
* \ingroup Group_ByteSwapping
*
* \param[in] Word Word of data whose bytes are to be swapped.
+ *
+ * \return Input data with the individual bytes reversed.
*/
static inline uint16_t SwapEndian_16(const uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint16_t SwapEndian_16(const uint16_t Word)
* \ingroup Group_ByteSwapping
*
* \param[in] DWord Double word of data whose bytes are to be swapped.
+ *
+ * \return Input data with the individual bytes reversed.
*/
static inline uint32_t SwapEndian_32(const uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint32_t SwapEndian_32(const uint32_t DWord)
*
* \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed.
* \param[in] Length Length of the data in bytes.
+ *
+ * \return Input data with the individual bytes reversed.
*/
static inline void SwapEndian_n(void* const Data,
uint8_t Length) ATTR_NON_NULL_PTR_ARG(1);
/** Mask for the first dataflash chip selected. */
#define DATAFLASH_CHIP1 0
- #if (BOARD == BOARD_XPLAIN_REV1)
- #define DATAFLASH_PAGE_SIZE 256
-
- #define DATAFLASH_PAGES 2048
- #else
+ #if ((BOARD != BOARD_XPLAIN_REV1) || defined(__DOXYGEN__))
/** Internal main memory page size for the board's dataflash ICs. */
#define DATAFLASH_PAGE_SIZE 1024
/** Total number of pages inside each of the board's dataflash ICs. */
#define DATAFLASH_PAGES 8192
+ #else
+ #define DATAFLASH_PAGE_SIZE 256
+
+ #define DATAFLASH_PAGES 2048
#endif
/* Inline Functions: */
#define DF_STATUS_SECTORPROTECTION_ON (1 << 1)
//@}
- #define DF_MANUFACTURER_ATMEL 0x1F
-
/** \name Dataflash Commands */
//@{
#define DF_CMD_GETSTATUS 0xD7
#define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F
//@}
+ /** Manufacturer code for Atmel Corporation, returned by Atmel Dataflash ICs in response to the \c DF_CMD_READMANUFACTURERDEVICEINFO command. */
+ #define DF_MANUFACTURER_ATMEL 0x1F
+
#endif
/** @} */
#define DF_STATUS_BINARYPAGESIZE_ON (1 << 0)
//@}
- #define DF_MANUFACTURER_ATMEL 0x1F
-
/** \name Dataflash Commands */
//@{
#define DF_CMD_GETSTATUS 0xD7
#define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F
//@}
+ /** Manufacturer code for Atmel Corporation, returned by Atmel Dataflash ICs in response to the \c DF_CMD_READMANUFACTURERDEVICEINFO command. */
+ #define DF_MANUFACTURER_ATMEL 0x1F
+
#endif
/** @} */
* the results read directly from the \ref ADC_GetResult() instead to reduce overhead.
*
* \param[in] MUXMask Mask comprising of an ADC channel mask, reference mask and adjustment mask.
+ *
+ * \return Converted ADC result for the given ADC channel.
*/
static inline uint16_t ADC_GetChannelReading(const uint16_t MUXMask) ATTR_WARN_UNUSED_RESULT;
static inline uint16_t ADC_GetChannelReading(const uint16_t MUXMask)
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL
//@}
+ /** \name RNDIS Media Types */
+ //@{
#define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL
+ //@}
/** \name RNDIS Connection Types */
//@{
} SCSI_Capacity_t;
/* Enums: */
+ /** Enum for the possible error codes returned by the \ref MS_Host_ConfigurePipes() function. */
enum MS_Host_EnumerationFailure_ErrorCodes_t
{
MS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
} USB_ClassInfo_PRNT_Host_t;
/* Enums: */
+ /** Enum for the possible error codes returned by the \ref PRNT_Host_ConfigurePipes() function. */
enum PRNT_Host_EnumerationFailure_ErrorCodes_t
{
PRNT_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
/* Inline Functions: */
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
/* Inline Functions: */
/** Returns the current USB frame number, when in host mode. Every millisecond the USB bus is active (i.e. not suspended)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t USB_Host_GetFrameNumber(void)
void USB_Device_ProcessControlRequest(void)
{
+ #if defined(ARCH_BIG_ENDIAN)
USB_ControlRequest.bmRequestType = Endpoint_Read_8();
USB_ControlRequest.bRequest = Endpoint_Read_8();
USB_ControlRequest.wValue = Endpoint_Read_16_LE();
USB_ControlRequest.wIndex = Endpoint_Read_16_LE();
USB_ControlRequest.wLength = Endpoint_Read_16_LE();
+ #else
+ uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest;
+
+ for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
+ *(RequestHeader++) = Endpoint_Read_8();
+ #endif
EVENT_USB_Device_ControlRequest();
{
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */
- #if ((ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA))
+ #if (((ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA)) && !defined(__DOXYGEN__))
wchar_t UnicodeString[];
#else
uint16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
/* Inline Functions: */
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
/* Inline Functions: */
/** Returns the current USB frame number, when in host mode. Every millisecond the USB bus is active (i.e. not suspended)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t USB_Host_GetFrameNumber(void)
/* Inline Functions: */
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)