Allow joysticks to be used without analog pins (#10169)
* Allow joysticks to be used without analog pins * change how analog/digital joysticks are specified
This commit is contained in:
		
							parent
							
								
									629cfc7f5e
								
							
						
					
					
						commit
						bdd8d2679b
					
				
					 3 changed files with 20 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -536,9 +536,18 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
 | 
			
		|||
    endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
 | 
			
		||||
JOYSTICK_ENABLE ?= no
 | 
			
		||||
ifneq ($(strip $(JOYSTICK_ENABLE)), no)
 | 
			
		||||
    OPT_DEFS += -DJOYSTICK_ENABLE
 | 
			
		||||
    SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
 | 
			
		||||
    SRC += $(QUANTUM_DIR)/joystick.c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(JOYSTICK_ENABLE)), analog)
 | 
			
		||||
    OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
 | 
			
		||||
    SRC += analog.c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
 | 
			
		||||
    OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
 | 
			
		||||
endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue