Add const attribute to class driver APIs.
Add new manual pages detailing the advantages of LUFA over the official Atmel USB AVR stack, and reasons why LUFA should be used over a built-from-scratch USB stack.
This commit is contained in:
		
							parent
							
								
									de8c9445d4
								
							
						
					
					
						commit
						870591983c
					
				
					 17 changed files with 132 additions and 44 deletions
				
			
		| 
						 | 
				
			
			@ -132,7 +132,7 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
 | 
			
		|||
	return CDC_ENUMERROR_NoError;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -150,7 +150,7 @@ static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* CurrentDescriptor)
 | 
			
		|||
	return DESCRIPTOR_SEARCH_NotFound;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -168,7 +168,7 @@ static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* CurrentDescriptor)
 | 
			
		|||
	return DESCRIPTOR_SEARCH_NotFound;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_CDC_Host_NextCDCInterfaceEndpoint(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_CDC_Host_NextCDCInterfaceEndpoint(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -227,11 +227,11 @@
 | 
			
		|||
		/* Function Prototypes: */
 | 
			
		||||
			#if defined(INCLUDE_FROM_CDC_CLASS_HOST_C)
 | 
			
		||||
				void CDC_Host_Event_Stub(void);
 | 
			
		||||
				void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo)
 | 
			
		||||
				void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
 | 
			
		||||
				                                           ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Host_Event_Stub);
 | 
			
		||||
				static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_CDC_Host_NextCDCInterfaceEndpoint(void* CurrentDescriptor);
 | 
			
		||||
				static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_CDC_Host_NextCDCInterfaceEndpoint(void* const CurrentDescriptor);
 | 
			
		||||
			#endif	
 | 
			
		||||
	#endif
 | 
			
		||||
				
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -106,7 +106,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
 | 
			
		|||
	return HID_ENUMERROR_NoError;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_HID_Host_NextHIDInterface(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_HID_Host_NextHIDInterface(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -120,7 +120,7 @@ static uint8_t DComp_HID_Host_NextHIDInterface(void* CurrentDescriptor)
 | 
			
		|||
	return DESCRIPTOR_SEARCH_NotFound;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_NextHID(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_NextHID(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_HID)
 | 
			
		||||
	  return DESCRIPTOR_SEARCH_Found;
 | 
			
		||||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ static uint8_t DComp_NextHID(void* CurrentDescriptor)
 | 
			
		|||
	  return DESCRIPTOR_SEARCH_NotFound;	  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -252,9 +252,9 @@
 | 
			
		|||
 | 
			
		||||
		/* Function Prototypes: */
 | 
			
		||||
			#if defined(INCLUDE_FROM_HID_CLASS_HOST_C)
 | 
			
		||||
				static uint8_t DComp_HID_Host_NextHIDInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_NextHID(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_HID_Host_NextHIDInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_NextHID(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
			#endif	
 | 
			
		||||
	#endif	
 | 
			
		||||
	
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -82,7 +82,7 @@ uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceI
 | 
			
		|||
	return MIDI_ENUMERROR_NoError;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_MIDI_Host_NextMIDIStreamingInterface(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -100,7 +100,7 @@ static uint8_t DComp_MIDI_Host_NextMIDIStreamingInterface(void* CurrentDescripto
 | 
			
		|||
	return DESCRIPTOR_SEARCH_NotFound;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -148,8 +148,8 @@
 | 
			
		|||
 | 
			
		||||
		/* Function Prototypes: */
 | 
			
		||||
			#if defined(INCLUDE_FROM_MIDI_CLASS_HOST_C)
 | 
			
		||||
				static uint8_t DComp_MIDI_Host_NextMIDIStreamingInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
			#endif	
 | 
			
		||||
	#endif
 | 
			
		||||
				
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, u
 | 
			
		|||
	return MS_ENUMERROR_NoError;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_NextMSInterface(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_NextMSInterface(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -104,7 +104,7 @@ static uint8_t DComp_NextMSInterface(void* CurrentDescriptor)
 | 
			
		|||
	return DESCRIPTOR_SEARCH_NotFound;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint8_t DComp_NextMSInterfaceEndpoint(void* CurrentDescriptor)
 | 
			
		||||
static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -325,17 +325,17 @@
 | 
			
		|||
			
 | 
			
		||||
		/* Function Prototypes: */
 | 
			
		||||
			#if defined(INCLUDE_FROM_MS_CLASS_HOST_C)		
 | 
			
		||||
				static uint8_t DComp_NextMSInterface(void* CurrentDescriptor);
 | 
			
		||||
				static uint8_t DComp_NextMSInterfaceEndpoint(void* CurrentDescriptor);
 | 
			
		||||
				static uint8_t DComp_NextMSInterface(void* const CurrentDescriptor);
 | 
			
		||||
				static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor);
 | 
			
		||||
				
 | 
			
		||||
				static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* MSInterfaceInfo,
 | 
			
		||||
				                                   MS_CommandBlockWrapper_t* SCSICommandBlock,
 | 
			
		||||
				static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
 | 
			
		||||
				                                   MS_CommandBlockWrapper_t* const SCSICommandBlock,
 | 
			
		||||
				                                   void* BufferPtr);
 | 
			
		||||
				static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* MSInterfaceInfo);
 | 
			
		||||
				static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* MSInterfaceInfo, 
 | 
			
		||||
                                                       MS_CommandBlockWrapper_t* SCSICommandBlock, void* BufferPtr);
 | 
			
		||||
				static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* MSInterfaceInfo,
 | 
			
		||||
				                                         MS_CommandStatusWrapper_t* SCSICommandStatus);
 | 
			
		||||
				static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo);
 | 
			
		||||
				static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, 
 | 
			
		||||
                                                       MS_CommandBlockWrapper_t* const SCSICommandBlock, void* BufferPtr);
 | 
			
		||||
				static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
 | 
			
		||||
				                                         MS_CommandStatusWrapper_t* const SCSICommandStatus);
 | 
			
		||||
			#endif
 | 
			
		||||
	#endif
 | 
			
		||||
	
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -101,7 +101,7 @@ uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, u
 | 
			
		|||
	return SI_ENUMERROR_NoError;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint8_t DComp_SI_Host_NextSIInterface(void* CurrentDescriptor)
 | 
			
		||||
uint8_t DComp_SI_Host_NextSIInterface(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -119,7 +119,7 @@ uint8_t DComp_SI_Host_NextSIInterface(void* CurrentDescriptor)
 | 
			
		|||
	return DESCRIPTOR_SEARCH_NotFound;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* CurrentDescriptor)
 | 
			
		||||
uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor)
 | 
			
		||||
{
 | 
			
		||||
	if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -228,13 +228,13 @@
 | 
			
		|||
		
 | 
			
		||||
		/* Function Prototypes: */
 | 
			
		||||
			#if defined(INCLUDE_FROM_SI_CLASS_HOST_C)
 | 
			
		||||
				static uint8_t DComp_SI_Host_NextSIInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_SI_Host_NextSIInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
				static uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
 | 
			
		||||
 | 
			
		||||
				static uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* SIInterfaceInfo,
 | 
			
		||||
				                                           SI_PIMA_Container_t* PIMAHeader);
 | 
			
		||||
				static uint8_t SImage_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* SIInterfaceInfo,
 | 
			
		||||
				                                              SI_PIMA_Container_t* PIMAHeader);
 | 
			
		||||
				static uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
 | 
			
		||||
				                                           SI_PIMA_Container_t* const PIMAHeader);
 | 
			
		||||
				static uint8_t SImage_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
 | 
			
		||||
				                                              SI_PIMA_Container_t* const PIMAHeader);
 | 
			
		||||
			#endif
 | 
			
		||||
	#endif
 | 
			
		||||
	
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue