add macro error when a required define is missing
This commit is contained in:
		
							parent
							
								
									17acde94ee
								
							
						
					
					
						commit
						d9d67e7b76
					
				@ -79,4 +79,122 @@
 | 
			
		||||
#   endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef PS2_USE_BUSYWAIT
 | 
			
		||||
#   ifndef PS2_CLOCK_PORT
 | 
			
		||||
#       error "PS2_CLOCK_PORT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_PIN
 | 
			
		||||
#       error "PS2_CLOCK_PIN has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_DDR
 | 
			
		||||
#       error "PS2_CLOCK_DDR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_BIT
 | 
			
		||||
#       error "PS2_CLOCK_BIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_PORT
 | 
			
		||||
#       error "PS2_DATA_PORT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_PIN
 | 
			
		||||
#       error "PS2_DATA_PIN has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_DDR
 | 
			
		||||
#       error "PS2_DATA_DDR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_BIT
 | 
			
		||||
#       error "PS2_DATA_BIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef PS2_USE_INT
 | 
			
		||||
#   ifndef PS2_CLOCK_PORT
 | 
			
		||||
#       error "PS2_CLOCK_PORT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_PIN
 | 
			
		||||
#       error "PS2_CLOCK_PIN has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_DDR
 | 
			
		||||
#       error "PS2_CLOCK_DDR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_BIT
 | 
			
		||||
#       error "PS2_CLOCK_BIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_PORT
 | 
			
		||||
#       error "PS2_DATA_PORT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_PIN
 | 
			
		||||
#       error "PS2_DATA_PIN has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_DDR
 | 
			
		||||
#       error "PS2_DATA_DDR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_BIT
 | 
			
		||||
#       error "PS2_DATA_BIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_INT_INIT
 | 
			
		||||
#       error "PS2_INT_INIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_INT_ON
 | 
			
		||||
#       error "PS2_INT_ON has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_INT_OFF
 | 
			
		||||
#       error "PS2_INT_OFF has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_INT_VECT
 | 
			
		||||
#       error "PS2_INT_VECT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef PS2_USE_USART
 | 
			
		||||
#   ifndef PS2_CLOCK_PORT
 | 
			
		||||
#       error "PS2_CLOCK_PORT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_PIN
 | 
			
		||||
#       error "PS2_CLOCK_PIN has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_DDR
 | 
			
		||||
#       error "PS2_CLOCK_DDR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_CLOCK_BIT
 | 
			
		||||
#       error "PS2_CLOCK_BIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_PORT
 | 
			
		||||
#       error "PS2_DATA_PORT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_PIN
 | 
			
		||||
#       error "PS2_DATA_PIN has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_DDR
 | 
			
		||||
#       error "PS2_DATA_DDR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_DATA_BIT
 | 
			
		||||
#       error "PS2_DATA_BIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_INIT
 | 
			
		||||
#       error "PS2_USART_INIT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_RX_INT_ON
 | 
			
		||||
#       error "PS2_USART_RX_INT_ON has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_RX_POLL_ON
 | 
			
		||||
#       error "PS2_USART_RX_POLL_ON has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_OFF
 | 
			
		||||
#       error "PS2_USART_OFF has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_RX_READY
 | 
			
		||||
#       error "PS2_USART_RX_READY has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_RX_DATA
 | 
			
		||||
#       error "PS2_USART_RX_DATA has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_ERROR
 | 
			
		||||
#       error "PS2_USART_ERROR has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#   ifndef PS2_USART_RX_VECT
 | 
			
		||||
#       error "PS2_USART_RX_VECT has to be defined"
 | 
			
		||||
#   endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user