[Core] Split ChibiOS usart split driver in protocol and hardware driver part (#16669)
This commit is contained in:
		
							parent
							
								
									6d67e9df4b
								
							
						
					
					
						commit
						fe680a8568
					
				
					 8 changed files with 292 additions and 227 deletions
				
			
		| 
						 | 
				
			
			@ -583,6 +583,14 @@ ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
 | 
			
		|||
    QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
VALID_SERIAL_DRIVER_TYPES := bitbang usart
 | 
			
		||||
 | 
			
		||||
SERIAL_DRIVER ?= bitbang
 | 
			
		||||
ifeq ($(filter $(SERIAL_DRIVER),$(VALID_SERIAL_DRIVER_TYPES)),)
 | 
			
		||||
    $(call CATASTROPHIC_ERROR,Invalid SERIAL_DRIVER,SERIAL_DRIVER="$(SERIAL_DRIVER)" is not a valid SERIAL driver)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
 | 
			
		||||
    POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
 | 
			
		||||
    OPT_DEFS += -DSPLIT_KEYBOARD
 | 
			
		||||
| 
						 | 
				
			
			@ -607,11 +615,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
 | 
			
		|||
            endif
 | 
			
		||||
        endif
 | 
			
		||||
 | 
			
		||||
        SERIAL_DRIVER ?= bitbang
 | 
			
		||||
        OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
 | 
			
		||||
        ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
 | 
			
		||||
            QUANTUM_LIB_SRC += serial.c
 | 
			
		||||
        else
 | 
			
		||||
            QUANTUM_LIB_SRC += serial_protocol.c
 | 
			
		||||
            QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
 | 
			
		||||
        endif
 | 
			
		||||
    endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue