diff options
| author | Joel Challis <git@zvecr.com> | 2021-03-10 22:48:18 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-10 22:48:18 +0000 |
| commit | 790f94533c936409e6be56e8b638969b42350180 (patch) | |
| tree | 9da39389c6565e8755a9075be6c4fee95e6028af /keyboards/hid_liber | |
| parent | 9089244db77d724f23ddfc01be370f9c029c8e6c (diff) | |
| download | qmk_firmware-790f94533c936409e6be56e8b638969b42350180.tar.gz qmk_firmware-790f94533c936409e6be56e8b638969b42350180.zip | |
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
Diffstat (limited to 'keyboards/hid_liber')
| -rwxr-xr-x | keyboards/hid_liber/config.h | 4 | ||||
| -rwxr-xr-x | keyboards/hid_liber/hid_liber.c | 21 |
2 files changed, 4 insertions, 21 deletions
diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index f35799b1a..e0f92dee8 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h | |||
| @@ -34,6 +34,10 @@ | |||
| 34 | // HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3. | 34 | // HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3. |
| 35 | //#define DIODE_DIRECTION | 35 | //#define DIODE_DIRECTION |
| 36 | 36 | ||
| 37 | #define LED_CAPS_LOCK_PIN B5 | ||
| 38 | #define LED_SCROLL_LOCK_PIN B6 | ||
| 39 | #define LED_PIN_ON_STATE 0 | ||
| 40 | |||
| 37 | // #define BACKLIGHT_PIN B7 | 41 | // #define BACKLIGHT_PIN B7 |
| 38 | // #define BACKLIGHT_BREATHING | 42 | // #define BACKLIGHT_BREATHING |
| 39 | // #define BACKLIGHT_LEVELS 3 | 43 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c index 2d2130743..2e4ddb329 100755 --- a/keyboards/hid_liber/hid_liber.c +++ b/keyboards/hid_liber/hid_liber.c | |||
| @@ -16,24 +16,3 @@ | |||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ | 17 | */ |
| 18 | #include "hid_liber.h" | 18 | #include "hid_liber.h" |
| 19 | |||
| 20 | void matrix_init_kb(void) { | ||
| 21 | // put your keyboard start-up code here | ||
| 22 | // runs once when the firmware starts up | ||
| 23 | led_init_ports(); | ||
| 24 | matrix_init_user(); | ||
| 25 | } | ||
| 26 | |||
| 27 | void led_init_ports(void) { | ||
| 28 | setPinOutput(B5); | ||
| 29 | setPinOutput(B6); | ||
| 30 | } | ||
| 31 | |||
| 32 | bool led_update_kb(led_t led_state) { | ||
| 33 | bool res = led_update_user(led_state); | ||
| 34 | if(res) { | ||
| 35 | writePin(B5, !led_state.caps_lock); | ||
| 36 | writePin(B6, !led_state.scroll_lock); | ||
| 37 | } | ||
| 38 | return res; | ||
| 39 | } | ||
