summaryrefslogtreecommitdiff
path: root/quantum/os_detection.h
diff options
context:
space:
mode:
authorAndre Brait <andrebrait@gmail.com>2024-02-16 15:19:02 +0100
committerGitHub <noreply@github.com>2024-02-17 01:19:02 +1100
commit80f3da36e571fa702b1d3df693fd545801250eca (patch)
tree8fe09c9e53bbe8534372a87bab3d4edfd61e5fa8 /quantum/os_detection.h
parent77e88674986ee14bd1799b1ab19b4c94af083bac (diff)
[Core] Add OS detection callbacks (#21777)
Diffstat (limited to 'quantum/os_detection.h')
-rw-r--r--quantum/os_detection.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/quantum/os_detection.h b/quantum/os_detection.h
index 3496ea0ed2..470f30943a 100644
--- a/quantum/os_detection.h
+++ b/quantum/os_detection.h
@@ -16,9 +16,12 @@
#pragma once
-#include <stdint.h>
-
#ifdef OS_DETECTION_ENABLE
+
+# include <stdint.h>
+# include <stdbool.h>
+# include "usb_device_state.h"
+
typedef enum {
OS_UNSURE,
OS_LINUX,
@@ -30,13 +33,20 @@ typedef enum {
void process_wlength(const uint16_t w_length);
os_variant_t detected_host_os(void);
void erase_wlength_data(void);
+void os_detection_notify_usb_device_state_change(enum usb_device_state usb_device_state);
+
+void os_detection_task(void);
+
+bool process_detected_host_os_kb(os_variant_t os);
+bool process_detected_host_os_user(os_variant_t os);
# if defined(SPLIT_KEYBOARD) && defined(SPLIT_DETECTED_OS_ENABLE)
void slave_update_detected_host_os(os_variant_t os);
-# endif // defined(SPLIT_KEYBOARD) && defined(SPLIT_DETECTED_OS_ENABLE)
-#endif
+# endif
-#ifdef OS_DETECTION_DEBUG_ENABLE
+# ifdef OS_DETECTION_DEBUG_ENABLE
void print_stored_setups(void);
void store_setups_in_eeprom(void);
-#endif
+# endif
+
+#endif // OS_DETECTION_ENABLE