1
0
Fork 0
forked from forks/qmk_firmware

Bug fix & added default_layer_state_set_kb

This commit is contained in:
Priyadi Iman Nurcahyo 2017-02-15 05:19:31 +07:00
parent 5e31074633
commit 3c8c3ebe3f
2 changed files with 11 additions and 2 deletions

View file

@ -16,8 +16,14 @@
*/
uint32_t default_layer_state = 0;
__attribute__((weak))
uint32_t default_layer_state_set_kb(uint32_t state) {
return state;
}
static void default_layer_state_set(uint32_t state)
{
state = default_layer_state_set_kb(state);
debug("default_layer_state: ");
default_layer_debug(); debug(" to ");
default_layer_state = state;

View file

@ -27,7 +27,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
extern uint32_t default_layer_state;
void default_layer_debug(void);
void default_layer_set(uint32_t state);
uint32_t default_layer_set(uint32_t state);
__attribute__((weak))
void default_layer_state_set_kb(uint32_t state);
#ifndef NO_ACTION_LAYER
/* bitwise operation */
@ -70,7 +73,7 @@ void layer_xor(uint32_t state);
#define layer_debug()
__attribute__((weak))
void layer_state_set_kb(uint32_t oldstate, uint32_t newstate);
uint32_t layer_state_set_kb(uint32_t state);
#endif
/* pressed actions cache */