Add missing "used" attribute to ATTR_INIT_SECTION to ensure functions declared with that meta-attribute are not discarded by the linker.
Add missing function and definition documentation.
This commit is contained in:
		
							parent
							
								
									022fa26b43
								
							
						
					
					
						commit
						77dbfd3cc4
					
				
					 17 changed files with 45 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -76,16 +76,16 @@
 | 
			
		|||
			/** 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: */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,8 +54,6 @@
 | 
			
		|||
			#define DF_STATUS_SECTORPROTECTION_ON           (1 << 1)
 | 
			
		||||
			//@}
 | 
			
		||||
 | 
			
		||||
			#define DF_MANUFACTURER_ATMEL                   0x1F
 | 
			
		||||
 | 
			
		||||
			/** \name Dataflash Commands */
 | 
			
		||||
			//@{
 | 
			
		||||
			#define DF_CMD_GETSTATUS                        0xD7
 | 
			
		||||
| 
						 | 
				
			
			@ -93,6 +91,9 @@
 | 
			
		|||
			#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
 | 
			
		||||
 | 
			
		||||
/** @} */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,8 +55,6 @@
 | 
			
		|||
			#define DF_STATUS_BINARYPAGESIZE_ON             (1 << 0)
 | 
			
		||||
			//@}
 | 
			
		||||
 | 
			
		||||
			#define DF_MANUFACTURER_ATMEL                   0x1F
 | 
			
		||||
 | 
			
		||||
			/** \name Dataflash Commands */
 | 
			
		||||
			//@{
 | 
			
		||||
			#define DF_CMD_GETSTATUS                        0xD7
 | 
			
		||||
| 
						 | 
				
			
			@ -109,6 +107,9 @@
 | 
			
		|||
			#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
 | 
			
		||||
 | 
			
		||||
/** @} */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -403,6 +403,8 @@
 | 
			
		|||
			 *        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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -114,7 +114,10 @@
 | 
			
		|||
		#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED  0x00000001UL
 | 
			
		||||
		//@}
 | 
			
		||||
		
 | 
			
		||||
		/** \name RNDIS Media Types */
 | 
			
		||||
		//@{
 | 
			
		||||
		#define REMOTE_NDIS_MEDIUM_802_3              0x00000000UL
 | 
			
		||||
		//@}
 | 
			
		||||
 | 
			
		||||
		/** \name RNDIS Connection Types */
 | 
			
		||||
		//@{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,6 +122,7 @@
 | 
			
		|||
			} 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. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -105,6 +105,7 @@
 | 
			
		|||
			} 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. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -148,6 +148,8 @@
 | 
			
		|||
		/* 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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,6 +128,8 @@
 | 
			
		|||
		/* 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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,11 +48,18 @@ bool    USB_Device_RemoteWakeupEnabled;
 | 
			
		|||
 | 
			
		||||
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();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -669,7 +669,7 @@
 | 
			
		|||
			{
 | 
			
		||||
				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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,6 +145,8 @@
 | 
			
		|||
		/* 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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -129,6 +129,8 @@
 | 
			
		|||
		/* 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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,6 +136,8 @@
 | 
			
		|||
		/* 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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue