summaryrefslogtreecommitdiff
path: root/keyboard
diff options
context:
space:
mode:
authoryoyoerx <kevin.wepasnick@gmail.com>2016-03-09 14:04:14 -0500
committeryoyoerx <kevin.wepasnick@gmail.com>2016-03-09 14:04:14 -0500
commitd58b14e880580671a297be81303acbef5e28e0b3 (patch)
tree1bdc01f6b3acf717389049a95193846bdb79a836 /keyboard
parent7d3ebd7b40b96f576fe4608b33f47329c334925b (diff)
Addressed void* return warning & coding style
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/atomic/atomic.c24
-rw-r--r--keyboard/atomic/atomic.h4
-rw-r--r--keyboard/planck/keymaps/lock/keymap.c2
-rw-r--r--keyboard/planck/planck.c24
-rw-r--r--keyboard/planck/planck.h4
5 files changed, 25 insertions, 33 deletions
diff --git a/keyboard/atomic/atomic.c b/keyboard/atomic/atomic.c
index fa66266a4c..30e8122893 100644
--- a/keyboard/atomic/atomic.c
+++ b/keyboard/atomic/atomic.c
@@ -1,16 +1,16 @@
#include "atomic.h"
__attribute__ ((weak))
-void * matrix_init_user(void) {
+void matrix_init_user(void) {
// leave these blank
-};
+}
__attribute__ ((weak))
-void * matrix_scan_user(void) {
+void matrix_scan_user(void) {
// leave these blank
-};
+}
-void * matrix_init_kb(void) {
+void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
@@ -25,16 +25,12 @@ void * matrix_init_kb(void) {
DDRE |= (1<<6);
PORTE |= (1<<6);
- if (matrix_init_user) {
- (*matrix_init_user)();
- }
-};
+ matrix_init_user();
+}
-void * matrix_scan_kb(void) {
+void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
- if (matrix_scan_user) {
- (*matrix_scan_user)();
- }
-}; \ No newline at end of file
+ matrix_scan_user();
+} \ No newline at end of file
diff --git a/keyboard/atomic/atomic.h b/keyboard/atomic/atomic.h
index 95982ecad1..d8574efa93 100644
--- a/keyboard/atomic/atomic.h
+++ b/keyboard/atomic/atomic.h
@@ -24,7 +24,7 @@
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \
}
-void * matrix_init_user(void);
-void * matrix_scan_user(void);
+void matrix_init_user(void);
+void matrix_scan_user(void);
#endif \ No newline at end of file
diff --git a/keyboard/planck/keymaps/lock/keymap.c b/keyboard/planck/keymaps/lock/keymap.c
index 9585764629..f1629492ef 100644
--- a/keyboard/planck/keymaps/lock/keymap.c
+++ b/keyboard/planck/keymaps/lock/keymap.c
@@ -150,7 +150,7 @@ float start_up[][2] = {
{440.0*pow(2.0,(64)/12.0), 1000},
};
-void * matrix_init_user(void) {
+void matrix_init_user(void) {
init_notes();
play_notes(&start_up, 9, false);
} \ No newline at end of file
diff --git a/keyboard/planck/planck.c b/keyboard/planck/planck.c
index 63ca54761c..fe8731ec7b 100644
--- a/keyboard/planck/planck.c
+++ b/keyboard/planck/planck.c
@@ -1,16 +1,16 @@
#include "planck.h"
__attribute__ ((weak))
-void * matrix_init_user(void) {
+void matrix_init_user(void) {
-};
+}
__attribute__ ((weak))
-void * matrix_scan_user(void) {
+void matrix_scan_user(void) {
-};
+}
-void * matrix_init_kb(void) {
+void matrix_init_kb(void) {
#ifdef BACKLIGHT_ENABLE
backlight_init_ports();
#endif
@@ -24,13 +24,9 @@ void * matrix_init_kb(void) {
DDRE |= (1<<6);
PORTE |= (1<<6);
- if (matrix_init_user) {
- (*matrix_init_user)();
- }
-};
+ matrix_init_user();
+}
-void * matrix_scan_kb(void) {
- if (matrix_scan_user) {
- (*matrix_scan_user)();
- }
-};
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
diff --git a/keyboard/planck/planck.h b/keyboard/planck/planck.h
index 00b01b54df..e9566b9228 100644
--- a/keyboard/planck/planck.h
+++ b/keyboard/planck/planck.h
@@ -40,7 +40,7 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-void * matrix_init_user(void);
-void * matrix_scan_user(void);
+void matrix_init_user(void);
+void matrix_scan_user(void);
#endif