Remove deprecated led_set_kb (#19273)
* Remove led_set_kb maintaining existing led_set_user behaviour * Also call led_set_usermaster
parent
0fcf481cdd
commit
1124bbc1db
@ -1,32 +1,15 @@ |
|||||||
#include "oe.h" |
#include "oe.h" |
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) { |
void led_init_ports(void) { |
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
setPinOutput(B2); |
||||||
DDRB |= (1<<6); |
setPinOutput(B6); |
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { |
} |
||||||
// output low
|
|
||||||
DDRB |= (1<<2); |
bool led_update_kb(led_t led_state) { |
||||||
PORTB &= ~(1<<2); |
bool res = led_update_user(led_state); |
||||||
} else { |
if(res) { |
||||||
// Hi-Z
|
writePin(B2, !led_state.caps_lock); |
||||||
DDRB &= ~(1<<2); |
writePin(B6, led_state == 0); |
||||||
PORTB &= ~(1<<2); |
} |
||||||
} |
return res; |
||||||
// DDRB |= (1<<7);
|
|
||||||
// DDRB |= (1<<1);
|
|
||||||
// DDRB |= (1<<3);
|
|
||||||
// DDRE |= (1<<6);
|
|
||||||
if (usb_led == 0){ |
|
||||||
PORTB |= (1<<6); |
|
||||||
// PORTB |= (1<<7);
|
|
||||||
// PORTB |= (1<<1);
|
|
||||||
// PORTB |= (1<<3);
|
|
||||||
// PORTE |= (1<<6);
|
|
||||||
} |
|
||||||
else{ |
|
||||||
PORTB &= ~(1<<6); |
|
||||||
// PORTB &= ~(1<<7);
|
|
||||||
} |
|
||||||
|
|
||||||
led_set_user(usb_led); |
|
||||||
} |
} |
||||||
|
Loading…
Reference in new issue