Removed all binary constants and replaced with decimal or hexadecimal constants so that unpatched GCC compilers can still build the code without having to be itself patched and recompiled first.
This commit is contained in:
		
							parent
							
								
									7d4cccc22d
								
							
						
					
					
						commit
						557a945ba1
					
				
					 9 changed files with 61 additions and 59 deletions
				
			
		| 
						 | 
				
			
			@ -95,7 +95,7 @@
 | 
			
		|||
			/** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's
 | 
			
		||||
			 *  numerical address in the device.
 | 
			
		||||
			 */
 | 
			
		||||
			#define ENDPOINT_EPNUM_MASK                   0b111
 | 
			
		||||
			#define ENDPOINT_EPNUM_MASK                   0x03
 | 
			
		||||
 | 
			
		||||
			/** Endpoint bank size mask, for masking against endpoint addresses to retrieve the endpoint's
 | 
			
		||||
			 *  bank size in the device.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -221,7 +221,7 @@
 | 
			
		|||
			#define USB_Host_VBUS_Auto_Off()        MACROS{ OTGCON |=  (1 << VBUSRQC);        }MACROE
 | 
			
		||||
			#define USB_Host_VBUS_Manual_Off()      MACROS{ PORTE  &= ~(1 << 7);              }MACROE
 | 
			
		||||
 | 
			
		||||
			#define USB_Host_SetDeviceAddress(addr) MACROS{ UHADDR  =  (addr & 0b01111111);   }MACROE
 | 
			
		||||
			#define USB_Host_SetDeviceAddress(addr) MACROS{ UHADDR  =  (addr & 0x7F);         }MACROE
 | 
			
		||||
 | 
			
		||||
		/* Enums: */
 | 
			
		||||
			enum USB_Host_WaitMSErrorCodes_t
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,32 +160,25 @@
 | 
			
		|||
			 *
 | 
			
		||||
			 *  \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
 | 
			
		||||
			 */
 | 
			
		||||
			#define EP_TYPE_CONTROL                    0b00
 | 
			
		||||
			#define EP_TYPE_CONTROL                    0x00
 | 
			
		||||
 | 
			
		||||
			/** Mask for an ISOCHRONOUS type endpoint or pipe.
 | 
			
		||||
			 *
 | 
			
		||||
			 *  \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
 | 
			
		||||
			 */
 | 
			
		||||
			#define EP_TYPE_ISOCHRONOUS                0b01
 | 
			
		||||
			#define EP_TYPE_ISOCHRONOUS                0x01
 | 
			
		||||
 | 
			
		||||
			/** Mask for a BULK type endpoint or pipe.
 | 
			
		||||
			 *
 | 
			
		||||
			 *  \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
 | 
			
		||||
			 */
 | 
			
		||||
			#define EP_TYPE_BULK                       0b10
 | 
			
		||||
			#define EP_TYPE_BULK                       0x02
 | 
			
		||||
 | 
			
		||||
			/** Mask for an INTERRUPT type endpoint or pipe.
 | 
			
		||||
			 *
 | 
			
		||||
			 *  \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
 | 
			
		||||
			 */
 | 
			
		||||
			#define EP_TYPE_INTERRUPT                  0b11
 | 
			
		||||
 | 
			
		||||
			/** Mask for determining the type of an endpoint or pipe. This should then be compared with the
 | 
			
		||||
			 *  EP_TYPE_* macros elsewhere in this module to determine the exact type of the endpoint or pipe.
 | 
			
		||||
			 *
 | 
			
		||||
			 *  \note See Endpoint.h and Pipe.h headers for endpoint/pipe functions.
 | 
			
		||||
			 */
 | 
			
		||||
			#define EP_TYPE_MASK                       0b11
 | 
			
		||||
			#define EP_TYPE_INTERRUPT                  0x03
 | 
			
		||||
 | 
			
		||||
			#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER) || defined(__DOXYGEN__)
 | 
			
		||||
				/** Returns boolean true if the VBUS line is currently high (i.e. the USB host is supplying power),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,17 +74,17 @@
 | 
			
		|||
			/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes),
 | 
			
		||||
			 *  which will trigger a control request on the attached device when data is written to the pipe.
 | 
			
		||||
			 */
 | 
			
		||||
			#define PIPE_TOKEN_SETUP                (0b00 << PTOKEN0)
 | 
			
		||||
			#define PIPE_TOKEN_SETUP                (0 << PTOKEN0)
 | 
			
		||||
 | 
			
		||||
			/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
 | 
			
		||||
			 *  indicating that the pipe data will flow from device to host.
 | 
			
		||||
			 */
 | 
			
		||||
			#define PIPE_TOKEN_IN                   (0b01 << PTOKEN0)
 | 
			
		||||
			#define PIPE_TOKEN_IN                   (1 << PTOKEN0)
 | 
			
		||||
 | 
			
		||||
			/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
 | 
			
		||||
			 *  indicating that the pipe data will flow from host to device.
 | 
			
		||||
			 */
 | 
			
		||||
			#define PIPE_TOKEN_OUT                  (0b10 << PTOKEN0)
 | 
			
		||||
			#define PIPE_TOKEN_OUT                  (2 << PTOKEN0)
 | 
			
		||||
 | 
			
		||||
			/** Mask for the bank mode selection for the Pipe_ConfigurePipe() macro. This indicates that the pipe
 | 
			
		||||
			 *  should have one single bank, which requires less USB FIFO memory but results in slower transfers as
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue