Refactor to use led config - Part 6 (#12115)
* Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * revert changes
This commit is contained in:
@@ -34,6 +34,10 @@
|
||||
// HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3.
|
||||
//#define DIODE_DIRECTION
|
||||
|
||||
#define LED_CAPS_LOCK_PIN B5
|
||||
#define LED_SCROLL_LOCK_PIN B6
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
@@ -16,24 +16,3 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "hid_liber.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
led_init_ports();
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
setPinOutput(B5);
|
||||
setPinOutput(B6);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
writePin(B5, !led_state.caps_lock);
|
||||
writePin(B6, !led_state.scroll_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user