#include "matrix.h"
#include "keymap.h"
#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
-#if !defined(RGBLIGHT_ENABLE) && !defined(RGB_MATRIX_ENABLE)
- #include "rgb.h"
+ #ifdef LED_MATRIX_ENABLE
+ #include "ledmatrix.h"
+ #else
+ #include "backlight.h"
+ #endif
#endif
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
#endif
-#ifdef SPLIT_KEYBOARD
- #include "split_flags.h"
-#endif
-
#ifdef RGB_MATRIX_ENABLE
#include "rgb_matrix.h"
#endif
#include "hd44780.h"
#endif
+#ifdef HAPTIC_ENABLE
+ #include "haptic.h"
+#endif
+
//Function substitutions to ease GPIO manipulation
#ifdef __AVR__
#define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset)
}
}
- #define readPin(pin) (PIN_ADDRESS(pin, 0) & _BV(pin & 0xF))
+ #define readPin(pin) ((bool)(PIN_ADDRESS(pin, 0) & _BV(pin & 0xF)))
#elif defined(PROTOCOL_CHIBIOS)
#define pin_t ioline_t
#define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT)
#define ADD_SLASH_X(y) STRINGIZE(\x ## y)
#define SYMBOL_STR(x) ADD_SLASH_X(x)
+#define SS_TAP_CODE 1
+#define SS_DOWN_CODE 2
+#define SS_UP_CODE 3
+
#define SS_TAP(keycode) "\1" SYMBOL_STR(keycode)
#define SS_DOWN(keycode) "\2" SYMBOL_STR(keycode)
#define SS_UP(keycode) "\3" SYMBOL_STR(keycode)
void matrix_scan_kb(void);
void matrix_init_user(void);
void matrix_scan_user(void);
+uint16_t get_record_keycode(keyrecord_t *record);
+uint16_t get_event_keycode(keyevent_t event);
bool process_action_kb(keyrecord_t *record);
bool process_record_kb(uint16_t keycode, keyrecord_t *record);
bool process_record_user(uint16_t keycode, keyrecord_t *record);
void register_code16(uint16_t code);
void unregister_code16(uint16_t code);
-inline void tap_code16(uint16_t code) { register_code16(code); unregister_code16(code); }
+void tap_code16(uint16_t code);
#ifdef BACKLIGHT_ENABLE
void backlight_init_ports(void);