mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 02:30:07 +00:00
Fix LAYER_STATE_8BIT compile issues (#7304)
This commit is contained in:
parent
2075370633
commit
c1970e284d
3 changed files with 3 additions and 3 deletions
|
@ -268,7 +268,7 @@ uint8_t layer_switch_get_layer(keypos_t key) {
|
||||||
/* fall back to layer 0 */
|
/* fall back to layer 0 */
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return biton32(default_layer_state);
|
return get_highest_layer(default_layer_state);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#if defined(LAYER_STATE_8BIT)
|
#if defined(LAYER_STATE_8BIT)
|
||||||
typedef uint8_t layer_state_t;
|
typedef uint8_t layer_state_t;
|
||||||
# define get_highest_layer(state) biton8(state)
|
# define get_highest_layer(state) biton(state)
|
||||||
#elif defined(LAYER_STATE_16BIT)
|
#elif defined(LAYER_STATE_16BIT)
|
||||||
typedef uint16_t layer_state_t;
|
typedef uint16_t layer_state_t;
|
||||||
# define get_highest_layer(state) biton16(state)
|
# define get_highest_layer(state) biton16(state)
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
#ifdef STM32_EEPROM_ENABLE
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
# include "hal.h"
|
# include "hal.h"
|
||||||
# include "eeprom_stm32.h"
|
# include "eeprom_stm32.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern uint32_t default_layer_state;
|
|
||||||
/** \brief eeconfig enable
|
/** \brief eeconfig enable
|
||||||
*
|
*
|
||||||
* FIXME: needs doc
|
* FIXME: needs doc
|
||||||
|
|
Loading…
Reference in a new issue