logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

config.h (1925B)


  1. /*
  2. * Copyright (C) 2021 System76
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. // I2C {
  19. #define F_SCL 100000UL // Run I2C bus at 100 kHz
  20. #define I2C_START_RETRY_COUNT 20
  21. #define I2C_TIMEOUT 100 // milliseconds
  22. // } I2C
  23. // EEPROM {
  24. #define EEPROM_SIZE 1024
  25. // TODO: Refactor with new user EEPROM code (coming soon)
  26. #define EEPROM_MAGIC 0x76EC
  27. #define EEPROM_MAGIC_ADDR 64
  28. // Bump this every time we change what we store
  29. // This will automatically reset the EEPROM with defaults
  30. // and avoid loading invalid data from the EEPROM
  31. #define EEPROM_VERSION 0x02
  32. #define EEPROM_VERSION_ADDR (EEPROM_MAGIC_ADDR + 2)
  33. // } EEPROM
  34. // Dynamic keymap {
  35. #define DYNAMIC_KEYMAP_LAYER_COUNT 4
  36. #define DYNAMIC_KEYMAP_MACRO_COUNT 0
  37. // Dynamic keymap starts after EEPROM version
  38. #define DYNAMIC_KEYMAP_EEPROM_ADDR (EEPROM_VERSION_ADDR + 1)
  39. // Dynamic macro starts after dynamic keymaps, it is disabled
  40. #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2))
  41. #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 0
  42. // } Dynamic keymap
  43. // System76 EC {
  44. #define SYSTEM76_EC_EEPROM_ADDR (DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE)
  45. #define SYSTEM76_EC_EEPROM_SIZE (EEPROM_SIZE - SYSTEM76_EC_EEPROM_ADDR)
  46. // } System76 EC