Add some missing function attributes.
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 11 Apr 2013 17:39:00 +0000 (17:39 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 11 Apr 2013 17:39:00 +0000 (17:39 +0000)
12 files changed:
LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h
LUFA/Drivers/Peripheral/XMEGA/SerialSPI_XMEGA.h
LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c
LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.h
LUFA/Drivers/USB/Class/Device/RNDISClassDevice.h
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
LUFA/Drivers/USB/Class/Host/CDCClassHost.h
LUFA/Drivers/USB/Class/Host/PrinterClassHost.h
LUFA/Drivers/USB/Core/ConfigDescriptors.h
LUFA/Platform/XMEGA/ClockManagement.h

index be5434e..3fc681a 100644 (file)
  *      // Initialize the SPI driver before first use
  *      SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
  *               SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
- *      
+ *
  *      // Send several bytes, ignoring the returned data
  *      SPI_SendByte(0x01);
  *      SPI_SendByte(0x02);
  *      SPI_SendByte(0x03);
- *      
+ *
  *      // Receive several bytes, sending a dummy 0x00 byte each time
  *      uint8_t Byte1 = SPI_ReceiveByte();
  *      uint8_t Byte2 = SPI_ReceiveByte();
  *      uint8_t Byte3 = SPI_ReceiveByte();
- *      
+ *
  *      // Send a byte, and store the received byte from the same transaction
  *      uint8_t ResponseByte = SPI_TransferByte(0xDC);
  *  \endcode
                         *  \param[in] SPIOptions  SPI Options, a mask consisting of one of each of the \c SPI_SPEED_*,
                         *                         \c SPI_SCK_*, \c SPI_SAMPLE_*, \c SPI_ORDER_* and \c SPI_MODE_* masks.
                         */
+                       static inline void SPI_Init(const uint8_t SPIOptions);
                        static inline void SPI_Init(const uint8_t SPIOptions)
                        {
                                /* Prevent high rise times on PB.0 (/SS) from forcing a change to SPI slave mode */
                        }
 
                        /** Turns off the SPI driver, disabling and returning used hardware to their default configuration. */
+                       static inline void SPI_Disable(void);
                        static inline void SPI_Disable(void)
                        {
                                DDRB  &= ~((1 << 1) | (1 << 2));
index c0a9067..80de7da 100644 (file)
                         *  \param[in] Prescale   Prescaler to use when determining the bus frequency, a \c TWI_BIT_PRESCALE_* value.
                         *  \param[in] BitLength  Length of the bits sent on the bus.
                         */
-                       static inline void TWI_Init(const uint8_t Prescale, const uint8_t BitLength) ATTR_ALWAYS_INLINE;
-                       static inline void TWI_Init(const uint8_t Prescale, const uint8_t BitLength)
+                       static inline void TWI_Init(const uint8_t Prescale,
+                                                   const uint8_t BitLength) ATTR_ALWAYS_INLINE;
+                       static inline void TWI_Init(const uint8_t Prescale,
+                                                   const uint8_t BitLength)
                        {
                                TWCR |= (1 << TWEN);
                                TWSR  = Prescale;
index 4c06851..b1678db 100644 (file)
  *      SPI_Init(&SPIC,
  *               SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
  *               SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
- *      
+ *
  *      // Send several bytes, ignoring the returned data
  *      SPI_SendByte(&SPIC, 0x01);
  *      SPI_SendByte(&SPIC, 0x02);
  *      SPI_SendByte(&SPIC, 0x03);
- *      
+ *
  *      // Receive several bytes, sending a dummy 0x00 byte each time
  *      uint8_t Byte1 = SPI_ReceiveByte(&SPIC);
  *      uint8_t Byte2 = SPI_ReceiveByte(&SPIC);
  *      uint8_t Byte3 = SPI_ReceiveByte(&SPIC);
- *      
+ *
  *      // Send a byte, and store the received byte from the same transaction
  *      uint8_t ResponseByte = SPI_TransferByte(&SPIC, 0xDC);
  *  \endcode
                         *                             \c SPI_SCK_*, \c SPI_SAMPLE_*, \c SPI_ORDER_* and \c SPI_MODE_* masks.
                         */
                        static inline void SPI_Init(SPI_t* const SPI,
+                                                   const uint8_t SPIOptions) ATTR_NON_NULL_PTR_ARG(1);
+                       static inline void SPI_Init(SPI_t* const SPI,
                                                    const uint8_t SPIOptions)
                        {
                                SPI->CTRL = (SPIOptions | SPI_ENABLE_bm);
                         *
                         *  \param[in,out] SPI   Pointer to the base of the SPI peripheral within the device.
                         */
+                       static inline void SPI_Disable(SPI_t* const SPI) ATTR_NON_NULL_PTR_ARG(1);
                        static inline void SPI_Disable(SPI_t* const SPI)
                        {
                                SPI->CTRL &= ~SPI_ENABLE_bm;
                         *
                         *  \return \ref SPI_MODE_MASTER if the interface is currently in SPI Master mode, \ref SPI_MODE_SLAVE otherwise
                         */
-                       static inline uint8_t SPI_GetCurrentMode(SPI_t* const SPI) ATTR_ALWAYS_INLINE;
+                       static inline uint8_t SPI_GetCurrentMode(SPI_t* const SPI) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline uint8_t SPI_GetCurrentMode(SPI_t* const SPI)
                        {
                                return (SPI->CTRL & SPI_MASTER_bm);
                         *  \return Response byte from the attached SPI device.
                         */
                        static inline uint8_t SPI_TransferByte(SPI_t* const SPI,
-                                                              const uint8_t Byte) ATTR_ALWAYS_INLINE;
+                                                              const uint8_t Byte) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline uint8_t SPI_TransferByte(SPI_t* const SPI,
                                                               const uint8_t Byte)
                        {
                         *  \param[in]     Byte  Byte to send through the SPI interface.
                         */
                        static inline void SPI_SendByte(SPI_t* const SPI,
-                                                       const uint8_t Byte) ATTR_ALWAYS_INLINE;
+                                                       const uint8_t Byte) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline void SPI_SendByte(SPI_t* const SPI,
                                                        const uint8_t Byte)
                        {
                         *
                         *  \return The response byte from the attached SPI device.
                         */
-                       static inline uint8_t SPI_ReceiveByte(SPI_t* const SPI) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
+                       static inline uint8_t SPI_ReceiveByte(SPI_t* const SPI) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        static inline uint8_t SPI_ReceiveByte(SPI_t* const SPI)
                        {
                                SPI->DATA = 0;
index 7042e9c..38b682c 100644 (file)
  *  \code
  *      // Initialize the Master SPI mode USART driver before first use, with 1Mbit baud
  *      SerialSPI_Init(&USARTD0, (USART_SPI_SCK_LEAD_RISING | USART_SPI_SAMPLE_LEADING | USART_SPI_ORDER_MSB_FIRST), 1000000);
- *      
+ *
  *      // Send several bytes, ignoring the returned data
  *      SerialSPI_SendByte(&USARTD0, 0x01);
  *      SerialSPI_SendByte(&USARTD0, 0x02);
  *      SerialSPI_SendByte(&USARTD0, 0x03);
- *      
+ *
  *      // Receive several bytes, sending a dummy 0x00 byte each time
  *      uint8_t Byte1 = SerialSPI_ReceiveByte(&USARTD);
  *      uint8_t Byte2 = SerialSPI_ReceiveByte(&USARTD);
  *      uint8_t Byte3 = SerialSPI_ReceiveByte(&USARTD);
- *      
+ *
  *      // Send a byte, and store the received byte from the same transaction
  *      uint8_t ResponseByte = SerialSPI_TransferByte(&USARTD0, 0xDC);
  *  \endcode
 
                        /** SPI data order mask for \ref SerialSPI_Init(). Indicates that data should be shifted out LSB first. */
                        #define USART_SPI_ORDER_LSB_FIRST      USART_UDORD_bm
-                       //@}                    
+                       //@}
 
                /* Inline Functions: */
-                       /** Initialize the USART module in Master SPI mode. 
+                       /** Initialize the USART module in Master SPI mode.
                         *
                         *  \param[in,out] USART        Pointer to the base of the USART peripheral within the device.
                         *  \param[in]     SPIOptions   USART SPI Options, a mask consisting of one of each of the \c USART_SPI_SCK_*,
                         */
                        static inline void SerialSPI_Init(USART_t* const USART,
                                                          const uint8_t SPIOptions,
+                                                         const uint32_t BaudRate) ATTR_NON_NULL_PTR_ARG(1);
+                       static inline void SerialSPI_Init(USART_t* const USART,
+                                                         const uint8_t SPIOptions,
                                                          const uint32_t BaudRate)
                        {
                                uint16_t BaudValue = SERIAL_SPI_UBBRVAL(BaudRate);
-                       
+
                                USART->BAUDCTRLB = (BaudValue >> 8);
                                USART->BAUDCTRLA = (BaudValue & 0xFF);
-                       
+
                                USART->CTRLC = (USART_CMODE_MSPI_gc | SPIOptions);
                                USART->CTRLB = (USART_RXEN_bm | USART_TXEN_bm);
                        }
-                       
+
                        /** Turns off the USART driver, disabling and returning used hardware to their default configuration.
                         *
                         *  \param[in,out] USART  Pointer to the base of the USART peripheral within the device.
                         */
+                       static inline void SerialSPI_Disable(USART_t* const USART) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline void SerialSPI_Disable(USART_t* const USART)
                        {
                                USART->CTRLA = 0;
                                USART->CTRLB = 0;
                                USART->CTRLC = 0;
                        }
-                       
+
                        /** Sends and receives a byte through the USART SPI interface, blocking until the transfer is complete.
                         *
                         *  \param[in,out] USART     Pointer to the base of the USART peripheral within the device.
                         *  \return Response byte from the attached SPI device.
                         */
                        static inline uint8_t SerialSPI_TransferByte(USART_t* const USART,
+                                                                    const uint8_t DataByte) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
+                       static inline uint8_t SerialSPI_TransferByte(USART_t* const USART,
                                                                     const uint8_t DataByte)
                        {
                                USART->DATA   = DataByte;
                         *  \param[in]     DataByte  Byte to send through the USART SPI interface.
                         */
                        static inline void SerialSPI_SendByte(USART_t* const USART,
+                                                             const uint8_t DataByte) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1)
+                       static inline void SerialSPI_SendByte(USART_t* const USART,
                                                              const uint8_t DataByte)
                        {
                                SerialSPI_TransferByte(USART, DataByte);
                         *
                         *  \return The response byte from the attached SPI device.
                         */
+                       static inline uint8_t SerialSPI_ReceiveByte(USART_t* const USART) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        static inline uint8_t SerialSPI_ReceiveByte(USART_t* const USART)
                        {
                                return SerialSPI_TransferByte(USART, 0);
                        }
-                       
+
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
                        }
index c7dcd61..3d61952 100644 (file)
@@ -95,7 +95,7 @@ void Serial_SendData(USART_t* const USART,
          Serial_SendByte(USART, *((uint8_t*)Buffer++));
 }
 
-void Serial_CreateStream(FILE* Stream)
+void Serial_CreateStream(FILE* const Stream)
 {
        if (!(Stream))
        {
@@ -107,7 +107,7 @@ void Serial_CreateStream(FILE* Stream)
        *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
 }
 
-void Serial_CreateBlockingStream(FILE* Stream)
+void Serial_CreateBlockingStream(FILE* const Stream)
 {
        if (!(Stream))
        {
index 04941b1..6d8e6ee 100644 (file)
                         *  \param[in]     Length  Length of the data to send, in bytes.
                         */
                        void Serial_SendData(USART_t* const USART,
-                                            const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                                            const void* Buffer,
+                                            uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Creates a standard character stream from the USART so that it can be used with all the regular functions
                         *  in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
                         *
                         *  \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
                         */
-                       void Serial_CreateStream(FILE* Stream);
+                       void Serial_CreateStream(FILE* const Stream);
 
                        /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer.
                         *
                         *  \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
                         */
-                       void Serial_CreateBlockingStream(FILE* Stream);
+                       void Serial_CreateBlockingStream(FILE* const Stream);
 
                /* Inline Functions: */
                        /** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to
                         */
                        static inline void Serial_Init(USART_t* const USART,
                                                       const uint32_t BaudRate,
+                                                      const bool DoubleSpeed) ATTR_NON_NULL_PTR_ARG(1);
+                       static inline void Serial_Init(USART_t* const USART,
+                                                      const uint32_t BaudRate,
                                                       const bool DoubleSpeed)
                        {
                                uint16_t BaudValue = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));
                         *
                         *  \param[in,out] USART  Pointer to the base of the USART peripheral within the device.
                         */
+                       static inline void Serial_Disable(USART_t* const USART) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline void Serial_Disable(USART_t* const USART)
                        {
                                USART->CTRLA = 0;
                         *
                         *  \return Boolean \c true if a character has been received, \c false otherwise.
                         */
-                       static inline bool Serial_IsCharReceived(USART_t* const USART) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline bool Serial_IsCharReceived(USART_t* const USART) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        static inline bool Serial_IsCharReceived(USART_t* const USART)
                        {
                                return ((USART->STATUS & USART_RXCIF_bm) ? true : false);
                         *  \param[in]     DataByte  Byte to transmit through the USART.
                         */
                        static inline void Serial_SendByte(USART_t* const USART,
-                                                          const char DataByte) ATTR_ALWAYS_INLINE;
+                                                          const char DataByte) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline void Serial_SendByte(USART_t* const USART,
                                                           const char DataByte)
                        {
                         *
                         *  \return Next byte received from the USART, or a negative value if no byte has been received.
                         */
-                       static inline int16_t Serial_ReceiveByte(USART_t* const USART) ATTR_ALWAYS_INLINE;
+                       static inline int16_t Serial_ReceiveByte(USART_t* const USART) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1);
                        static inline int16_t Serial_ReceiveByte(USART_t* const USART)
                        {
                                if (!(Serial_IsCharReceived(USART)))
index 9a80132..d455cc9 100644 (file)
                         *
                         *  \return Boolean \c true if a packet is waiting to be read in by the host, \c false otherwise.
                         */
-                       bool RNDIS_Device_IsPacketReceived(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo);
+                       bool RNDIS_Device_IsPacketReceived(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Retrieves the next pending packet from the device, discarding the remainder of the RNDIS packet header to leave
                         *  only the packet contents for processing by the device in the nominated buffer.
                         */
                        uint8_t RNDIS_Device_ReadPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
                                                                                        void* Buffer,
-                                                                                       uint16_t* const PacketLength);
+                                                                                       uint16_t* const PacketLength) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.
                         *
                         */
                        uint8_t RNDIS_Device_SendPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
                                                                                        void* Buffer,
-                                                                                       const uint16_t PacketLength);
+                                                                                       const uint16_t PacketLength) ATTR_NON_NULL_PTR_ARG(1);
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
index 6a4701e..bcc76f9 100644 (file)
                         */
                        uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
                                                  const void* const Buffer,
-                                                 const uint16_t Length);
+                                                 const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the
                         *  function is called, the string is discarded. Bytes will be queued for transmission to the device until either the pipe
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                        void AOA_Host_CreateStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
-                                                  FILE* const Stream);
+                                                  FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Identical to \ref AOA_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer. While blocking, the USB and AOA service tasks are called repeatedly to maintain USB communications.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                        void AOA_Host_CreateBlockingStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
-                                                          FILE* const Stream);
+                                                          FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
index 23d637a..1b421c5 100644 (file)
                         */
                        uint8_t CDC_Host_SendData(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
                                                  const void* const Buffer,
-                                                 const uint16_t Length);
+                                                 const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the
                         *  function is called, the string is discarded. Bytes will be queued for transmission to the device until either the pipe
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                        void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
-                                                  FILE* const Stream);
+                                                  FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Identical to \ref CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                        void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
-                                                          FILE* const Stream);
+                                                          FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1)  ATTR_NON_NULL_PTR_ARG(2);
                        #endif
 
                        /** CDC class driver event for a control line state change on a CDC host interface. This event fires each time the device notifies
index 9a7cb08..792f865 100644 (file)
                         *
                         *  \return Total number of buffered bytes received from the device.
                         */
-                       uint16_t PRNT_Host_BytesReceived(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo);
+                       uint16_t PRNT_Host_BytesReceived(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Reads a byte of data from the device. If no data is waiting to be read of if a USB device is not connected, the function
                         *  returns a negative value. The \ref PRNT_Host_BytesReceived() function may be queried in advance to determine how many bytes
                         *
                         *  \return Next received byte from the device, or a negative value if no data received.
                         */
-                       int16_t PRNT_Host_ReceiveByte(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo);
+                       int16_t PRNT_Host_ReceiveByte(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Retrieves the attached printer device's ID string, formatted according to IEEE 1284. This string is sent as a
                         *  Unicode string from the device and is automatically converted to an ASCII encoded C string by this function, thus
index 98aefa7..ad3c987 100644 (file)
@@ -76,7 +76,7 @@
                         *  uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
                         *  USB_Descriptor_Configuration_Header_t* ConfigHeaderPtr = DESCRIPTOR_PCAST(CurrDescriptor,
                         *                                                           USB_Descriptor_Configuration_Header_t);
-                        *  
+                        *
                         *  // Can now access elements of the configuration header struct using the -> indirection operator
                         *  \endcode
                         */
@@ -90,7 +90,7 @@
                         *  uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
                         *  USB_Descriptor_Configuration_Header_t ConfigHeader = DESCRIPTOR_CAST(CurrDescriptor,
                         *                                                       USB_Descriptor_Configuration_Header_t);
-                        *  
+                        *
                         *  // Can now access elements of the configuration header struct using the . operator
                         *  \endcode
                         */
                         *  Usage Example:
                         *  \code
                         *  uint8_t EndpointSearcher(void* CurrentDescriptor); // Comparator Prototype
-                        *  
+                        *
                         *  uint8_t EndpointSearcher(void* CurrentDescriptor)
                         *  {
                         *     if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
                         *     else
                         *         return DESCRIPTOR_SEARCH_NotFound;
                         *  }
-                        *  
+                        *
                         *  //...
-                        *  
+                        *
                         *  // After retrieving configuration descriptor:
                         *  if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) ==
                         *      Descriptor_Search_Comp_Found)
                         */
                        uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
                                                          void** const CurrConfigLoc,
-                                                         ConfigComparatorPtr_t const ComparatorRoutine);
+                                                         ConfigComparatorPtr_t const ComparatorRoutine) ATTR_NON_NULL_PTR_ARG(1)
+                                                         ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3);
 
                /* Inline Functions: */
                        /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
index 2a2e50f..ec341a2 100644 (file)
  *  Usage Example:
  *  \code
  *     #include <LUFA/Platform/XMEGA/ClockManagement.h>
- *      
+ *
  *     void main(void)
  *     {
  *             // Start the PLL to multiply the 2MHz RC oscillator to F_CPU and switch the CPU core to run from it
  *             XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
  *             XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
- *          
+ *
  *             // Start the 32MHz internal RC oscillator and start the DFLL to increase it to F_USB using the USB SOF as a reference
  *             XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
  *             XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
                         *  \param[in] Address  Address to write to, a memory address protected by the CCP mechanism
                         *  \param[in] Value    Value to write to the protected location
                         */
-                       static inline void XMEGACLK_CCP_Write(volatile void* Address, const uint8_t Value) ATTR_ALWAYS_INLINE;
+                       static inline void XMEGACLK_CCP_Write(volatile void* Address, const uint8_t Value) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void XMEGACLK_CCP_Write(volatile void* Address, const uint8_t Value)
                        {
                                __asm__ __volatile__ (
                                        : /* No output operands */
                                        : /* Input operands: */ "m" (RAMPZ), "e" (Address), "m" (CCP), "r" (CCP_IOREG_gc), "r" (Value)
                                        : /* Clobbered registers: */ "r30", "r31"
-                               ); 
+                               );
                        }
 
                        /** Starts the external oscillator of the XMEGA microcontroller, with the given options. This routine blocks until
 
                                if (SourceFreq > Frequency)
                                  return false;
-                                 
+
                                if (MulFactor > 31)
                                  return false;