Convert some AVR GPIO operations to macros (#23424)
This commit is contained in:
		
							parent
							
								
									7220715dd1
								
							
						
					
					
						commit
						61c7c1f74c
					
				
					 71 changed files with 877 additions and 840 deletions
				
			
		| 
						 | 
				
			
			@ -33,22 +33,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
  switch(keycode) {
 | 
			
		||||
    case TO(HDN):
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        PORTC |= (1 << 6); // PC6 goes high
 | 
			
		||||
        gpio_write_pin_high(C6);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return true;
 | 
			
		||||
 | 
			
		||||
    case TO(OSY):
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        PORTC &= ~(1 << 6); // PC6 goes high
 | 
			
		||||
        PORTD |= (1<<4);
 | 
			
		||||
        gpio_write_pin_low(C6);
 | 
			
		||||
        gpio_write_pin_high(D4);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return true;
 | 
			
		||||
 | 
			
		||||
    case TO(DEF):
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        PORTD &= ~(1 << 4); // PC6 goes high
 | 
			
		||||
        gpio_write_pin_low(D4);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue