aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDISClassDevice.h6
-rw-r--r--LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h6
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDCClassHost.h6
-rw-r--r--LUFA/Drivers/USB/Class/Host/PrinterClassHost.h4
-rw-r--r--LUFA/Drivers/USB/Core/ConfigDescriptors.h13
5 files changed, 18 insertions, 17 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.h b/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.h
index 9a80132ec..d455cc98b 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.h
+++ b/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.h
@@ -137,7 +137,7 @@
*
* \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.
@@ -153,7 +153,7 @@
*/
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.
*
@@ -168,7 +168,7 @@
*/
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__)
diff --git a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
index 6a4701e13..bcc76f923 100644
--- a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
+++ b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
@@ -176,7 +176,7 @@
*/
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
@@ -267,7 +267,7 @@
* \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.
@@ -278,7 +278,7 @@
* \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__)
diff --git a/LUFA/Drivers/USB/Class/Host/CDCClassHost.h b/LUFA/Drivers/USB/Class/Host/CDCClassHost.h
index 23d637ae6..1b421c52a 100644
--- a/LUFA/Drivers/USB/Class/Host/CDCClassHost.h
+++ b/LUFA/Drivers/USB/Class/Host/CDCClassHost.h
@@ -199,7 +199,7 @@
*/
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
@@ -291,7 +291,7 @@
* \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.
@@ -302,7 +302,7 @@
* \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
diff --git a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h
index 9a7cb0845..792f86564 100644
--- a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h
+++ b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h
@@ -231,7 +231,7 @@
*
* \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
@@ -244,7 +244,7 @@
*
* \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
diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptors.h b/LUFA/Drivers/USB/Core/ConfigDescriptors.h
index 98aefa751..ad3c98721 100644
--- a/LUFA/Drivers/USB/Core/ConfigDescriptors.h
+++ b/LUFA/Drivers/USB/Core/ConfigDescriptors.h
@@ -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
*/
@@ -231,7 +231,7 @@
* Usage Example:
* \code
* uint8_t EndpointSearcher(void* CurrentDescriptor); // Comparator Prototype
- *
+ *
* uint8_t EndpointSearcher(void* CurrentDescriptor)
* {
* if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
@@ -239,9 +239,9 @@
* else
* return DESCRIPTOR_SEARCH_NotFound;
* }
- *
+ *
* //...
- *
+ *
* // After retrieving configuration descriptor:
* if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) ==
* Descriptor_Search_Comp_Found)
@@ -252,7 +252,8 @@
*/
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