2020-02-17 20:42:11 +01:00
|
|
|
"""Information that should be available to the python library.
|
|
|
|
"""
|
2021-01-17 00:13:04 +01:00
|
|
|
from os import environ
|
2020-02-17 20:42:11 +01:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
# The root of the qmk_firmware tree.
|
|
|
|
QMK_FIRMWARE = Path.cwd()
|
|
|
|
|
2021-07-10 17:04:50 +02:00
|
|
|
# Upstream repo url
|
|
|
|
QMK_FIRMWARE_UPSTREAM = 'qmk/qmk_firmware'
|
|
|
|
|
2020-02-17 20:42:11 +01:00
|
|
|
# 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
|
2020-05-26 22:05:41 +02:00
|
|
|
|
|
|
|
# Supported processor types
|
2021-10-18 07:23:20 +02:00
|
|
|
CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66FX1M0', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F407', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L433', 'STM32L443', 'GD32VF103'
|
2021-01-30 04:53:56 +01:00
|
|
|
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
|
2020-10-09 02:43:07 +02:00
|
|
|
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
|
2020-10-25 22:48:44 +01:00
|
|
|
|
|
|
|
# Common format strings
|
|
|
|
DATE_FORMAT = '%Y-%m-%d'
|
|
|
|
DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z'
|
|
|
|
TIME_FORMAT = '%H:%M:%S'
|
2020-12-30 19:27:37 +01:00
|
|
|
|
|
|
|
# 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',
|
2021-01-31 21:46:00 +01:00
|
|
|
'scroll_lock': 'LED_SCROLL_LOCK_PIN',
|
2020-12-30 19:27:37 +01:00
|
|
|
}
|
2021-01-17 00:21:06 +01:00
|
|
|
|
2021-01-17 00:13:04 +01:00
|
|
|
# Constants that should match their counterparts in make
|
|
|
|
BUILD_DIR = environ.get('BUILD_DIR', '.build')
|
|
|
|
KEYBOARD_OUTPUT_PREFIX = f'{BUILD_DIR}/obj_'
|