os_detection.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Copyright 2022 Ruslan Sayfutdinov (@KapJI)
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include <stdint.h>
  18. #ifdef OS_DETECTION_ENABLE
  19. typedef enum {
  20. OS_UNSURE,
  21. OS_LINUX,
  22. OS_WINDOWS,
  23. OS_MACOS,
  24. OS_IOS,
  25. } os_variant_t;
  26. void process_wlength(const uint16_t w_length);
  27. os_variant_t detected_host_os(void);
  28. void erase_wlength_data(void);
  29. # if defined(SPLIT_KEYBOARD) && defined(SPLIT_DETECTED_OS_ENABLE)
  30. void slave_update_detected_host_os(os_variant_t os);
  31. # endif // defined(SPLIT_KEYBOARD) && defined(SPLIT_DETECTED_OS_ENABLE)
  32. #endif
  33. #ifdef OS_DETECTION_DEBUG_ENABLE
  34. void print_stored_setups(void);
  35. void store_setups_in_eeprom(void);
  36. #endif