You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

  1. """Information that should be available to the python library.
  2. """
  3. from os import environ
  4. from pathlib import Path
  5. # The root of the qmk_firmware tree.
  6. QMK_FIRMWARE = Path.cwd()
  7. # This is the number of directories under `qmk_firmware/keyboards` that will be traversed. This is currently a limitation of our make system.
  8. MAX_KEYBOARD_SUBFOLDERS = 5
  9. # Supported processor types
  10. CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32G431', 'STM32G474'
  11. LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
  12. VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
  13. # Common format strings
  14. DATE_FORMAT = '%Y-%m-%d'
  15. DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z'
  16. TIME_FORMAT = '%H:%M:%S'
  17. # Used when generating matrix locations
  18. COL_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijilmnopqrstuvwxyz'
  19. ROW_LETTERS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop'
  20. # Mapping between info.json and config.h keys
  21. LED_INDICATORS = {
  22. 'caps_lock': 'LED_CAPS_LOCK_PIN',
  23. 'num_lock': 'LED_NUM_LOCK_PIN',
  24. 'scroll_lock': 'LED_SCROLL_LOCK_PIN',
  25. }
  26. # Constants that should match their counterparts in make
  27. BUILD_DIR = environ.get('BUILD_DIR', '.build')
  28. KEYBOARD_OUTPUT_PREFIX = f'{BUILD_DIR}/obj_'