1
0
Fork 0

[Core] Add OS detection callbacks (#21777)

This commit is contained in:
Andre Brait 2024-02-16 15:19:02 +01:00 committed by GitHub
parent 77e8867498
commit 80f3da36e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 440 additions and 61 deletions

View file

@ -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