mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 20:32:58 +00:00
ef6329af7c
* generate rules.mk from a json mapping * generate rules.mk from a json mapping * support for config.h from json maps * improve the mapping system * document the mapping system * move data/maps to data/mappings * fix flake8 errors * fixup LED_MATRIX_DRIVER * remove product and description from the vision_division keymap level * reduce the complexity of generate-rules-mk * add tests for the generate commands * fix qmk doctor when submodules are not clean
36 lines
1.4 KiB
Python
36 lines
1.4 KiB
Python
"""Information that should be available to the python library.
|
|
"""
|
|
from os import environ
|
|
from pathlib import Path
|
|
|
|
# The root of the qmk_firmware tree.
|
|
QMK_FIRMWARE = Path.cwd()
|
|
|
|
# This is the number of directories under `qmk_firmware/keyboards` that will be traversed. This is currently a limitation of our make system.
|
|
MAX_KEYBOARD_SUBFOLDERS = 5
|
|
|
|
# Supported processor types
|
|
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411'
|
|
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
|
|
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
|
|
|
|
# Common format strings
|
|
DATE_FORMAT = '%Y-%m-%d'
|
|
DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z'
|
|
TIME_FORMAT = '%H:%M:%S'
|
|
|
|
# Used when generating matrix locations
|
|
COL_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijilmnopqrstuvwxyz'
|
|
ROW_LETTERS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop'
|
|
|
|
# Mapping between info.json and config.h keys
|
|
LED_INDICATORS = {
|
|
'caps_lock': 'LED_CAPS_LOCK_PIN',
|
|
'num_lock': 'LED_NUM_LOCK_PIN',
|
|
'scroll_lock': 'LED_SCROLL_LOCK_PIN',
|
|
}
|
|
|
|
# Constants that should match their counterparts in make
|
|
BUILD_DIR = environ.get('BUILD_DIR', '.build')
|
|
KEYBOARD_OUTPUT_PREFIX = f'{BUILD_DIR}/obj_'
|