summaryrefslogtreecommitdiff
path: root/tmk_core/common/bootmagic.c
diff options
context:
space:
mode:
authorAlex Ong <the.onga@gmail.com>2019-05-18 06:47:50 +1000
committerDrashna Jaelre <drashna@live.com>2019-05-17 13:47:50 -0700
commit00d1d7828c63538122d9d3db7336b9a40c9ffe80 (patch)
treee1d055c72f23bbdc6e30ee7e3eb1213857e2ae33 /tmk_core/common/bootmagic.c
parent90a45aac6e8fdbf8d781d711bb6a27574130ff38 (diff)
downloadqmk_firmware-00d1d7828c63538122d9d3db7336b9a40c9ffe80.tar.gz
qmk_firmware-00d1d7828c63538122d9d3db7336b9a40c9ffe80.zip
Typedef'ed layer_state_t to uint32_t (#3637)
* Typedef'ed layer_state_t to uint32_t. This enables future work with layer_state_t to uint8_t for optimization purposes. * Removed accidental xeal60 commit * Revert to egyptian brackets, added sizeof(layer_state_t) so when layer_state_t is redefined it will automagically work. * Add additional typedefs * Add checks for setting layer state * Update tmk_core/common/action_layer.h Co-Authored-By: alex-ong <the.onga@gmail.com> * Revert commit.
Diffstat (limited to 'tmk_core/common/bootmagic.c')
-rw-r--r--tmk_core/common/bootmagic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c
index 9f79fb8eed..cc780d17ab 100644
--- a/tmk_core/common/bootmagic.c
+++ b/tmk_core/common/bootmagic.c
@@ -99,10 +99,10 @@ void bootmagic(void)
if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) { default_layer |= (1<<7); }
if (default_layer) {
eeconfig_update_default_layer(default_layer);
- default_layer_set((uint32_t)default_layer);
+ default_layer_set((layer_state_t)default_layer);
} else {
default_layer = eeconfig_read_default_layer();
- default_layer_set((uint32_t)default_layer);
+ default_layer_set((layer_state_t)default_layer);
}
}