mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 13:22:31 +01:00 
			
		
		
		
	All USB Class Driver configuration struct values are now non-const, to allow for run-time modifications if required before configuring an instance.
This commit is contained in:
		
							parent
							
								
									bbe7c77b91
								
							
						
					
					
						commit
						50ff97f378
					
				| @ -39,6 +39,7 @@ | |||||||
|   *   - USB_CONFIG_ATTR_BUSPOWERED constant renamed to USB_CONFIG_ATTR_RESERVED, as this was misnamed (thanks to NXP Semiconductors) |   *   - USB_CONFIG_ATTR_BUSPOWERED constant renamed to USB_CONFIG_ATTR_RESERVED, as this was misnamed (thanks to NXP Semiconductors) | ||||||
|   *   - Reordered board name definition indexes so that a mispelled BOARD compile option will default to BOARD_USER rather than BOARD_USBKEY |   *   - Reordered board name definition indexes so that a mispelled BOARD compile option will default to BOARD_USER rather than BOARD_USBKEY | ||||||
|   *   - Altered the HID class driver to only try to construct at maximum one packet per USB frame, to reduce CPU usage |   *   - Altered the HID class driver to only try to construct at maximum one packet per USB frame, to reduce CPU usage | ||||||
|  |   *   - All USB Class Driver configuration struct values are now non-const, to allow for run-time modifications if required before configuring an instance | ||||||
|   *  - Library Applications: |   *  - Library Applications: | ||||||
|   *   - Altered the Mass Storage Host LowLevel demo so that SCSI data STALLs from the attached device can be recovered from automatically without |   *   - Altered the Mass Storage Host LowLevel demo so that SCSI data STALLs from the attached device can be recovered from automatically without | ||||||
|   *     having to reset the Mass Storage interface |   *     having to reset the Mass Storage interface | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this
 | 					uint8_t  StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this
 | ||||||
| 														*   structure controls. | 														*   structure controls. | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */ | 					uint8_t  ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  InterfaceNumber; /**< Interface number of the HID interface within the device. */ | 					uint8_t  InterfaceNumber; /**< Interface number of the HID interface within the device. */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls. */ | 					uint8_t  StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls. */ | ||||||
| 
 | 
 | ||||||
| @ -94,7 +94,7 @@ | |||||||
| 
 | 
 | ||||||
| 				struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					// No state information for this class
 | 					uint8_t RESERVED; // No state information for this class
 | ||||||
| 				} State; /**< State data for the USB class interface within the device. All elements in this section
 | 				} State; /**< State data for the USB class interface within the device. All elements in this section
 | ||||||
| 				          *   are reset to their defaults when the interface is enumerated. | 				          *   are reset to their defaults when the interface is enumerated. | ||||||
| 				          */ | 				          */ | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  InterfaceNumber; /**< Interface number of the Mass Storage interface within the device. */ | 					uint8_t  InterfaceNumber; /**< Interface number of the Mass Storage interface within the device. */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  ControlInterfaceNumber; /**< Interface number of the RNDIS control interface within the device. */ | 					uint8_t  ControlInterfaceNumber; /**< Interface number of the RNDIS control interface within the device. */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -41,6 +41,8 @@ bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfa | |||||||
|                                       const USB_Descriptor_Device_t* const DeviceDescriptor, |                                       const USB_Descriptor_Device_t* const DeviceDescriptor, | ||||||
|                                       bool* const NeedModeSwitch) |                                       bool* const NeedModeSwitch) | ||||||
| { | { | ||||||
|  | 	(void)AOAInterfaceInfo; | ||||||
|  | 
 | ||||||
| 	if (DeviceDescriptor->Header.Type != DTYPE_Device) | 	if (DeviceDescriptor->Header.Type != DTYPE_Device) | ||||||
| 	  return false; | 	  return false; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -83,7 +83,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the AOA interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the AOA interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the AOA interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the AOA interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the Audio interface's IN data pipe. If this interface should not
 | 					uint8_t  DataINPipeNumber; /**< Pipe number of the Audio interface's IN data pipe. If this interface should not
 | ||||||
| 					                            *   bind to an IN endpoint, this may be set to 0 to disable audio input streaming for | 					                            *   bind to an IN endpoint, this may be set to 0 to disable audio input streaming for | ||||||
|  | |||||||
| @ -79,7 +79,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the CDC interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the CDC interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the HID interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the HID interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the MIDI interface's streaming IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the MIDI interface's streaming IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the MIDI interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the MIDI interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the Mass Storage interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the Mass Storage interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the Mass Storage interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the Mass Storage interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -77,7 +77,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the Printer interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the Printer interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the Printer interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the Printer interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -78,7 +78,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the RNDIS interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the RNDIS interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the RNDIS interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the RNDIS interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ | |||||||
| 			 */ | 			 */ | ||||||
| 			typedef struct | 			typedef struct | ||||||
| 			{ | 			{ | ||||||
| 				const struct | 				struct | ||||||
| 				{ | 				{ | ||||||
| 					uint8_t  DataINPipeNumber; /**< Pipe number of the Still Image interface's IN data pipe. */ | 					uint8_t  DataINPipeNumber; /**< Pipe number of the Still Image interface's IN data pipe. */ | ||||||
| 					bool     DataINPipeDoubleBank; /**< Indicates if the Still Image interface's IN data pipe should use double banking. */ | 					bool     DataINPipeDoubleBank; /**< Indicates if the Still Image interface's IN data pipe should use double banking. */ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dean Camera
						Dean Camera