aboutsummaryrefslogtreecommitdiff
path: root/keyboards/bfake/bfake.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/bfake/bfake.c')
-rw-r--r--keyboards/bfake/bfake.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c
index 9039fe546..eb328ba83 100644
--- a/keyboards/bfake/bfake.c
+++ b/keyboards/bfake/bfake.c
@@ -17,30 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18#include "bfake.h" 18#include "bfake.h"
19 19
20void backlight_init_ports(void) { 20void keyboard_pre_init_kb(void) {
21 setPinOutput(D0); 21 led_init_ports();
22 setPinOutput(D1); 22 keyboard_pre_init_user();
23 setPinOutput(D4); 23}
24 setPinOutput(D6);
25 24
26 writePinLow(D0); 25void led_init_ports(void) {
27 writePinLow(D1); 26 setPinOutput(D1);
28 writePinLow(D4); 27 writePinHigh(D1);
29 writePinLow(D6);
30} 28}
31 29
32void backlight_set(uint8_t level) { 30bool led_update_kb(led_t led_state) {
33 if (level == 0) { 31 if (led_update_user(led_state)) {
34 // Turn out the lights 32 writePin(D1, !led_state.caps_lock);
35 writePinLow(D0); 33 }
36 writePinLow(D1); 34 return true;
37 writePinLow(D4);
38 writePinLow(D6);
39 } else {
40 // Turn on the lights
41 writePinHigh(D0);
42 writePinHigh(D1);
43 writePinHigh(D4);
44 writePinHigh(D6);
45 }
46} 35}