Always initialze the Infinity Ergodox backlight
Otherwise it will stay lit. The set_led functionality is also disabled since it doesn't work properly for slaves.
This commit is contained in:
		
							parent
							
								
									3b990c08dc
								
							
						
					
					
						commit
						c86bbf474e
					
				
					 2 changed files with 5 additions and 26 deletions
				
			
		| 
						 | 
				
			
			@ -21,29 +21,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
void led_set(uint8_t usb_led) {
 | 
			
		||||
// The LCD backlight functionality conflicts with this simple
 | 
			
		||||
// red backlight
 | 
			
		||||
#if !defined(LCD_BACKLIGHT_ENABLE) && defined(STATUS_LED_ENABLE)
 | 
			
		||||
    // PTC1: LCD Backlight Red(0:on/1:off)
 | 
			
		||||
    GPIOC->PDDR |= (1<<1);
 | 
			
		||||
    PORTC->PCR[1] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
 | 
			
		||||
    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
 | 
			
		||||
        GPIOC->PCOR |= (1<<1);
 | 
			
		||||
    } else {
 | 
			
		||||
        GPIOC->PSOR |= (1<<1);
 | 
			
		||||
    }
 | 
			
		||||
#elif !defined(LCD_BACKLIGHT_ENABLE)
 | 
			
		||||
    //TODO: Add led emulation if there's no customized visualization
 | 
			
		||||
    (void)usb_led;
 | 
			
		||||
    GPIOC->PDDR |= (1<<1);
 | 
			
		||||
    PORTC->PCR[1] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
 | 
			
		||||
    GPIOC->PSOR |= (1<<1);
 | 
			
		||||
    GPIOC->PDDR |= (1<<2);
 | 
			
		||||
    PORTC->PCR[2] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
 | 
			
		||||
    GPIOC->PSOR |= (1<<2);
 | 
			
		||||
    GPIOC->PDDR |= (1<<3);
 | 
			
		||||
    PORTC->PCR[3] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
 | 
			
		||||
    GPIOC->PSOR |= (1<<3);
 | 
			
		||||
#else
 | 
			
		||||
    (void)usb_led;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue