summaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/madhatter
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-05-24 23:23:20 -0700
committerGitHub <noreply@github.com>2021-05-24 23:23:20 -0700
commit57158cc3bcd169bc76785099fe2ded359d94eaa2 (patch)
tree8b29410902050e40f99f225e5282c0ee31bfd4e5 /keyboards/crkbd/keymaps/madhatter
parent8e22da67c1ddafa45b2e4d0ec4449dc79b509b89 (diff)
downloadqmk_firmware-57158cc3bcd169bc76785099fe2ded359d94eaa2.tar.gz
qmk_firmware-57158cc3bcd169bc76785099fe2ded359d94eaa2.zip
[Keyboard] Corne - Remove legacy revision support (#12226)
Diffstat (limited to 'keyboards/crkbd/keymaps/madhatter')
-rw-r--r--keyboards/crkbd/keymaps/madhatter/config.h1
-rw-r--r--keyboards/crkbd/keymaps/madhatter/keymap.c14
-rw-r--r--keyboards/crkbd/keymaps/madhatter/rules.mk3
3 files changed, 12 insertions, 6 deletions
diff --git a/keyboards/crkbd/keymaps/madhatter/config.h b/keyboards/crkbd/keymaps/madhatter/config.h
index 899fde008d..bcf4e05005 100644
--- a/keyboards/crkbd/keymaps/madhatter/config.h
+++ b/keyboards/crkbd/keymaps/madhatter/config.h
@@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define EE_HANDS
#define SSD1306OLED
+#define USE_SSD_I2C
#define USE_SERIAL_PD2
diff --git a/keyboards/crkbd/keymaps/madhatter/keymap.c b/keyboards/crkbd/keymaps/madhatter/keymap.c
index 57a522deb4..c228a7b573 100644
--- a/keyboards/crkbd/keymaps/madhatter/keymap.c
+++ b/keyboards/crkbd/keymaps/madhatter/keymap.c
@@ -17,8 +17,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-
-extern uint8_t is_master;
+#ifdef SSD1306OLED
+# include "ssd1306.h"
+# include <string.h>
+#endif
enum corny_layers {
_QWERTY,
@@ -108,7 +110,7 @@ void matrix_init_user(void) {
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
- iota_gfx_init(!has_usb()); // turns on the display
+ iota_gfx_init(); // turns on the display
#endif
}
@@ -132,10 +134,10 @@ void matrix_scan_user(void) {
}
void matrix_render_user(struct CharacterMatrix *matrix) {
- if (is_master) {
+ if (is_keyboard_master()) {
// If you want to change the display of OLED, you need to change here
- matrix_write_ln(matrix, read_layer_state());
- matrix_write_ln(matrix, read_keylog());
+ matrix_write(matrix, read_layer_state());
+ matrix_write(matrix, read_keylog());
//matrix_write_ln(matrix, read_keylogs());
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
//matrix_write_ln(matrix, read_host_led_state());
diff --git a/keyboards/crkbd/keymaps/madhatter/rules.mk b/keyboards/crkbd/keymaps/madhatter/rules.mk
index f84e5b2af8..489b16ef1c 100644
--- a/keyboards/crkbd/keymaps/madhatter/rules.mk
+++ b/keyboards/crkbd/keymaps/madhatter/rules.mk
@@ -8,3 +8,6 @@ SRC += ./lib/glcdfont.c \
# ./lib/mode_icon_reader.c \
# ./lib/host_led_state_reader.c \
# ./lib/timelogger.c \
+
+VPATH += keyboards/crkbd/lib
+LIB_SRC += ssd1306.c i2c.c