forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deprecated led_set_kb (qmk#19273)
* Remove led_set_kb maintaining existing led_set_user behaviour * Also call led_set_user
- Loading branch information
Showing
14 changed files
with
68 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,15 @@ | ||
#include "oe.h" | ||
|
||
void led_set_kb(uint8_t usb_led) { | ||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
DDRB |= (1<<6); | ||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
// output low | ||
DDRB |= (1<<2); | ||
PORTB &= ~(1<<2); | ||
} else { | ||
// Hi-Z | ||
DDRB &= ~(1<<2); | ||
PORTB &= ~(1<<2); | ||
} | ||
// 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); | ||
void led_init_ports(void) { | ||
setPinOutput(B2); | ||
setPinOutput(B6); | ||
} | ||
|
||
bool led_update_kb(led_t led_state) { | ||
bool res = led_update_user(led_state); | ||
if(res) { | ||
writePin(B2, !led_state.caps_lock); | ||
writePin(B6, led_state == 0); | ||
} | ||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters