summaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index e60378afe4..14f25597ca 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <ctype.h>
#include "quantum.h"
#include "magic.h"
@@ -237,6 +238,9 @@ bool process_record_quantum(keyrecord_t *record) {
#endif
#ifdef HAPTIC_ENABLE
process_haptic(keycode, record) &&
+#endif // HAPTIC_ENABLE
+#ifdef ORYX_ENABLE
+ process_record_oryx(keycode, record) &&
#endif
#if defined(VIA_ENABLE)
process_record_via(keycode, record) &&
@@ -350,6 +354,7 @@ bool process_record_quantum(keyrecord_t *record) {
}
}
+
return process_action_kb(record);
}
@@ -370,8 +375,17 @@ layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { layer_state_set(update_tri_layer_state(layer_state, layer1, layer2, layer3)); }
void matrix_init_quantum() {
+
magic();
+
+#if defined(ORYX_ENABLE) && defined(DYNAMIC_KEYMAP_ENABLE)
+ matrix_init_oryx();
+#endif
+
+#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN)
+ // TODO: remove calls to led_init_ports from keyboards and remove ifdef
led_init_ports();
+#endif
#ifdef BACKLIGHT_ENABLE
backlight_init_ports();
#endif
@@ -480,3 +494,16 @@ void api_send_unicode(uint32_t unicode) {
__attribute__((weak)) void startup_user() {}
__attribute__((weak)) void shutdown_user() {}
+
+#ifdef WEBUSB_ENABLE
+__attribute__((weak)) bool webusb_receive_user(uint8_t *data, uint8_t length) { return false; }
+__attribute__((weak)) bool webusb_receive_kb(uint8_t *data, uint8_t length) { return webusb_receive_user(data, length); }
+
+bool webusb_receive_quantum(uint8_t *data, uint8_t length) {
+#ifdef ORYX_ENABLE
+ return webusb_receive_oryx(data, length);
+#else
+ return webusb_receive_kb(data, length);
+#endif
+}
+#endif