mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-06 16:32:49 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
ece38f95ae
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,7 +25,7 @@ quantum/version.h
|
|||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
cmake-build-debug
|
cmake-build-debug
|
||||||
doxygen/
|
doxygen/
|
||||||
.DS_STORE
|
.DS_Store
|
||||||
/util/wsl_downloaded
|
/util/wsl_downloaded
|
||||||
/util/win_downloaded
|
/util/win_downloaded
|
||||||
/keyboards/*/Makefile
|
/keyboards/*/Makefile
|
||||||
|
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
@ -8,10 +8,12 @@
|
|||||||
"**/*.hex": true
|
"**/*.hex": true
|
||||||
},
|
},
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.h": "c",
|
"*.h": "c",
|
||||||
"*.c": "c",
|
"*.c": "c",
|
||||||
"*.cpp": "cpp",
|
"*.cpp": "cpp",
|
||||||
"*.hpp": "cpp",
|
"*.hpp": "cpp",
|
||||||
"xstddef": "c"
|
"xstddef": "c",
|
||||||
|
"type_traits": "c",
|
||||||
|
"utility": "c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
Makefile
13
Makefile
@ -371,6 +371,9 @@ define PARSE_KEYBOARD
|
|||||||
# The same if all was specified
|
# The same if all was specified
|
||||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||||
|
# List all keymaps for the given keyboard
|
||||||
|
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,list-keymaps),true)
|
||||||
|
$$(eval $$(call LIST_ALL_KEYMAPS))
|
||||||
# Try to match the specified keyamp with the list of known keymaps
|
# Try to match the specified keyamp with the list of known keymaps
|
||||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
||||||
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
||||||
@ -407,6 +410,16 @@ endef
|
|||||||
# endif
|
# endif
|
||||||
# endef
|
# endef
|
||||||
|
|
||||||
|
# Prints a list of all known keymaps for the given keyboard
|
||||||
|
define LIST_ALL_KEYMAPS
|
||||||
|
COMMAND_true_LIST_KEYMAPS := \
|
||||||
|
printf "$$(KEYMAPS)\n";
|
||||||
|
COMMAND_false_LIST_KEYMAPS := \
|
||||||
|
printf "$$(MSG_AVAILABLE_KEYMAPS)\n"; \
|
||||||
|
printf "$$(KEYMAPS)\n";
|
||||||
|
COMMANDS += LIST_KEYMAPS
|
||||||
|
endef
|
||||||
|
|
||||||
# $1 Keymap
|
# $1 Keymap
|
||||||
# This is the meat of compiling a keyboard, when entering this, everything is known
|
# This is the meat of compiling a keyboard, when entering this, everything is known
|
||||||
# keyboard, subproject, and keymap
|
# keyboard, subproject, and keymap
|
||||||
|
92
bin/qmk
92
bin/qmk
@ -4,10 +4,8 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from glob import glob
|
|
||||||
from time import strftime
|
|
||||||
from importlib import import_module
|
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
|
from time import strftime
|
||||||
|
|
||||||
# Add the QMK python libs to our path
|
# Add the QMK python libs to our path
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
@ -15,12 +13,8 @@ qmk_dir = os.path.abspath(os.path.join(script_dir, '..'))
|
|||||||
python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python'))
|
python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python'))
|
||||||
sys.path.append(python_lib_dir)
|
sys.path.append(python_lib_dir)
|
||||||
|
|
||||||
# Change to the root of our checkout
|
|
||||||
os.environ['ORIG_CWD'] = os.getcwd()
|
|
||||||
os.chdir(qmk_dir)
|
|
||||||
|
|
||||||
# Make sure our modules have been setup
|
# Make sure our modules have been setup
|
||||||
with open('requirements.txt', 'r') as fd:
|
with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
|
||||||
for line in fd.readlines():
|
for line in fd.readlines():
|
||||||
line = line.strip().replace('<', '=').replace('>', '=')
|
line = line.strip().replace('<', '=').replace('>', '=')
|
||||||
|
|
||||||
@ -32,72 +26,58 @@ with open('requirements.txt', 'r') as fd:
|
|||||||
|
|
||||||
module = line.split('=')[0] if '=' in line else line
|
module = line.split('=')[0] if '=' in line else line
|
||||||
if not find_spec(module):
|
if not find_spec(module):
|
||||||
print('Your QMK build environment is not fully setup!\n')
|
print('Could not find module %s!', module)
|
||||||
print('Please run `./util/qmk_install.sh` to setup QMK.')
|
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
|
||||||
exit(255)
|
exit(255)
|
||||||
|
|
||||||
# Figure out our version
|
# Figure out our version
|
||||||
|
# TODO(skullydazed/anyone): Find a method that doesn't involve git. This is slow in docker and on windows.
|
||||||
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
||||||
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
os.environ['QMK_VERSION'] = result.stdout.strip()
|
||||||
else:
|
else:
|
||||||
os.environ['QMK_VERSION'] = 'QMK ' + strftime('%Y-%m-%d-%H:%M:%S')
|
os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty'
|
||||||
|
|
||||||
# Setup the CLI
|
# Setup the CLI
|
||||||
import milc
|
import milc
|
||||||
|
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
|
|
||||||
# This means we can't accept arguments to the qmk script itself.
|
|
||||||
script_name = os.path.basename(sys.argv[0])
|
|
||||||
if script_name == 'qmk':
|
|
||||||
if len(sys.argv) == 1:
|
|
||||||
milc.cli.log.error('No subcommand specified!\n')
|
|
||||||
|
|
||||||
if len(sys.argv) == 1 or sys.argv[1] in ['-h', '--help']:
|
@milc.cli.entrypoint('QMK Helper Script')
|
||||||
milc.cli.echo('usage: qmk <subcommand> [...]')
|
def qmk_main(cli):
|
||||||
milc.cli.echo('\nsubcommands:')
|
"""The function that gets run when no subcommand is provided.
|
||||||
subcommands = glob(os.path.join(qmk_dir, 'bin', 'qmk-*'))
|
"""
|
||||||
for subcommand in sorted(subcommands):
|
cli.print_help()
|
||||||
subcommand = os.path.basename(subcommand).split('-', 1)[1]
|
|
||||||
milc.cli.echo('\t%s', subcommand)
|
|
||||||
milc.cli.echo('\nqmk <subcommand> --help for more information')
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
if sys.argv[1] in ['-V', '--version']:
|
|
||||||
milc.cli.echo(os.environ['QMK_VERSION'])
|
|
||||||
exit(0)
|
|
||||||
|
|
||||||
sys.argv[0] = script_name = '-'.join((script_name, sys.argv[1]))
|
def main():
|
||||||
del sys.argv[1]
|
"""Setup our environment and then call the CLI entrypoint.
|
||||||
|
"""
|
||||||
|
# Change to the root of our checkout
|
||||||
|
os.environ['ORIG_CWD'] = os.getcwd()
|
||||||
|
os.chdir(qmk_dir)
|
||||||
|
|
||||||
# Look for which module to import
|
# Import the subcommands
|
||||||
if script_name == 'qmk':
|
import qmk.cli
|
||||||
milc.cli.print_help()
|
|
||||||
exit(0)
|
|
||||||
elif not script_name.startswith('qmk-'):
|
|
||||||
milc.cli.log.error('Invalid symlink, must start with "qmk-": %s', script_name)
|
|
||||||
else:
|
|
||||||
subcommand = script_name.replace('-', '.').replace('_', '.').split('.')
|
|
||||||
subcommand.insert(1, 'cli')
|
|
||||||
subcommand = '.'.join(subcommand)
|
|
||||||
|
|
||||||
try:
|
# Execute
|
||||||
import_module(subcommand)
|
|
||||||
except ModuleNotFoundError as e:
|
|
||||||
if e.__class__.__name__ != subcommand:
|
|
||||||
raise
|
|
||||||
|
|
||||||
milc.cli.log.error('Invalid subcommand! Could not import %s.', subcommand)
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
return_code = milc.cli()
|
return_code = milc.cli()
|
||||||
|
|
||||||
if return_code is False:
|
if return_code is False:
|
||||||
exit(1)
|
exit(1)
|
||||||
elif return_code is not True and isinstance(return_code, int) and return_code < 256:
|
|
||||||
|
elif return_code is not True and isinstance(return_code, int):
|
||||||
|
if return_code < 0 or return_code > 255:
|
||||||
|
milc.cli.log.error('Invalid return_code: %d', return_code)
|
||||||
|
exit(255)
|
||||||
|
|
||||||
exit(return_code)
|
exit(return_code)
|
||||||
else:
|
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
@ -1 +0,0 @@
|
|||||||
qmk
|
|
@ -1 +0,0 @@
|
|||||||
qmk
|
|
@ -1 +0,0 @@
|
|||||||
qmk
|
|
@ -1 +0,0 @@
|
|||||||
qmk
|
|
@ -19,12 +19,14 @@
|
|||||||
#
|
#
|
||||||
# Sets the bootloader defined in the keyboard's/keymap's rules.mk
|
# Sets the bootloader defined in the keyboard's/keymap's rules.mk
|
||||||
# Current options:
|
# Current options:
|
||||||
# atmel-dfu
|
#
|
||||||
# lufa-dfu
|
# halfkay PJRC Teensy
|
||||||
# qmk-dfu
|
# caterina Pro Micro (Sparkfun/generic)
|
||||||
# halfkay
|
# atmel-dfu Atmel factory DFU
|
||||||
# caterina
|
# lufa-dfu LUFA DFU
|
||||||
# bootloadHID
|
# qmk-dfu QMK DFU (LUFA + blinkenlight)
|
||||||
|
# bootloadHID HIDBootFlash compatible (ATmega32A)
|
||||||
|
# USBasp USBaspLoader (ATmega328P)
|
||||||
#
|
#
|
||||||
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
||||||
# you add any possible configuration to this list
|
# you add any possible configuration to this list
|
||||||
@ -32,40 +34,40 @@
|
|||||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
||||||
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifeq ($(strip $(MCU)), atmega32u4)
|
||||||
BOOTLOADER_SIZE = 512
|
BOOTLOADER_SIZE = 512
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 1024
|
BOOTLOADER_SIZE = 1024
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), caterina)
|
ifeq ($(strip $(BOOTLOADER)), caterina)
|
||||||
|
@ -23,5 +23,5 @@ endif
|
|||||||
|
|
||||||
# Generate the keymap.c
|
# Generate the keymap.c
|
||||||
ifneq ("$(KEYMAP_JSON)","")
|
ifneq ("$(KEYMAP_JSON)","")
|
||||||
_ = $(shell test -e $(KEYMAP_C) || bin/qmk-json-keymap $(KEYMAP_JSON) -o $(KEYMAP_C))
|
_ = $(shell test -e $(KEYMAP_C) || bin/qmk json-keymap $(KEYMAP_JSON) -o $(KEYMAP_C))
|
||||||
endif
|
endif
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* [QMK Basics](README.md)
|
* [QMK Basics](README.md)
|
||||||
* [QMK Introduction](getting_started_introduction.md)
|
* [QMK Introduction](getting_started_introduction.md)
|
||||||
* [QMK CLI](cli.md)
|
* [QMK CLI](cli.md)
|
||||||
|
* [QMK CLI Config](cli_configuration.md)
|
||||||
* [Contributing to QMK](contributing.md)
|
* [Contributing to QMK](contributing.md)
|
||||||
* [How to Use Github](getting_started_github.md)
|
* [How to Use Github](getting_started_github.md)
|
||||||
* [Getting Help](getting_started_getting_help.md)
|
* [Getting Help](getting_started_getting_help.md)
|
||||||
@ -48,7 +49,7 @@
|
|||||||
* [Useful Functions](ref_functions.md)
|
* [Useful Functions](ref_functions.md)
|
||||||
* [Configurator Support](reference_configurator_support.md)
|
* [Configurator Support](reference_configurator_support.md)
|
||||||
* [info.json Format](reference_info_json.md)
|
* [info.json Format](reference_info_json.md)
|
||||||
* [Python Development](python_development.md)
|
* [Python CLI Development](cli_development.md)
|
||||||
|
|
||||||
* [Features](features.md)
|
* [Features](features.md)
|
||||||
* [Basic Keycodes](keycodes_basic.md)
|
* [Basic Keycodes](keycodes_basic.md)
|
||||||
|
@ -14,7 +14,7 @@ The next Breaking Change is scheduled for Nov 29.
|
|||||||
|
|
||||||
### Important Dates
|
### Important Dates
|
||||||
|
|
||||||
* [ ] 2019 Oct 04 - `future` is created. It will be rebased weekly.
|
* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly.
|
||||||
* [ ] 2019 Nov 01 - `future` closed to new PR's.
|
* [ ] 2019 Nov 01 - `future` closed to new PR's.
|
||||||
* [ ] 2019 Nov 01 - Call for testers.
|
* [ ] 2019 Nov 01 - Call for testers.
|
||||||
* [ ] 2019 Nov 27 - `master` is locked, no PR's merged.
|
* [ ] 2019 Nov 27 - `master` is locked, no PR's merged.
|
||||||
@ -51,7 +51,9 @@ git rebase master
|
|||||||
git push --force
|
git push --force
|
||||||
```
|
```
|
||||||
|
|
||||||
## 8 Weeks Before Merge
|
## Creating the `future` branch
|
||||||
|
|
||||||
|
This happens immediately after the previous `future` branch is merged.
|
||||||
|
|
||||||
* `qmk_firmware` git commands
|
* `qmk_firmware` git commands
|
||||||
* [ ] `git checkout master`
|
* [ ] `git checkout master`
|
||||||
@ -65,9 +67,6 @@ git push --force
|
|||||||
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
|
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
|
||||||
* [ ] `git push origin future`
|
* [ ] `git push origin future`
|
||||||
* [ ] `git push --tags`
|
* [ ] `git push --tags`
|
||||||
* GitHub Actions
|
|
||||||
* [ ] Switch all [breaking_change PR's](https://github.com/qmk/qmk_firmware/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Abreaking_change) to `future`
|
|
||||||
* [ ] Any that have a ChangeLog entry may be merged immediately.
|
|
||||||
|
|
||||||
## 4 Weeks Before Merge
|
## 4 Weeks Before Merge
|
||||||
|
|
||||||
|
114
docs/cli.md
114
docs/cli.md
@ -4,22 +4,70 @@ This page describes how to setup and use the QMK CLI.
|
|||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:
|
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
|
||||||
|
|
||||||
* `qmk compile`
|
* [Global CLI](#global-cli)
|
||||||
* `qmk doctor`
|
* [Local CLI](#local-cli)
|
||||||
|
* [CLI Commands](#cli-commands)
|
||||||
|
|
||||||
# Setup
|
# Requirements
|
||||||
|
|
||||||
Simply add the `qmk_firmware/bin` directory to your `PATH`. You can run the `qmk` commands from any directory.
|
The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt).
|
||||||
|
|
||||||
|
# Global CLI
|
||||||
|
|
||||||
|
QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically.
|
||||||
|
|
||||||
|
## Install Using Homebrew (macOS, some Linux)
|
||||||
|
|
||||||
|
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
|
||||||
|
|
||||||
```
|
```
|
||||||
export PATH=$PATH:$HOME/qmk_firmware/bin
|
brew tap qmk/qmk
|
||||||
|
brew install qmk
|
||||||
|
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||||
|
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||||
```
|
```
|
||||||
|
|
||||||
You may want to add this to your `.profile`, `.bash_profile`, `.zsh_profile`, or other shell startup scripts.
|
## Install Using easy_install or pip
|
||||||
|
|
||||||
# Commands
|
If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
pip3 install qmk
|
||||||
|
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||||
|
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||||
|
```
|
||||||
|
|
||||||
|
## Packaging For Other Operating Systems
|
||||||
|
|
||||||
|
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
|
||||||
|
|
||||||
|
* Follow best practices for your OS when they conflict with these guidelines
|
||||||
|
* Documment why in a comment when you do deviate
|
||||||
|
* Install using a virtualenv
|
||||||
|
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
|
||||||
|
|
||||||
|
# Local CLI
|
||||||
|
|
||||||
|
If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ~/qmk_firmware/bin/qmk hello
|
||||||
|
Ψ Hello, World!
|
||||||
|
```
|
||||||
|
|
||||||
|
## Local CLI Limitations
|
||||||
|
|
||||||
|
There are some limitations to the local CLI compared to the global CLI:
|
||||||
|
|
||||||
|
* The local CLI does not support `qmk setup` or `qmk clone`
|
||||||
|
* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned.
|
||||||
|
* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict
|
||||||
|
|
||||||
|
# CLI Commands
|
||||||
|
|
||||||
## `qmk compile`
|
## `qmk compile`
|
||||||
|
|
||||||
@ -46,3 +94,53 @@ This command formats C code using clang-format. Run it with no arguments to form
|
|||||||
```
|
```
|
||||||
qmk cformat [file1] [file2] [...] [fileN]
|
qmk cformat [file1] [file2] [...] [fileN]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk config`
|
||||||
|
|
||||||
|
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk doctor`
|
||||||
|
|
||||||
|
This command examines your environment and alerts you to potential build or flash problems.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk doctor
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk new-keymap`
|
||||||
|
|
||||||
|
This command creates a new keymap based on a keyboard's existing default keymap.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk pyformat`
|
||||||
|
|
||||||
|
This command formats python code in `qmk_firmware`.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk pyformat
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk pytest`
|
||||||
|
|
||||||
|
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk pytest
|
||||||
|
```
|
||||||
|
121
docs/cli_configuration.md
Normal file
121
docs/cli_configuration.md
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
# QMK CLI Configuration
|
||||||
|
|
||||||
|
This document explains how `qmk config` works.
|
||||||
|
|
||||||
|
# Introduction
|
||||||
|
|
||||||
|
Configuration for QMK CLI is a key/value system. Each key consists of a subcommand and an argument name separated by a period. This allows for a straightforward and direct translation between config keys and the arguments they set.
|
||||||
|
|
||||||
|
## Simple Example
|
||||||
|
|
||||||
|
As an example let's look at the command `qmk compile --keyboard clueboard/66/rev4 --keymap default`.
|
||||||
|
|
||||||
|
There are two command line arguments that could be read from configuration instead:
|
||||||
|
|
||||||
|
* `compile.keyboard`
|
||||||
|
* `compile.keymap`
|
||||||
|
|
||||||
|
Let's set these now:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default
|
||||||
|
compile.keyboard: None -> clueboard/66/rev4
|
||||||
|
compile.keymap: None -> default
|
||||||
|
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||||
|
```
|
||||||
|
|
||||||
|
Now I can run `qmk compile` without specifying my keyboard and keymap each time.
|
||||||
|
|
||||||
|
## Setting User Defaults
|
||||||
|
|
||||||
|
Sometimes you want to share a setting between multiple commands. For example, multiple commands take the argument `--keyboard`. Rather than setting this value for every command you can set a user value which will be used by any command that takes that argument.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default
|
||||||
|
user.keyboard: None -> clueboard/66/rev4
|
||||||
|
user.keymap: None -> default
|
||||||
|
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||||
|
```
|
||||||
|
|
||||||
|
# CLI Documentation (`qmk config`)
|
||||||
|
|
||||||
|
The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form:
|
||||||
|
|
||||||
|
<subcommand|general|default>[.<key>][=<value>]
|
||||||
|
|
||||||
|
## Setting Configuration Values
|
||||||
|
|
||||||
|
You can set configuration values by putting an equal sign (=) into your config key. The key must always be the full `<section>.<key>` form.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk config default.keymap=default
|
||||||
|
default.keymap: None -> default
|
||||||
|
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Reading Configuration Values
|
||||||
|
|
||||||
|
You can read configuration values for the entire configuration, a single key, or for an entire section. You can also specify multiple keys to display more than one value.
|
||||||
|
|
||||||
|
### Entire Configuration Example
|
||||||
|
|
||||||
|
qmk config
|
||||||
|
|
||||||
|
### Whole Section Example
|
||||||
|
|
||||||
|
qmk config compile
|
||||||
|
|
||||||
|
### Single Key Example
|
||||||
|
|
||||||
|
qmk config compile.keyboard
|
||||||
|
|
||||||
|
### Multiple Keys Example
|
||||||
|
|
||||||
|
qmk config user compile.keyboard compile.keymap
|
||||||
|
|
||||||
|
## Deleting Configuration Values
|
||||||
|
|
||||||
|
You can delete a configuration value by setting it to the special string `None`.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk config default.keymap=None
|
||||||
|
default.keymap: default -> None
|
||||||
|
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Multiple Operations
|
||||||
|
|
||||||
|
You can combine multiple read and write operations into a single command. They will be executed and displayed in order:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk config compile default.keymap=default compile.keymap=None
|
||||||
|
compile.keymap=skully
|
||||||
|
compile.keyboard=clueboard/66_hotswap/gen1
|
||||||
|
default.keymap: None -> default
|
||||||
|
compile.keymap: skully -> None
|
||||||
|
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||||
|
```
|
||||||
|
|
||||||
|
# User Configuration Options
|
||||||
|
|
||||||
|
| Key | Default Value | Description |
|
||||||
|
|-----|---------------|-------------|
|
||||||
|
| user.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||||
|
| user.keymap | None | The keymap name (Example: `default`) |
|
||||||
|
| user.name | None | The user's github username. |
|
||||||
|
|
||||||
|
# All Configuration Options
|
||||||
|
|
||||||
|
| Key | Default Value | Description |
|
||||||
|
|-----|---------------|-------------|
|
||||||
|
| compile.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||||
|
| compile.keymap | None | The keymap name (Example: `default`) |
|
||||||
|
| hello.name | None | The name to greet when run. |
|
||||||
|
| new_keyboard.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||||
|
| new_keyboard.keymap | None | The keymap name (Example: `default`) |
|
175
docs/cli_development.md
Normal file
175
docs/cli_development.md
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
# QMK CLI Development
|
||||||
|
|
||||||
|
This document has useful information for developers wishing to write new `qmk` subcommands.
|
||||||
|
|
||||||
|
# Overview
|
||||||
|
|
||||||
|
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
|
||||||
|
|
||||||
|
# Subcommands
|
||||||
|
|
||||||
|
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
|
||||||
|
|
||||||
|
Subcommands in the local CLI are always found in `qmk_firmware/lib/python/qmk/cli`.
|
||||||
|
|
||||||
|
Let's start by looking at an example subcommand. This is `lib/python/qmk/cli/hello.py`:
|
||||||
|
|
||||||
|
```python
|
||||||
|
"""QMK Python Hello World
|
||||||
|
|
||||||
|
This is an example QMK CLI script.
|
||||||
|
"""
|
||||||
|
from milc import cli
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('-n', '--name', default='World', help='Name to greet.')
|
||||||
|
@cli.subcommand('QMK Hello World.')
|
||||||
|
def hello(cli):
|
||||||
|
"""Log a friendly greeting.
|
||||||
|
"""
|
||||||
|
cli.log.info('Hello, %s!', cli.config.hello.name)
|
||||||
|
```
|
||||||
|
|
||||||
|
First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.
|
||||||
|
|
||||||
|
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
|
||||||
|
|
||||||
|
# User Interaction
|
||||||
|
|
||||||
|
MILC and the QMK CLI have several nice tools for interacting with the user. Using these standard tools will allow you to colorize your text for easier interactions, and allow the user to control when and how that information is displayed and stored.
|
||||||
|
|
||||||
|
## Printing Text
|
||||||
|
|
||||||
|
There are two main methods for outputting text in a subcommand- `cli.log` and `cli.echo()`. They operate in similar ways but you should prefer to use `cli.log.info()` for most general purpose printing.
|
||||||
|
|
||||||
|
You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.
|
||||||
|
|
||||||
|
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
|
||||||
|
|
||||||
|
You should never use the format operator (`%`) directly, always pass values as arguments.
|
||||||
|
|
||||||
|
### Logging (`cli.log`)
|
||||||
|
|
||||||
|
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
|
||||||
|
|
||||||
|
The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.
|
||||||
|
|
||||||
|
| Function | Emoji |
|
||||||
|
|----------|-------|
|
||||||
|
| cli.log.critical | `{bg_red}{fg_white}¬_¬{style_reset_all}` |
|
||||||
|
| cli.log.error | `{fg_red}☒{style_reset_all}` |
|
||||||
|
| cli.log.warning | `{fg_yellow}⚠{style_reset_all}` |
|
||||||
|
| cli.log.info | `{fg_blue}Ψ{style_reset_all}` |
|
||||||
|
| cli.log.debug | `{fg_cyan}☐{style_reset_all}` |
|
||||||
|
| cli.log.notset | `{style_reset_all}¯\\_(o_o)_/¯` |
|
||||||
|
|
||||||
|
### Printing (`cli.echo`)
|
||||||
|
|
||||||
|
Sometimes you simply need to print text outside of the log system. This is appropriate if you are outputting fixed data or writing out something that should never be logged. Most of the time you should prefer `cli.log.info()` over `cli.echo`.
|
||||||
|
|
||||||
|
### Colorizing Text
|
||||||
|
|
||||||
|
You can colorize the output of your text by including color tokens within text. Use color to highlight, not to convey information. Remember that the user can disable color, and your subcommand should still be usable if they do.
|
||||||
|
|
||||||
|
You should generally avoid setting the background color, unless it's integral to what you are doing. Remember that users have a lot of preferences when it comes to their terminal color, so you should pick colors that work well against both black and white backgrounds.
|
||||||
|
|
||||||
|
Colors prefixed with 'fg' will affect the foreground (text) color. Colors prefixed with 'bg' will affect the background color.
|
||||||
|
|
||||||
|
| Color | Background | Extended Background | Foreground | Extended Foreground|
|
||||||
|
|-------|------------|---------------------|------------|--------------------|
|
||||||
|
| Black | {bg_black} | {bg_lightblack_ex} | {fg_black} | {fg_lightblack_ex} |
|
||||||
|
| Blue | {bg_blue} | {bg_lightblue_ex} | {fg_blue} | {fg_lightblue_ex} |
|
||||||
|
| Cyan | {bg_cyan} | {bg_lightcyan_ex} | {fg_cyan} | {fg_lightcyan_ex} |
|
||||||
|
| Green | {bg_green} | {bg_lightgreen_ex} | {fg_green} | {fg_lightgreen_ex} |
|
||||||
|
| Magenta | {bg_magenta} | {bg_lightmagenta_ex} | {fg_magenta} | {fg_lightmagenta_ex} |
|
||||||
|
| Red | {bg_red} | {bg_lightred_ex} | {fg_red} | {fg_lightred_ex} |
|
||||||
|
| White | {bg_white} | {bg_lightwhite_ex} | {fg_white} | {fg_lightwhite_ex} |
|
||||||
|
| Yellow | {bg_yellow} | {bg_lightyellow_ex} | {fg_yellow} | {fg_lightyellow_ex} |
|
||||||
|
|
||||||
|
There are also control sequences that can be used to change the behavior of
|
||||||
|
ANSI output:
|
||||||
|
|
||||||
|
| Control Sequences | Description |
|
||||||
|
|-------------------|-------------|
|
||||||
|
| {style_bright} | Make the text brighter |
|
||||||
|
| {style_dim} | Make the text dimmer |
|
||||||
|
| {style_normal} | Make the text normal (neither `{style_bright}` nor `{style_dim}`) |
|
||||||
|
| {style_reset_all} | Reset all text attributes to default. (This is automatically added to the end of every string.) |
|
||||||
|
| {bg_reset} | Reset the background color to the user's default |
|
||||||
|
| {fg_reset} | Reset the foreground color to the user's default |
|
||||||
|
|
||||||
|
# Arguments and Configuration
|
||||||
|
|
||||||
|
QMK handles the details of argument parsing and configuration for you. When you add a new argument it is automatically incorporated into the config tree based on your subcommand's name and the long name of the argument. You can access this configuration in `cli.config`, using either attribute-style access (`cli.config.<subcommand>.<argument>`) or dictionary-style access (`cli.config['<subcommand>']['<argument>']`).
|
||||||
|
|
||||||
|
Under the hood QMK uses [ConfigParser](https://docs.python.org/3/library/configparser.html) to store configurations. This gives us an easy and straightforward way to represent the configuration in a human-editable way. We have wrapped access to this configuration to provide some nicities that ConfigParser does not normally have.
|
||||||
|
|
||||||
|
## Reading Configuration Values
|
||||||
|
|
||||||
|
You can interact with `cli.config` in all the ways you'd normally expect. For example the `qmk compile` command gets the keyboard name from `cli.config.compile.keyboard`. It does not need to know whether that value came from the command line, an environment variable, or the configuration file.
|
||||||
|
|
||||||
|
Iteration is also supported:
|
||||||
|
|
||||||
|
```
|
||||||
|
for section in cli.config:
|
||||||
|
for key in cli.config[section]:
|
||||||
|
cli.log.info('%s.%s: %s', section, key, cli.config[section][key])
|
||||||
|
```
|
||||||
|
|
||||||
|
## Setting Configuration Values
|
||||||
|
|
||||||
|
You can set configuration values in the usual ways.
|
||||||
|
|
||||||
|
Dictionary style:
|
||||||
|
|
||||||
|
```
|
||||||
|
cli.config['<section>']['<key>'] = <value>
|
||||||
|
```
|
||||||
|
|
||||||
|
Attribute style:
|
||||||
|
|
||||||
|
```
|
||||||
|
cli.config.<section>.<key> = <value>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deleting Configuration Values
|
||||||
|
|
||||||
|
You can delete configuration values in the usual ways.
|
||||||
|
|
||||||
|
Dictionary style:
|
||||||
|
|
||||||
|
```
|
||||||
|
del(cli.config['<section>']['<key>'])
|
||||||
|
```
|
||||||
|
|
||||||
|
Attribute style:
|
||||||
|
|
||||||
|
```
|
||||||
|
del(cli.config.<section>.<key>)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Writing The Configuration File
|
||||||
|
|
||||||
|
The configuration is not written out when it is changed. Most commands do not need to do this. We prefer to have the user change their configuration deliberitely using `qmk config`.
|
||||||
|
|
||||||
|
You can use `cli.save_config()` to write out the configuration.
|
||||||
|
|
||||||
|
## Excluding Arguments From Configuration
|
||||||
|
|
||||||
|
Some arguments should not be propagated to the configuration file. These can be excluded by adding `arg_only=True` when creating the argument.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
@cli.argument('-o', '--output', arg_only=True, help='File to write to')
|
||||||
|
@cli.argument('filename', arg_only=True, help='Configurator JSON file')
|
||||||
|
@cli.subcommand('Create a keymap.c from a QMK Configurator export.')
|
||||||
|
def json_keymap(cli):
|
||||||
|
pass
|
||||||
|
```
|
||||||
|
|
||||||
|
You will only be able to access these arguments using `cli.args`. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.output)
|
||||||
|
```
|
@ -8,10 +8,14 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Place your keyboard into the bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch usually located on the underside of the board. If your keyboard has neither, try holding Escape, or Space+`B`, as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details).
|
Put your keyboard into bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details). Some boards use [Command](feature_command.md) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
|
||||||
Some keyboards may have specific instructions for entering the bootloader, for example the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (Escape) might be on a different key, such as Left Control. Refer to the board's README if you are unsure.
|
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
|
||||||
|
|
||||||
|
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
|
||||||
|
Alternatively, hold `BOOT` while inserting the USB cable.
|
||||||
|
|
||||||
|
Zadig will automatically detect the bootloader device. You may sometimes need to check **Options → List All Devices**.
|
||||||
|
|
||||||
Zadig will automatically detect the bootloader device. You may sometimes need to check **Options -> List All Devices**.
|
|
||||||
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
|
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
|
||||||
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
|
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
|
||||||
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
|
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
|
||||||
@ -19,7 +23,7 @@ Zadig will automatically detect the bootloader device. You may sometimes need to
|
|||||||
|
|
||||||
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
||||||
|
|
||||||
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list.
|
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. For flashing a USBaspLoader device via command line with msys2, the `libusbk` driver is recommended, otherwise `libusb-win32` will work fine if you are using QMK Toolbox for flashing.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -39,4 +43,4 @@ Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driv
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
Click **Action -> Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
|
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
|
||||||
|
@ -32,16 +32,18 @@ This feature is distinct from both the [RGB underglow](feature_rgblight.md) and
|
|||||||
|
|
||||||
Hardware PWM is supported according to the following table:
|
Hardware PWM is supported according to the following table:
|
||||||
|
|
||||||
|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|
|
|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328P|
|
||||||
|-------------|-------------|-------------|-------------|---------|
|
|-------------|-------------|-------------|-------------|---------|----------|
|
||||||
|`B5` |Timer 1 |Timer 1 | | |
|
|`B1` | | | | |Timer 1 |
|
||||||
|`B6` |Timer 1 |Timer 1 | | |
|
|`B2` | | | | |Timer 1 |
|
||||||
|`B7` |Timer 1 |Timer 1 |Timer 1 | |
|
|`B5` |Timer 1 |Timer 1 | | | |
|
||||||
|`C4` |Timer 3 | | | |
|
|`B6` |Timer 1 |Timer 1 | | | |
|
||||||
|`C5` |Timer 3 | |Timer 1 | |
|
|`B7` |Timer 1 |Timer 1 |Timer 1 | | |
|
||||||
|`C6` |Timer 3 |Timer 3 |Timer 1 | |
|
|`C4` |Timer 3 | | | | |
|
||||||
|`D4` | | | |Timer 1 |
|
|`C5` |Timer 3 | |Timer 1 | | |
|
||||||
|`D5` | | | |Timer 1 |
|
|`C6` |Timer 3 |Timer 3 |Timer 1 | | |
|
||||||
|
|`D4` | | | |Timer 1 | |
|
||||||
|
|`D5` | | | |Timer 1 | |
|
||||||
|
|
||||||
All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer:
|
All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer:
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
|||||||
|`X` |Toggle key matrix debugging |
|
|`X` |Toggle key matrix debugging |
|
||||||
|`K` |Toggle keyboard debugging |
|
|`K` |Toggle keyboard debugging |
|
||||||
|`M` |Toggle mouse debugging |
|
|`M` |Toggle mouse debugging |
|
||||||
|
|`L` |Set "Left Hand" for EE_HANDS handedness |
|
||||||
|
|`R` |Set "Right Hand" for EE_HANDS handedness |
|
||||||
|Backspace |Clear the EEPROM |
|
|Backspace |Clear the EEPROM |
|
||||||
|Caps Lock |Toggle treating Caps Lock as Left Control |
|
|Caps Lock |Toggle treating Caps Lock as Left Control |
|
||||||
|Left Control |Toggle swapping Caps Lock and Left Control |
|
|Left Control |Toggle swapping Caps Lock and Left Control |
|
||||||
@ -83,6 +85,8 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
|||||||
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and Left GUI |
|
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and Left GUI |
|
||||||
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and Right GUI |
|
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and Right GUI |
|
||||||
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and Right GUI |
|
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and Right GUI |
|
||||||
|
|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness |
|
||||||
|
|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness |
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@ -98,6 +102,8 @@ If you would like to change the hotkey assignments for Bootmagic, `#define` thes
|
|||||||
|`BOOTMAGIC_KEY_DEBUG_MATRIX` |`KC_X` |Toggle matrix debugging |
|
|`BOOTMAGIC_KEY_DEBUG_MATRIX` |`KC_X` |Toggle matrix debugging |
|
||||||
|`BOOTMAGIC_KEY_DEBUG_KEYBOARD` |`KC_K` |Toggle keyboard debugging |
|
|`BOOTMAGIC_KEY_DEBUG_KEYBOARD` |`KC_K` |Toggle keyboard debugging |
|
||||||
|`BOOTMAGIC_KEY_DEBUG_MOUSE` |`KC_M` |Toggle mouse debugging |
|
|`BOOTMAGIC_KEY_DEBUG_MOUSE` |`KC_M` |Toggle mouse debugging |
|
||||||
|
|`BOOTMAGIC_KEY_EE_HANDS_LEFT` |`KC_L` |Set "Left Hand" for EE_HANDS handedness |
|
||||||
|
|`BOOTMAGIC_KEY_EE_HANDS_RIGHT` |`KC_R` |Set "Right Hand" for EE_HANDS handedness |
|
||||||
|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` |`KC_LCTRL` |Swap Left Control and Caps Lock |
|
|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` |`KC_LCTRL` |Swap Left Control and Caps Lock |
|
||||||
|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` |`KC_CAPSLOCK`|Toggle treating Caps Lock as Left Control |
|
|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` |`KC_CAPSLOCK`|Toggle treating Caps Lock as Left Control |
|
||||||
|`BOOTMAGIC_KEY_SWAP_LALT_LGUI` |`KC_LALT` |Toggle swapping Left Alt and Left GUI (for macOS) |
|
|`BOOTMAGIC_KEY_SWAP_LALT_LGUI` |`KC_LALT` |Toggle swapping Left Alt and Left GUI (for macOS) |
|
||||||
|
@ -29,6 +29,9 @@ Not all keycodes below will work depending on which haptic mechanism you have ch
|
|||||||
|`HPT_BUZ` | Toggle solenoid buzz on/off |
|
|`HPT_BUZ` | Toggle solenoid buzz on/off |
|
||||||
|`HPT_MODI` | Go to next DRV2605L waveform |
|
|`HPT_MODI` | Go to next DRV2605L waveform |
|
||||||
|`HPT_MODD` | Go to previous DRV2605L waveform |
|
|`HPT_MODD` | Go to previous DRV2605L waveform |
|
||||||
|
|`HPT_CONT` | Toggle continuous haptic mode on/off |
|
||||||
|
|`HPT_CONI` | Increase DRV2605L continous haptic strength |
|
||||||
|
|`HPT_COND` | Decrease DRV2605L continous haptic strength |
|
||||||
|`HPT_DWLI` | Increase Solenoid dwell time |
|
|`HPT_DWLI` | Increase Solenoid dwell time |
|
||||||
|`HPT_DWLD` | Decrease Solenoid dwell time |
|
|`HPT_DWLD` | Decrease Solenoid dwell time |
|
||||||
|
|
||||||
@ -145,3 +148,7 @@ If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence
|
|||||||
#define DRV_MODE_DEFAULT *sequence name or number*
|
#define DRV_MODE_DEFAULT *sequence name or number*
|
||||||
```
|
```
|
||||||
This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed.
|
This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed.
|
||||||
|
|
||||||
|
### DRV2605L Continuous Haptic Mode
|
||||||
|
|
||||||
|
This mode sets continuous haptic feedback with the option to increase or decrease strength.
|
@ -30,7 +30,9 @@ Next, you will want to define some tap-dance keys, which is easiest to do with t
|
|||||||
After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
|
After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
|
||||||
|
|
||||||
* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
|
* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
|
||||||
* `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode).
|
* `ACTION_TAP_DANCE_LAYER_MOVE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode).
|
||||||
|
* This is the same as `ACTION_TAP_DANCE_DUAL_ROLE`, but renamed to something that is clearer about its functionality. Both names will work.
|
||||||
|
* `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: Sends the `kc` keycode when tapped once, or toggles the state of `layer`. (this functions like the `TG` layer keycode).
|
||||||
* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
|
* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
|
||||||
* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
|
* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
|
||||||
* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`.
|
* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`.
|
||||||
|
@ -10,11 +10,17 @@ Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by
|
|||||||
|
|
||||||
To ensure compatibility with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead):
|
To ensure compatibility with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead):
|
||||||
|
|
||||||
# Bootloader
|
```make
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# Bootloader selection
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# Teensy halfkay
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# Pro Micro caterina
|
||||||
BOOTLOADER = atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
```
|
||||||
|
|
||||||
Compatible flashers:
|
Compatible flashers:
|
||||||
|
|
||||||
@ -64,11 +70,17 @@ Arduino boards and their clones use the [Caterina bootloader](https://github.com
|
|||||||
|
|
||||||
To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:
|
To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:
|
||||||
|
|
||||||
# Bootloader
|
```make
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# Bootloader selection
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# Teensy halfkay
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# Pro Micro caterina
|
||||||
BOOTLOADER = caterina
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
```
|
||||||
|
|
||||||
Compatible flashers:
|
Compatible flashers:
|
||||||
|
|
||||||
@ -100,11 +112,17 @@ Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on al
|
|||||||
|
|
||||||
To ensure compatibility with the Halfkay bootloader, make sure this block is present your `rules.mk`:
|
To ensure compatibility with the Halfkay bootloader, make sure this block is present your `rules.mk`:
|
||||||
|
|
||||||
# Bootloader
|
```make
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# Bootloader selection
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# Teensy halfkay
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# Pro Micro caterina
|
||||||
BOOTLOADER = halfkay
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = halfkay
|
||||||
|
```
|
||||||
|
|
||||||
Compatible flashers:
|
Compatible flashers:
|
||||||
|
|
||||||
@ -125,11 +143,17 @@ USBasploader is a bootloader developed by matrixstorm. It is used in some non-US
|
|||||||
|
|
||||||
To ensure compatibility with the USBasploader bootloader, make sure this block is present in your `rules.mk`:
|
To ensure compatibility with the USBasploader bootloader, make sure this block is present in your `rules.mk`:
|
||||||
|
|
||||||
# Bootloader
|
```make
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# Bootloader selection
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# Teensy halfkay
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# Pro Micro caterina
|
||||||
BOOTLOADER = USBasp
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = USBasp
|
||||||
|
```
|
||||||
|
|
||||||
Compatible flashers:
|
Compatible flashers:
|
||||||
|
|
||||||
@ -150,11 +174,17 @@ BootloadHID is a USB bootloader for AVR microcontrollers. The uploader tool requ
|
|||||||
|
|
||||||
To ensure compatibility with the bootloadHID bootloader, make sure this block is present your `rules.mk`:
|
To ensure compatibility with the bootloadHID bootloader, make sure this block is present your `rules.mk`:
|
||||||
|
|
||||||
# Bootloader
|
```make
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# Bootloader selection
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# Teensy halfkay
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# Pro Micro caterina
|
||||||
BOOTLOADER = bootloadHID
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = bootloadHID
|
||||||
|
```
|
||||||
|
|
||||||
Compatible flashers:
|
Compatible flashers:
|
||||||
|
|
||||||
|
@ -257,35 +257,37 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|
|
||||||
## [Bootmagic](feature_bootmagic.md)
|
## [Bootmagic](feature_bootmagic.md)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------------------------------|---------|------------------------------------|
|
|----------------------------------|---------|-------------------------------------------|
|
||||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control |
|
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control |
|
||||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||||
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and GUI |
|
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and GUI |
|
||||||
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and GUI |
|
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and GUI |
|
||||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|
||||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control |
|
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control |
|
||||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control |
|
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control |
|
||||||
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and GUI |
|
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and GUI |
|
||||||
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and GUI |
|
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and GUI |
|
||||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape|
|
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape |
|
||||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI on both sides |
|
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI on both sides |
|
||||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap on both sides |
|
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap on both sides |
|
||||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||||
|
|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness |
|
||||||
|
|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness |
|
||||||
|
|
||||||
## [Bluetooth](feature_bluetooth.md)
|
## [Bluetooth](feature_bluetooth.md)
|
||||||
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
# Python Development in QMK
|
|
||||||
|
|
||||||
This document gives an overview of how QMK has structured its python code. You should read this before working on any of the python code.
|
|
||||||
|
|
||||||
## Script directories
|
|
||||||
|
|
||||||
There are two places scripts live in QMK: `qmk_firmware/bin` and `qmk_firmware/util`. You should use `bin` for any python scripts that utilize the `qmk` wrapper. Scripts that are standalone and not run very often live in `util`.
|
|
||||||
|
|
||||||
We discourage putting anything into `bin` that does not utilize the `qmk` wrapper. If you think you have a good reason for doing so please talk to us about your use case.
|
|
||||||
|
|
||||||
## Python Modules
|
|
||||||
|
|
||||||
Most of the QMK python modules can be found in `qmk_firmware/lib/python`. This is the path that we append to `sys.path`.
|
|
||||||
|
|
||||||
We have a module hierarchy under that path:
|
|
||||||
|
|
||||||
* `qmk_firmware/lib/python`
|
|
||||||
* `milc.py` - The CLI library we use. Will be pulled out into its own module in the future.
|
|
||||||
* `qmk` - Code associated with QMK
|
|
||||||
* `cli` - Modules that will be imported for CLI commands.
|
|
||||||
* `errors.py` - Errors that can be raised within QMK apps
|
|
||||||
* `keymap.py` - Functions for working with keymaps
|
|
||||||
|
|
||||||
## CLI Scripts
|
|
||||||
|
|
||||||
We have a CLI wrapper that you should utilize for any user facing scripts. We think it's pretty easy to use and it gives you a lot of nice things for free.
|
|
||||||
|
|
||||||
To use the wrapper simply place a module into `qmk_firmware/lib/python/qmk/cli`, and create a symlink to `bin/qmk` named after your module. Dashes in command names will be converted into dots so you can use hierarchy to manage commands.
|
|
||||||
|
|
||||||
When `qmk` is run it checks to see how it was invoked. If it was invoked as `qmk` the module name is take from `sys.argv[1]`. If it was invoked as `qmk-<module-name>` then everything after the first dash is taken as the module name. Dashes and underscores are converted to dots, and then `qmk.cli` is prepended before the module is imported.
|
|
||||||
|
|
||||||
The module uses `@cli.entrypoint()` and `@cli.argument()` decorators to define an entrypoint, which is where execution starts.
|
|
||||||
|
|
||||||
## Example CLI Script
|
|
||||||
|
|
||||||
We have provided a QMK Hello World script you can use as an example. To run it simply run `qmk hello` or `qmk-hello`. The source code is listed below.
|
|
||||||
|
|
||||||
```
|
|
||||||
from milc import cli
|
|
||||||
|
|
||||||
@cli.argument('-n', '--name', default='World', help='Name to greet.')
|
|
||||||
@cli.entrypoint('QMK Python Hello World.')
|
|
||||||
def main(cli):
|
|
||||||
cli.echo('Hello, %s!', cli.config.general.name)
|
|
||||||
```
|
|
@ -43,6 +43,10 @@
|
|||||||
{
|
{
|
||||||
"from": "unicode.html",
|
"from": "unicode.html",
|
||||||
"to": "feature_unicode.html"
|
"to": "feature_unicode.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "python_development.html",
|
||||||
|
"to": "cli_development.html"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,17 @@
|
|||||||
|
|
||||||
static uint8_t i2c_address;
|
static uint8_t i2c_address;
|
||||||
|
|
||||||
|
// ChibiOS uses two initialization structure for v1 and v2/v3 i2c APIs.
|
||||||
|
// The F1 series uses the v1 api, which have to initialized this way.
|
||||||
|
#ifdef STM32F103xB
|
||||||
|
static const I2CConfig i2cconfig = {
|
||||||
|
OPMODE_I2C,
|
||||||
|
400000,
|
||||||
|
FAST_DUTY_CYCLE_2,
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
// This configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||||
|
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||||
static const I2CConfig i2cconfig = {
|
static const I2CConfig i2cconfig = {
|
||||||
#ifdef USE_I2CV1
|
#ifdef USE_I2CV1
|
||||||
I2C1_OPMODE,
|
I2C1_OPMODE,
|
||||||
@ -41,6 +52,7 @@ static const I2CConfig i2cconfig = {
|
|||||||
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0
|
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
||||||
switch (*status) {
|
switch (*status) {
|
||||||
@ -60,7 +72,6 @@ __attribute__((weak)) void i2c_init(void) {
|
|||||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||||
|
|
||||||
chThdSleepMilliseconds(10);
|
chThdSleepMilliseconds(10);
|
||||||
|
|
||||||
#ifdef USE_I2CV1
|
#ifdef USE_I2CV1
|
||||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
||||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
||||||
@ -68,8 +79,6 @@ __attribute__((weak)) void i2c_init(void) {
|
|||||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// i2cInit(); //This is invoked by halInit() so no need to redo it.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_start(uint8_t address) {
|
i2c_status_t i2c_start(uint8_t address) {
|
||||||
|
@ -114,6 +114,17 @@ void DRV_init(void) {
|
|||||||
DRV_write(DRV_GO, 0x01);
|
DRV_write(DRV_GO, 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DRV_rtp_init(void) {
|
||||||
|
DRV_write(DRV_GO, 0x00);
|
||||||
|
DRV_write(DRV_RTP_INPUT, 20); //20 is the lowest value I've found where haptics can still be felt.
|
||||||
|
DRV_write(DRV_MODE, 0x05);
|
||||||
|
DRV_write(DRV_GO, 0x01);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DRV_amplitude(uint8_t amplitude) {
|
||||||
|
DRV_write(DRV_RTP_INPUT, amplitude);
|
||||||
|
}
|
||||||
|
|
||||||
void DRV_pulse(uint8_t sequence) {
|
void DRV_pulse(uint8_t sequence) {
|
||||||
DRV_write(DRV_GO, 0x00);
|
DRV_write(DRV_GO, 0x00);
|
||||||
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
|
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
|
||||||
|
@ -170,6 +170,8 @@
|
|||||||
void DRV_init(void);
|
void DRV_init(void);
|
||||||
void DRV_write(const uint8_t drv_register, const uint8_t settings);
|
void DRV_write(const uint8_t drv_register, const uint8_t settings);
|
||||||
uint8_t DRV_read(const uint8_t regaddress);
|
uint8_t DRV_read(const uint8_t regaddress);
|
||||||
|
void DRV_rtp_init(void);
|
||||||
|
void DRV_amplitude(const uint8_t amplitude);
|
||||||
void DRV_pulse(const uint8_t sequence);
|
void DRV_pulse(const uint8_t sequence);
|
||||||
|
|
||||||
typedef enum DRV_EFFECT {
|
typedef enum DRV_EFFECT {
|
||||||
|
@ -168,6 +168,15 @@ void haptic_set_mode(uint8_t mode) {
|
|||||||
xprintf("haptic_config.mode = %u\n", haptic_config.mode);
|
xprintf("haptic_config.mode = %u\n", haptic_config.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void haptic_set_amplitude(uint8_t amp) {
|
||||||
|
haptic_config.amplitude = amp;
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude);
|
||||||
|
#ifdef DRV2605L
|
||||||
|
DRV_amplitude(amp);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void haptic_set_buzz(uint8_t buzz) {
|
void haptic_set_buzz(uint8_t buzz) {
|
||||||
haptic_config.buzz = buzz;
|
haptic_config.buzz = buzz;
|
||||||
eeconfig_update_haptic(haptic_config.raw);
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
@ -201,6 +210,53 @@ uint8_t haptic_get_dwell(void) {
|
|||||||
return haptic_config.dwell;
|
return haptic_config.dwell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void haptic_enable_continuous(void) {
|
||||||
|
haptic_config.cont = 1;
|
||||||
|
xprintf("haptic_config.cont = %u\n", haptic_config.cont);
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
#ifdef DRV2605L
|
||||||
|
DRV_rtp_init();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_disable_continuous(void) {
|
||||||
|
haptic_config.cont = 0;
|
||||||
|
xprintf("haptic_config.cont = %u\n", haptic_config.cont);
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
#ifdef DRV2605L
|
||||||
|
DRV_write(DRV_MODE,0x00);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_toggle_continuous(void) {
|
||||||
|
#ifdef DRV2605L
|
||||||
|
if (haptic_config.cont) {
|
||||||
|
haptic_disable_continuous();
|
||||||
|
} else {
|
||||||
|
haptic_enable_continuous();
|
||||||
|
}
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void haptic_cont_increase(void) {
|
||||||
|
uint8_t amp = haptic_config.amplitude + 10;
|
||||||
|
if (haptic_config.amplitude >= 120) {
|
||||||
|
amp = 120;
|
||||||
|
}
|
||||||
|
haptic_set_amplitude(amp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_cont_decrease(void) {
|
||||||
|
uint8_t amp = haptic_config.amplitude - 10;
|
||||||
|
if (haptic_config.amplitude < 20) {
|
||||||
|
amp = 20;
|
||||||
|
}
|
||||||
|
haptic_set_amplitude(amp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void haptic_play(void) {
|
void haptic_play(void) {
|
||||||
#ifdef DRV2605L
|
#ifdef DRV2605L
|
||||||
uint8_t play_eff = 0;
|
uint8_t play_eff = 0;
|
||||||
@ -213,6 +269,7 @@ void haptic_play(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
|
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
if (keycode == HPT_ON && record->event.pressed) {
|
if (keycode == HPT_ON && record->event.pressed) {
|
||||||
haptic_enable();
|
haptic_enable();
|
||||||
}
|
}
|
||||||
@ -243,6 +300,16 @@ bool process_haptic(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (keycode == HPT_DWLD && record->event.pressed) {
|
if (keycode == HPT_DWLD && record->event.pressed) {
|
||||||
haptic_dwell_decrease();
|
haptic_dwell_decrease();
|
||||||
}
|
}
|
||||||
|
if (keycode == HPT_CONT && record->event.pressed) {
|
||||||
|
haptic_toggle_continuous();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_CONI && record->event.pressed) {
|
||||||
|
haptic_cont_increase();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_COND && record->event.pressed) {
|
||||||
|
haptic_cont_decrease();
|
||||||
|
}
|
||||||
|
|
||||||
if (haptic_config.enable) {
|
if (haptic_config.enable) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
// keypress
|
// keypress
|
||||||
|
@ -34,12 +34,14 @@
|
|||||||
typedef union {
|
typedef union {
|
||||||
uint32_t raw;
|
uint32_t raw;
|
||||||
struct {
|
struct {
|
||||||
bool enable : 1;
|
bool enable :1;
|
||||||
uint8_t feedback : 2;
|
uint8_t feedback :2;
|
||||||
uint8_t mode : 7;
|
uint8_t mode :7;
|
||||||
bool buzz : 1;
|
bool buzz :1;
|
||||||
uint8_t dwell : 7;
|
uint8_t dwell :7;
|
||||||
uint16_t reserved : 16;
|
bool cont :1;
|
||||||
|
uint8_t amplitude :8;
|
||||||
|
uint16_t reserved :7;
|
||||||
};
|
};
|
||||||
} haptic_config_t;
|
} haptic_config_t;
|
||||||
|
|
||||||
@ -71,6 +73,9 @@ uint8_t haptic_get_mode(void);
|
|||||||
uint8_t haptic_get_feedback(void);
|
uint8_t haptic_get_feedback(void);
|
||||||
void haptic_dwell_increase(void);
|
void haptic_dwell_increase(void);
|
||||||
void haptic_dwell_decrease(void);
|
void haptic_dwell_decrease(void);
|
||||||
|
void haptic_toggle_continuous(void);
|
||||||
|
void haptic_cont_increase(void);
|
||||||
|
void haptic_cont_decrease(void);
|
||||||
|
|
||||||
void haptic_play(void);
|
void haptic_play(void);
|
||||||
void haptic_shutdown(void);
|
void haptic_shutdown(void);
|
||||||
|
@ -1,51 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
|
@ -16,3 +16,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "1up60hte.h"
|
#include "1up60hte.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
setPinOutput(B6);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
|
writePinLow(B6);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B6);
|
||||||
|
}
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
@ -31,22 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
setPinOutput(B6);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
|
||||||
writePinLow(B6);
|
|
||||||
} else {
|
|
||||||
writePinHigh(B6);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -31,22 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
setPinOutput(B6);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
|
||||||
writePinLow(B6);
|
|
||||||
} else {
|
|
||||||
writePinHigh(B6);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -8,7 +8,6 @@ A 60% PCB with USB C, RGB underglow, backlighting, hotswappable switches, and a
|
|||||||
|
|
||||||
Keyboard Maintainer: [Bubnick](https://github.com/bubnick)
|
Keyboard Maintainer: [Bubnick](https://github.com/bubnick)
|
||||||
Hardware Supported: 1up60hte 60% PCB
|
Hardware Supported: 1up60hte 60% PCB
|
||||||
|
|
||||||
Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/)
|
Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
@ -1,50 +1,20 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
@ -54,6 +24,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/
|
|||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
EXTRAFLAGS += -flto
|
|
||||||
|
|
||||||
LAYOUTS = 60_hhkb
|
LAYOUTS = 60_hhkb
|
||||||
|
@ -1,45 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
#EXTRAFLAGS += -flto
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,45 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = caterina
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
8
keyboards/2_milk/keymaps/mikethetiger/keymap.c
Normal file
8
keyboards/2_milk/keymaps/mikethetiger/keymap.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_VOLU,
|
||||||
|
KC_VOLD
|
||||||
|
)
|
||||||
|
};
|
1
keyboards/2_milk/keymaps/mikethetiger/readme.md
Normal file
1
keyboards/2_milk/keymaps/mikethetiger/readme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# mikethetiger's keymap for 2% Milk
|
13
keyboards/2_milk/keymaps/mikethetiger/rules.mk
Normal file
13
keyboards/2_milk/keymaps/mikethetiger/rules.mk
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled
|
||||||
|
AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
|
||||||
|
RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port.
|
@ -1,24 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
F_CPU = 16000000
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
#
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA specific
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# Target architecture (see library "Board Types" documentation).
|
# ATmega32A bootloadHID
|
||||||
ARCH = AVR8
|
# ATmega328P USBasp
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = atmel-dfu
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
|
@ -1,45 +1,14 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,61 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,58 +1,12 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
@ -1,58 +1,12 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = halfkay
|
BOOTLOADER = halfkay
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
|
@ -1,64 +1,6 @@
|
|||||||
# Overrides for Feather 32u4 Bluefruit
|
# Processor frequency
|
||||||
# MCU name
|
|
||||||
MCU = atmega32u4
|
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 8000000
|
F_CPU = 8000000
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
|
||||||
# Teensy halfkay
|
|
||||||
# Pro Micro caterina
|
|
||||||
# Atmel DFU atmel-dfu
|
|
||||||
# LUFA DFU lufa-dfu
|
|
||||||
# QMK DFU qmk-dfu
|
|
||||||
# atmega32a bootloadHID
|
|
||||||
BOOTLOADER = caterina
|
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,62 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
|
@ -1,63 +1,16 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
MCU = atmega32u4
|
# MCU name
|
||||||
BOOTLOADER = caterina
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
|
@ -1,49 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = caterina
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
@ -1,48 +1,14 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
# Teensy halfkay
|
||||||
# Pro Micro caterina
|
# Pro Micro caterina
|
||||||
# Atmel DFU atmel-dfu
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA DFU lufa-dfu
|
# LUFA DFU lufa-dfu
|
||||||
# QMK DFU qmk-dfu
|
# QMK DFU qmk-dfu
|
||||||
# atmega32a bootloadHID
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
|
@ -1,49 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = caterina
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
@ -55,16 +55,16 @@
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864)
|
// Dynamic macro starts after dynamic keymaps (37+(4*12*9*2)) = (37+864)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 901
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 123
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
|
@ -55,17 +55,17 @@
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*10*2)) = (35+800)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*10*2)) = (37+800)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 835
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 837
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 189
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 187
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
|
|
||||||
|
@ -250,17 +250,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// EEPROM usage
|
// EEPROM usage
|
||||||
|
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
|
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
|
||||||
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
# Bootloader selection
|
||||||
# Teensy halfKay 512
|
# Teensy halfkay
|
||||||
# Teensy++ halfKay 1024
|
# Pro Micro caterina
|
||||||
# Atmel DFU loader 4096
|
# Atmel DFU atmel-dfu
|
||||||
# LUFA bootloader 4096
|
# LUFA DFU lufa-dfu
|
||||||
# USBaspLoader 2048
|
# QMK DFU qmk-dfu
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = atmel-dfu
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
|
@ -15,18 +15,15 @@
|
|||||||
|
|
||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32a
|
MCU = atmega32a
|
||||||
PROTOCOL = VUSB
|
|
||||||
|
|
||||||
# unsupported features for now
|
# Bootloader selection
|
||||||
NO_SUSPEND_POWER_DOWN = yes
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
# processor frequency
|
# Atmel DFU atmel-dfu
|
||||||
F_CPU = 12000000
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
# Bootloader
|
# ATmega32A bootloadHID
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# ATmega328P USBasp
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
|
||||||
BOOTLOADER = bootloadHID
|
BOOTLOADER = bootloadHID
|
||||||
|
|
||||||
# build options
|
# build options
|
||||||
@ -38,11 +35,7 @@ COMMAND_ENABLE = yes
|
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
RGBLIGHT_CUSTOM_DRIVER = yes
|
RGBLIGHT_CUSTOM_DRIVER = yes
|
||||||
NO_UART = yes
|
|
||||||
|
|
||||||
OPT_DEFS = -DDEBUG_LEVEL=0
|
OPT_DEFS = -DDEBUG_LEVEL=0
|
||||||
|
|
||||||
SRC += i2c_master.c
|
SRC += i2c_master.c
|
||||||
|
|
||||||
# programming options
|
|
||||||
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
|
|
||||||
|
1
keyboards/at_at/660m/660m.c
Normal file
1
keyboards/at_at/660m/660m.c
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "660m.h"
|
19
keyboards/at_at/660m/660m.h
Normal file
19
keyboards/at_at/660m/660m.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KNO KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \
|
||||||
|
k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KNO, k0F }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KNO, k1F }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KNO, k2D, KNO, KNO }, \
|
||||||
|
{ k30, KNO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KNO, k3E, KNO }, \
|
||||||
|
{ k40, k41, k42, KNO, KNO, KNO, k46, KNO, KNO, KNO, k4A, k4B, k4C, k4D, k4E, k4F } \
|
||||||
|
}
|
109
keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c
Normal file
109
keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
|
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief PAL setup.
|
||||||
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
|
* This variable is used by the HAL when initializing the PAL driver.
|
||||||
|
*/
|
||||||
|
const PALConfig pal_default_config = {
|
||||||
|
#if STM32_HAS_GPIOA
|
||||||
|
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||||
|
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOB
|
||||||
|
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
||||||
|
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOC
|
||||||
|
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
||||||
|
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOD
|
||||||
|
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
||||||
|
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOE
|
||||||
|
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
||||||
|
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOF
|
||||||
|
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
||||||
|
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOG
|
||||||
|
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
||||||
|
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOH
|
||||||
|
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
||||||
|
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOI
|
||||||
|
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||||
|
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Early initialization code.
|
||||||
|
* @details This initialization must be performed just after stack setup
|
||||||
|
* and before any other initialization.
|
||||||
|
*/
|
||||||
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
|
stm32_clock_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card write protection detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Board-specific initialization code.
|
||||||
|
* @todo Add your board-specific code, if any.
|
||||||
|
*/
|
||||||
|
void boardInit(void) {
|
||||||
|
}
|
922
keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h
Normal file
922
keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h
Normal file
@ -0,0 +1,922 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup for ST STM32F072B-Discovery board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board identifier.
|
||||||
|
*/
|
||||||
|
#define BOARD_ST_STM32F072B_DISCOVERY
|
||||||
|
#define BOARD_NAME "ST STM32F072B-Discovery"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board oscillators-related settings.
|
||||||
|
* NOTE: HSE not fitted.
|
||||||
|
*/
|
||||||
|
#if !defined(STM32_LSECLK)
|
||||||
|
#define STM32_LSECLK 32768
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_LSEDRV (3U << 3U)
|
||||||
|
|
||||||
|
#if !defined(STM32_HSECLK)
|
||||||
|
#define STM32_HSECLK 0U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_HSE_BYPASS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCU type as defined in the ST header.
|
||||||
|
*/
|
||||||
|
#define STM32F072xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO pins assignments.
|
||||||
|
*/
|
||||||
|
#define GPIOA_BUTTON 0U
|
||||||
|
#define GPIOA_PIN1 1U
|
||||||
|
#define GPIOA_PIN2 2U
|
||||||
|
#define GPIOA_PIN3 3U
|
||||||
|
#define GPIOA_PIN4 4U
|
||||||
|
#define GPIOA_PIN5 5U
|
||||||
|
#define GPIOA_PIN6 6U
|
||||||
|
#define GPIOA_PIN7 7U
|
||||||
|
#define GPIOA_PIN8 8U
|
||||||
|
#define GPIOA_PIN9 9U
|
||||||
|
#define GPIOA_PIN10 10U
|
||||||
|
#define GPIOA_USB_DM 11U
|
||||||
|
#define GPIOA_USB_DP 12U
|
||||||
|
#define GPIOA_SWDIO 13U
|
||||||
|
#define GPIOA_SWCLK 14U
|
||||||
|
#define GPIOA_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOB_PIN0 0U
|
||||||
|
#define GPIOB_PIN1 1U
|
||||||
|
#define GPIOB_PIN2 2U
|
||||||
|
#define GPIOB_PIN3 3U
|
||||||
|
#define GPIOB_PIN4 4U
|
||||||
|
#define GPIOB_PIN5 5U
|
||||||
|
#define GPIOB_PIN6 6U
|
||||||
|
#define GPIOB_PIN7 7U
|
||||||
|
#define GPIOB_PIN8 8U
|
||||||
|
#define GPIOB_PIN9 9U
|
||||||
|
#define GPIOB_PIN10 10U
|
||||||
|
#define GPIOB_PIN11 11U
|
||||||
|
#define GPIOB_PIN12 12U
|
||||||
|
#define GPIOB_SPI2_SCK 13U
|
||||||
|
#define GPIOB_SPI2_MISO 14U
|
||||||
|
#define GPIOB_SPI2_MOSI 15U
|
||||||
|
|
||||||
|
#define GPIOC_MEMS_CS 0U
|
||||||
|
#define GPIOC_PIN1 1U
|
||||||
|
#define GPIOC_PIN2 2U
|
||||||
|
#define GPIOC_PIN3 3U
|
||||||
|
#define GPIOC_PIN4 4U
|
||||||
|
#define GPIOC_PIN5 5U
|
||||||
|
#define GPIOC_LED_RED 6U
|
||||||
|
#define GPIOC_LED_BLUE 7U
|
||||||
|
#define GPIOC_LED_ORANGE 8U
|
||||||
|
#define GPIOC_LED_GREEN 9U
|
||||||
|
#define GPIOC_PIN10 10U
|
||||||
|
#define GPIOC_PIN11 11U
|
||||||
|
#define GPIOC_PIN12 12U
|
||||||
|
#define GPIOC_PIN13 13U
|
||||||
|
#define GPIOC_OSC32_IN 14U
|
||||||
|
#define GPIOC_OSC32_OUT 15U
|
||||||
|
|
||||||
|
#define GPIOD_PIN0 0U
|
||||||
|
#define GPIOD_PIN1 1U
|
||||||
|
#define GPIOD_PIN2 2U
|
||||||
|
#define GPIOD_PIN3 3U
|
||||||
|
#define GPIOD_PIN4 4U
|
||||||
|
#define GPIOD_PIN5 5U
|
||||||
|
#define GPIOD_PIN6 6U
|
||||||
|
#define GPIOD_PIN7 7U
|
||||||
|
#define GPIOD_PIN8 8U
|
||||||
|
#define GPIOD_PIN9 9U
|
||||||
|
#define GPIOD_PIN10 10U
|
||||||
|
#define GPIOD_PIN11 11U
|
||||||
|
#define GPIOD_PIN12 12U
|
||||||
|
#define GPIOD_PIN13 13U
|
||||||
|
#define GPIOD_PIN14 14U
|
||||||
|
#define GPIOD_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOE_PIN0 0U
|
||||||
|
#define GPIOE_PIN1 1U
|
||||||
|
#define GPIOE_PIN2 2U
|
||||||
|
#define GPIOE_PIN3 3U
|
||||||
|
#define GPIOE_PIN4 4U
|
||||||
|
#define GPIOE_PIN5 5U
|
||||||
|
#define GPIOE_PIN6 6U
|
||||||
|
#define GPIOE_PIN7 7U
|
||||||
|
#define GPIOE_PIN8 8U
|
||||||
|
#define GPIOE_PIN9 9U
|
||||||
|
#define GPIOE_PIN10 10U
|
||||||
|
#define GPIOE_PIN11 11U
|
||||||
|
#define GPIOE_PIN12 12U
|
||||||
|
#define GPIOE_PIN13 13U
|
||||||
|
#define GPIOE_PIN14 14U
|
||||||
|
#define GPIOE_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOF_OSC_IN 0U
|
||||||
|
#define GPIOF_OSC_OUT 1U
|
||||||
|
#define GPIOF_PIN2 2U
|
||||||
|
#define GPIOF_PIN3 3U
|
||||||
|
#define GPIOF_PIN4 4U
|
||||||
|
#define GPIOF_PIN5 5U
|
||||||
|
#define GPIOF_PIN6 6U
|
||||||
|
#define GPIOF_PIN7 7U
|
||||||
|
#define GPIOF_PIN8 8U
|
||||||
|
#define GPIOF_PIN9 9U
|
||||||
|
#define GPIOF_PIN10 10U
|
||||||
|
#define GPIOF_PIN11 11U
|
||||||
|
#define GPIOF_PIN12 12U
|
||||||
|
#define GPIOF_PIN13 13U
|
||||||
|
#define GPIOF_PIN14 14U
|
||||||
|
#define GPIOF_PIN15 15U
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO lines assignments.
|
||||||
|
*/
|
||||||
|
#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
|
||||||
|
#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
|
||||||
|
#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
|
||||||
|
#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
|
||||||
|
#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
|
||||||
|
|
||||||
|
#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
|
||||||
|
#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
|
||||||
|
#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
|
||||||
|
|
||||||
|
#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
|
||||||
|
#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
|
||||||
|
#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
|
||||||
|
#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
|
||||||
|
#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
|
||||||
|
#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
|
||||||
|
#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
|
||||||
|
#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I/O ports initial setup, this configuration is established soon after reset
|
||||||
|
* in the initialization code.
|
||||||
|
* Please refer to the STM32 Reference Manual for details.
|
||||||
|
*/
|
||||||
|
#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
|
||||||
|
#define PIN_ODR_LOW(n) (0U << (n))
|
||||||
|
#define PIN_ODR_HIGH(n) (1U << (n))
|
||||||
|
#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
|
||||||
|
#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
|
||||||
|
#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOA setup:
|
||||||
|
*
|
||||||
|
* PA0 - BUTTON (input floating).
|
||||||
|
* PA1 - PIN1 (input pullup).
|
||||||
|
* PA2 - PIN2 (input pullup).
|
||||||
|
* PA3 - PIN3 (input pullup).
|
||||||
|
* PA4 - PIN4 (input pullup).
|
||||||
|
* PA5 - PIN5 (input pullup).
|
||||||
|
* PA6 - PIN6 (input pullup).
|
||||||
|
* PA7 - PIN7 (input pullup).
|
||||||
|
* PA8 - PIN8 (input pullup).
|
||||||
|
* PA9 - PIN9 (input pullup).
|
||||||
|
* PA10 - PIN10 (input pullup).
|
||||||
|
* PA11 - USB_DM (input floating).
|
||||||
|
* PA12 - USB_DP (input floating).
|
||||||
|
* PA13 - SWDIO (alternate 0).
|
||||||
|
* PA14 - SWCLK (alternate 0).
|
||||||
|
* PA15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_USB_DM) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_USB_DP) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
|
||||||
|
PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_USB_DM) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_USB_DP) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_SWDIO) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_SWCLK) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN7, 0U))
|
||||||
|
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOB setup:
|
||||||
|
*
|
||||||
|
* PB0 - PIN0 (input pullup).
|
||||||
|
* PB1 - PIN1 (input pullup).
|
||||||
|
* PB2 - PIN2 (input pullup).
|
||||||
|
* PB3 - PIN3 (input pullup).
|
||||||
|
* PB4 - PIN4 (input pullup).
|
||||||
|
* PB5 - PIN5 (input pullup).
|
||||||
|
* PB6 - PIN6 (input pullup).
|
||||||
|
* PB7 - PIN7 (input pullup).
|
||||||
|
* PB8 - PIN8 (input pullup).
|
||||||
|
* PB9 - PIN9 (input pullup).
|
||||||
|
* PB10 - PIN10 (input pullup).
|
||||||
|
* PB11 - PIN11 (input pullup).
|
||||||
|
* PB12 - PIN12 (input pullup).
|
||||||
|
* PB13 - SPI2_SCK (alternate 0).
|
||||||
|
* PB14 - SPI2_MISO (alternate 0).
|
||||||
|
* PB15 - SPI2_MOSI (alternate 0).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN12) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN2) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN3) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN7, 0U))
|
||||||
|
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOC setup:
|
||||||
|
*
|
||||||
|
* PC0 - MEMS_CS (output pushpull maximum).
|
||||||
|
* PC1 - PIN1 (input pullup).
|
||||||
|
* PC2 - PIN2 (input pullup).
|
||||||
|
* PC3 - PIN3 (input pullup).
|
||||||
|
* PC4 - PIN4 (input pullup).
|
||||||
|
* PC5 - PIN5 (input pullup).
|
||||||
|
* PC6 - LED_RED (output pushpull maximum).
|
||||||
|
* PC7 - LED_BLUE (output pushpull maximum).
|
||||||
|
* PC8 - LED_ORANGE (output pushpull maximum).
|
||||||
|
* PC9 - LED_GREEN (output pushpull maximum).
|
||||||
|
* PC10 - PIN10 (input pullup).
|
||||||
|
* PC11 - PIN11 (input pullup).
|
||||||
|
* PC12 - PIN12 (input pullup).
|
||||||
|
* PC13 - PIN13 (input pullup).
|
||||||
|
* PC14 - OSC32_IN (input floating).
|
||||||
|
* PC15 - OSC32_OUT (input floating).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN5) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_RED) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_RED) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN5) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_RED) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
|
||||||
|
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOD setup:
|
||||||
|
*
|
||||||
|
* PD0 - PIN0 (input pullup).
|
||||||
|
* PD1 - PIN1 (input pullup).
|
||||||
|
* PD2 - PIN2 (input pullup).
|
||||||
|
* PD3 - PIN3 (input pullup).
|
||||||
|
* PD4 - PIN4 (input pullup).
|
||||||
|
* PD5 - PIN5 (input pullup).
|
||||||
|
* PD6 - PIN6 (input pullup).
|
||||||
|
* PD7 - PIN7 (input pullup).
|
||||||
|
* PD8 - PIN8 (input pullup).
|
||||||
|
* PD9 - PIN9 (input pullup).
|
||||||
|
* PD10 - PIN10 (input pullup).
|
||||||
|
* PD11 - PIN11 (input pullup).
|
||||||
|
* PD12 - PIN12 (input pullup).
|
||||||
|
* PD13 - PIN13 (input pullup).
|
||||||
|
* PD14 - PIN14 (input pullup).
|
||||||
|
* PD15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN7, 0U))
|
||||||
|
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOE setup:
|
||||||
|
*
|
||||||
|
* PE0 - PIN0 (input pullup).
|
||||||
|
* PE1 - PIN1 (input pullup).
|
||||||
|
* PE2 - PIN2 (input pullup).
|
||||||
|
* PE3 - PIN3 (input pullup).
|
||||||
|
* PE4 - PIN4 (input pullup).
|
||||||
|
* PE5 - PIN5 (input pullup).
|
||||||
|
* PE6 - PIN6 (input pullup).
|
||||||
|
* PE7 - PIN7 (input pullup).
|
||||||
|
* PE8 - PIN8 (input pullup).
|
||||||
|
* PE9 - PIN9 (input pullup).
|
||||||
|
* PE10 - PIN10 (input pullup).
|
||||||
|
* PE11 - PIN11 (input pullup).
|
||||||
|
* PE12 - PIN12 (input pullup).
|
||||||
|
* PE13 - PIN13 (input pullup).
|
||||||
|
* PE14 - PIN14 (input pullup).
|
||||||
|
* PE15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN7, 0U))
|
||||||
|
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOF setup:
|
||||||
|
*
|
||||||
|
* PF0 - OSC_IN (input floating).
|
||||||
|
* PF1 - OSC_OUT (input floating).
|
||||||
|
* PF2 - PIN2 (input pullup).
|
||||||
|
* PF3 - PIN3 (input pullup).
|
||||||
|
* PF4 - PIN4 (input pullup).
|
||||||
|
* PF5 - PIN5 (input pullup).
|
||||||
|
* PF6 - PIN6 (input pullup).
|
||||||
|
* PF7 - PIN7 (input pullup).
|
||||||
|
* PF8 - PIN8 (input pullup).
|
||||||
|
* PF9 - PIN9 (input pullup).
|
||||||
|
* PF10 - PIN10 (input pullup).
|
||||||
|
* PF11 - PIN11 (input pullup).
|
||||||
|
* PF12 - PIN12 (input pullup).
|
||||||
|
* PF13 - PIN13 (input pullup).
|
||||||
|
* PF14 - PIN14 (input pullup).
|
||||||
|
* PF15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN7, 0U))
|
||||||
|
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN15, 0U))
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(_FROM_ASM_)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void boardInit(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* _FROM_ASM_ */
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
@ -0,0 +1,5 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
|
@ -0,0 +1,703 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- STM32F0xx board Template -->
|
||||||
|
<board
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd">
|
||||||
|
<configuration_settings>
|
||||||
|
<templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path>
|
||||||
|
<output_path>..</output_path>
|
||||||
|
<hal_version>3.0.x</hal_version>
|
||||||
|
</configuration_settings>
|
||||||
|
<board_name>ST STM32F072B-Discovery</board_name>
|
||||||
|
<board_id>ST_STM32F072B_DISCOVERY</board_id>
|
||||||
|
<board_functions></board_functions>
|
||||||
|
<subtype>STM32F072xB</subtype>
|
||||||
|
<clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0"
|
||||||
|
LSEBypass="false" LSEDrive="3 High Drive (default)" />
|
||||||
|
<ports>
|
||||||
|
<GPIOA>
|
||||||
|
<pin0
|
||||||
|
ID="BUTTON"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID="USB_DM"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID="USB_DP"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SWDIO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SWCLK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullDown"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOA>
|
||||||
|
<GPIOB>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SPI2_SCK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SPI2_MISO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="SPI2_MOSI"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOB>
|
||||||
|
<GPIOC>
|
||||||
|
<pin0
|
||||||
|
ID="MEMS_CS"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID="LED_RED"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID="LED_BLUE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID="LED_ORANGE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" ></pin8>
|
||||||
|
<pin9
|
||||||
|
ID="LED_GREEN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="OSC32_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="OSC32_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOC>
|
||||||
|
<GPIOD>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOD>
|
||||||
|
<GPIOE>
|
||||||
|
<pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
</GPIOE>
|
||||||
|
<GPIOF>
|
||||||
|
<pin0
|
||||||
|
ID="OSC_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID="OSC_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOF>
|
||||||
|
</ports>
|
||||||
|
</board>
|
7
keyboards/at_at/660m/bootloader_defs.h
Normal file
7
keyboards/at_at/660m/bootloader_defs.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* Address for jumping to bootloader on STM32 chips. */
|
||||||
|
/* It is chip dependent, the correct number can be looked up here (page 175):
|
||||||
|
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
* This also requires a patch to chibios:
|
||||||
|
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
*/
|
||||||
|
#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
|
524
keyboards/at_at/660m/chconf.h
Normal file
524
keyboards/at_at/660m/chconf.h
Normal file
@ -0,0 +1,524 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_FREQUENCY 10000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
|
||||||
|
/* Use __WFI in the idle thread for waiting. Does lower the power
|
||||||
|
* consumption. */
|
||||||
|
#define CORTEX_ENABLE_WFI_IDLE TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_TM FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMCORE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_HEAP FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMPOOLS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_DYNAMIC FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p chThdInit() API.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
66
keyboards/at_at/660m/config.h
Normal file
66
keyboards/at_at/660m/config.h
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xA22A
|
||||||
|
#define PRODUCT_ID 0x6600
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||||
|
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||||
|
#define MANUFACTURER AT-AT
|
||||||
|
#define PRODUCT 660M
|
||||||
|
#define DESCRIPTION 660M Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B9, B8, B7, B6, B5, B3, B4, B0 }
|
||||||
|
#define MATRIX_ROW_PINS { A3, A4, A5, A0, A1 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
354
keyboards/at_at/660m/halconf.h
Normal file
354
keyboards/at_at/660m/halconf.h
Normal file
@ -0,0 +1,354 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _HALCONF_H_
|
||||||
|
#define _HALCONF_H_
|
||||||
|
|
||||||
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PAL TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ADC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CAN FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_DAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the EXT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_EXT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_GPT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2C TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2S FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ICU FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MMC_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PWM TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_RTC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SDC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL_USB FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SPI TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_UART FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_USB TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WDG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_ZERO_COPY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define MMC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_RETRY 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_MMC_SUPPORT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 64 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 64 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define USB_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _HALCONF_H_ */
|
||||||
|
|
||||||
|
/** @} */
|
18
keyboards/at_at/660m/info.json
Normal file
18
keyboards/at_at/660m/info.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "AT-AT 660M",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "adrientetar",
|
||||||
|
"width": 16.5,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15.5, "y":0},
|
||||||
|
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15.5, "y":1},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||||
|
{"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.25}, {"label":"↑", "x":14.5, "y":3},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6.25}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Fn", "x":11, "y":4, "w":1.25}, {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, {"label":"←", "x":13.5, "y":4}, {"label":"↓", "x":14.5, "y":4}, {"label":"→", "x":15.5, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
43
keyboards/at_at/660m/keymaps/default/keymap.c
Normal file
43
keyboards/at_at/660m/keymaps/default/keymap.c
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BASE 0
|
||||||
|
#define _FN1 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = LAYOUT(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLU,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_MPRV, KC_MNXT, KC_MPLY, KC_VOLD,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, _______, _______, KC_PGUP,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
|
)
|
||||||
|
};
|
176
keyboards/at_at/660m/mcuconf.h
Normal file
176
keyboards/at_at/660m/mcuconf.h
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MCUCONF_H_
|
||||||
|
#define _MCUCONF_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* STM32F0xx drivers configuration.
|
||||||
|
* The following settings override the default settings present in
|
||||||
|
* the various device driver implementation headers.
|
||||||
|
* Note that the settings for each driver only have effect if the whole
|
||||||
|
* driver is enabled in halconf.h.
|
||||||
|
*
|
||||||
|
* IRQ priorities:
|
||||||
|
* 3...0 Lowest...Highest.
|
||||||
|
*
|
||||||
|
* DMA priorities:
|
||||||
|
* 0...3 Lowest...Highest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STM32F0xx_MCUCONF
|
||||||
|
// #define STM32F070xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_NO_INIT FALSE
|
||||||
|
#define STM32_PVD_ENABLE FALSE
|
||||||
|
#define STM32_PLS STM32_PLS_LEV0
|
||||||
|
#define STM32_HSI_ENABLED TRUE
|
||||||
|
#define STM32_HSI14_ENABLED TRUE
|
||||||
|
#define STM32_HSI48_ENABLED FALSE
|
||||||
|
#define STM32_LSI_ENABLED TRUE
|
||||||
|
#define STM32_HSE_ENABLED FALSE
|
||||||
|
#define STM32_LSE_ENABLED FALSE
|
||||||
|
#define STM32_SW STM32_SW_PLL
|
||||||
|
#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
|
||||||
|
#define STM32_PREDIV_VALUE 1
|
||||||
|
#define STM32_PLLMUL_VALUE 12
|
||||||
|
#define STM32_HPRE STM32_HPRE_DIV1
|
||||||
|
#define STM32_PPRE STM32_PPRE_DIV1
|
||||||
|
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||||
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||||
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
|
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||||
|
#define STM32_USBSW STM32_USBSW_HSI48
|
||||||
|
#define STM32_CECSW STM32_CECSW_HSI
|
||||||
|
#define STM32_I2C1SW STM32_I2C1SW_HSI
|
||||||
|
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||||
|
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ADC_USE_ADC1 FALSE
|
||||||
|
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_IRQ_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_GPT_USE_TIM1 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM2 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM3 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM14 FALSE
|
||||||
|
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM2_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM3_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM14_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
#define STM32_I2C_USE_I2C2 FALSE
|
||||||
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||||
|
#define STM32_I2C_I2C1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_I2C_I2C2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_I2C_USE_DMA TRUE
|
||||||
|
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||||
|
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||||
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ICU driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ICU_USE_TIM1 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM2 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM3 FALSE
|
||||||
|
#define STM32_ICU_TIM1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_ICU_TIM2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_ICU_TIM3_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PWM driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_PWM_USE_ADVANCED FALSE
|
||||||
|
#define STM32_PWM_USE_TIM1 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM2 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM3 TRUE
|
||||||
|
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SERIAL_USE_USART1 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART2 FALSE
|
||||||
|
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||||
|
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SPI_USE_SPI1 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI2 TRUE
|
||||||
|
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI1_IRQ_PRIORITY 2
|
||||||
|
#define STM32_SPI_SPI2_IRQ_PRIORITY 2
|
||||||
|
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||||
|
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||||
|
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ST driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ST_IRQ_PRIORITY 2
|
||||||
|
#define STM32_ST_USE_TIMER 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UART driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_UART_USE_USART1 FALSE
|
||||||
|
#define STM32_UART_USE_USART2 FALSE
|
||||||
|
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_USB_USE_USB1 TRUE
|
||||||
|
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||||
|
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
#endif /* _MCUCONF_H_ */
|
14
keyboards/at_at/660m/readme.md
Normal file
14
keyboards/at_at/660m/readme.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# AT-AT 660M
|
||||||
|
|
||||||
|
660M keyboard
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Adrien Tétar](https://github.com/adrientetar)
|
||||||
|
Hardware Supported: AT-AT 660M
|
||||||
|
Hardware Availability: <https://github.com/adrientetar/660m>
|
||||||
|
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make at_at/660m:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
53
keyboards/at_at/660m/rules.mk
Normal file
53
keyboards/at_at/660m/rules.mk
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# project specific files
|
||||||
|
# SRC = ssd1306.c
|
||||||
|
## chip/board settings
|
||||||
|
# the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32F0xx
|
||||||
|
# linker script to use
|
||||||
|
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <this_dir>/ld/
|
||||||
|
MCU_LDSCRIPT = STM32F072xB
|
||||||
|
# startup code to use
|
||||||
|
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP = stm32f0xx
|
||||||
|
# it should exist either in <chibios>/os/hal/boards/
|
||||||
|
# or <this_dir>/boards
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
# Cortex version
|
||||||
|
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||||
|
MCU = cortex-m0
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 6
|
||||||
|
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||||
|
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||||
|
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||||
|
# a custom board definition that you plan to reuse).
|
||||||
|
# If you're not setting it here, leave it commented out.
|
||||||
|
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||||
|
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
# This also requires a patch to chibios:
|
||||||
|
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||||
|
|
||||||
|
# Options to pass to dfu-util when flashing
|
||||||
|
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||||
|
DFU_SUFFIX_ARGS = -p df11 -v 0483
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
|
||||||
|
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
CUSTOM_MATRIX = no # Custom matrix file
|
||||||
|
# BACKLIGHT_ENABLE = yes
|
||||||
|
# RGBLIGHT_ENABLE = yes
|
||||||
|
NO_USB_STARTUP_CHECK = yes # Workaround for issue 6369
|
||||||
|
|
@ -15,19 +15,15 @@
|
|||||||
|
|
||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32a
|
MCU = atmega32a
|
||||||
PROTOCOL = VUSB
|
|
||||||
|
|
||||||
# unsupported features for now
|
# Bootloader selection
|
||||||
NO_UART = yes
|
# Teensy halfkay
|
||||||
NO_SUSPEND_POWER_DOWN = yes
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
# processor frequency
|
# LUFA DFU lufa-dfu
|
||||||
F_CPU = 12000000
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
# Bootloader
|
# ATmega328P USBasp
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
|
||||||
BOOTLOADER = bootloadHID
|
BOOTLOADER = bootloadHID
|
||||||
|
|
||||||
# build options
|
# build options
|
||||||
@ -45,6 +41,3 @@ OPT_DEFS = -DDEBUG_LEVEL=0
|
|||||||
# custom matrix setup
|
# custom matrix setup
|
||||||
CUSTOM_MATRIX = yes
|
CUSTOM_MATRIX = yes
|
||||||
SRC = matrix.c i2c.c
|
SRC = matrix.c i2c.c
|
||||||
|
|
||||||
# programming options
|
|
||||||
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
|
|
||||||
|
@ -1,45 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
@ -1,51 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
|
@ -1,51 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
|
@ -187,6 +187,101 @@
|
|||||||
{"label":"Down", "x":16.25, "y":5.5},
|
{"label":"Down", "x":16.25, "y":5.5},
|
||||||
{"label":"Right", "x":17.25, "y":5.5}
|
{"label":"Right", "x":17.25, "y":5.5}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_tkl_jis": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":2, "y":0},
|
||||||
|
{"label":"F2", "x":3, "y":0},
|
||||||
|
{"label":"F3", "x":4, "y":0},
|
||||||
|
{"label":"F4", "x":5, "y":0},
|
||||||
|
{"label":"F5", "x":6.5, "y":0},
|
||||||
|
{"label":"F6", "x":7.5, "y":0},
|
||||||
|
{"label":"F7", "x":8.5, "y":0},
|
||||||
|
{"label":"F8", "x":9.5, "y":0},
|
||||||
|
{"label":"F9", "x":11, "y":0},
|
||||||
|
{"label":"F10", "x":12, "y":0},
|
||||||
|
{"label":"F11", "x":13, "y":0},
|
||||||
|
{"label":"F12", "x":14, "y":0},
|
||||||
|
{"label":"Print Screen", "x":15.25, "y":0},
|
||||||
|
{"label":"Scroll Lock", "x":16.25, "y":0},
|
||||||
|
{"label":"Pause", "x":17.25, "y":0},
|
||||||
|
{"label":"Half-width/Full-width", "x":0, "y":1.5},
|
||||||
|
{"label":"1", "x":1, "y":1.5},
|
||||||
|
{"label":"2", "x":2, "y":1.5},
|
||||||
|
{"label":"3", "x":3, "y":1.5},
|
||||||
|
{"label":"4", "x":4, "y":1.5},
|
||||||
|
{"label":"5", "x":5, "y":1.5},
|
||||||
|
{"label":"6", "x":6, "y":1.5},
|
||||||
|
{"label":"7", "x":7, "y":1.5},
|
||||||
|
{"label":"8", "x":8, "y":1.5},
|
||||||
|
{"label":"9", "x":9, "y":1.5},
|
||||||
|
{"label":"0", "x":10, "y":1.5},
|
||||||
|
{"label":"-", "x":11, "y":1.5},
|
||||||
|
{"label":"^", "x":12, "y":1.5},
|
||||||
|
{"label":"Yen", "x":13, "y":1.5},
|
||||||
|
{"label":"Backspace", "x":14, "y":1.5},
|
||||||
|
{"label":"Insert", "x":15.25, "y":1.5},
|
||||||
|
{"label":"Home", "x":16.25, "y":1.5},
|
||||||
|
{"label":"Page Up", "x":17.25, "y":1.5},
|
||||||
|
{"label":"Tab", "x":0, "y":2.5, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2.5},
|
||||||
|
{"label":"W", "x":2.5, "y":2.5},
|
||||||
|
{"label":"E", "x":3.5, "y":2.5},
|
||||||
|
{"label":"R", "x":4.5, "y":2.5},
|
||||||
|
{"label":"T", "x":5.5, "y":2.5},
|
||||||
|
{"label":"Y", "x":6.5, "y":2.5},
|
||||||
|
{"label":"U", "x":7.5, "y":2.5},
|
||||||
|
{"label":"I", "x":8.5, "y":2.5},
|
||||||
|
{"label":"O", "x":9.5, "y":2.5},
|
||||||
|
{"label":"P", "x":10.5, "y":2.5},
|
||||||
|
{"label":"@", "x":11.5, "y":2.5},
|
||||||
|
{"label":"[", "x":12.5, "y":2.5},
|
||||||
|
{"label":"Del", "x":15.25, "y":2.5},
|
||||||
|
{"label":"End", "x":16.25, "y":2.5},
|
||||||
|
{"label":"Page Down", "x":17.25, "y":2.5},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3.5},
|
||||||
|
{"label":"S", "x":2.75, "y":3.5},
|
||||||
|
{"label":"D", "x":3.75, "y":3.5},
|
||||||
|
{"label":"F", "x":4.75, "y":3.5},
|
||||||
|
{"label":"G", "x":5.75, "y":3.5},
|
||||||
|
{"label":"H", "x":6.75, "y":3.5},
|
||||||
|
{"label":"J", "x":7.75, "y":3.5},
|
||||||
|
{"label":"K", "x":8.75, "y":3.5},
|
||||||
|
{"label":"L", "x":9.75, "y":3.5},
|
||||||
|
{"label":";", "x":10.75, "y":3.5},
|
||||||
|
{"label":":", "x":11.75, "y":3.5},
|
||||||
|
{"label":"]", "x":12.75, "y":3.5},
|
||||||
|
{"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2},
|
||||||
|
{"label":"Shift", "x":0, "y":4.5, "w":2.25},
|
||||||
|
{"label":"Z", "x":2.25, "y":4.5},
|
||||||
|
{"label":"X", "x":3.25, "y":4.5},
|
||||||
|
{"label":"C", "x":4.25, "y":4.5},
|
||||||
|
{"label":"V", "x":5.25, "y":4.5},
|
||||||
|
{"label":"B", "x":6.25, "y":4.5},
|
||||||
|
{"label":"N", "x":7.25, "y":4.5},
|
||||||
|
{"label":"M", "x":8.25, "y":4.5},
|
||||||
|
{"label":",", "x":9.25, "y":4.5},
|
||||||
|
{"label":".", "x":10.25, "y":4.5},
|
||||||
|
{"label":"/", "x":11.25, "y":4.5},
|
||||||
|
{"label":"\\", "x":12.25, "y":4.5},
|
||||||
|
{"label":"Shift", "x":13.25, "y":4.5, "w":1.75},
|
||||||
|
{"label":"Up", "x":16.25, "y":4.5},
|
||||||
|
{"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":5.5},
|
||||||
|
{"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
|
||||||
|
{"label":"Muhenkan", "x":3.5, "y":5.5},
|
||||||
|
{"label":"Space", "x":4.5, "y":5.5, "w":4.5},
|
||||||
|
{"label":"Henkan", "x":9, "y":5.5, "w":1.25},
|
||||||
|
{"label":"Kana", "x":10.25, "y":5.5, "w":1.25},
|
||||||
|
{"label":"Alt", "x":11.5, "y":5.5, "w":1.25},
|
||||||
|
{"label":"Fn", "x":12.75, "y":5.5},
|
||||||
|
{"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25},
|
||||||
|
{"label":"Left", "x":15.25, "y":5.5},
|
||||||
|
{"label":"Down", "x":16.25, "y":5.5},
|
||||||
|
{"label":"Right", "x":17.25, "y":5.5}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,42 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
BOOTLOADER=atmel-dfu
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
|
@ -1,51 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
|
@ -1,51 +1,15 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# Teensy halfkay
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
# Pro Micro caterina
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
# Atmel DFU atmel-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
# LUFA DFU lufa-dfu
|
||||||
#
|
# QMK DFU qmk-dfu
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
# ATmega32A bootloadHID
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
# ATmega328P USBasp
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
BOOTLOADER = atmel-dfu
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
|
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
|
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief PAL setup.
|
||||||
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
|
* This variable is used by the HAL when initializing the PAL driver.
|
||||||
|
*/
|
||||||
|
const PALConfig pal_default_config = {
|
||||||
|
#if STM32_HAS_GPIOA
|
||||||
|
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||||
|
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOB
|
||||||
|
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
||||||
|
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOC
|
||||||
|
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
||||||
|
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOD
|
||||||
|
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
||||||
|
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOE
|
||||||
|
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
||||||
|
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOF
|
||||||
|
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
||||||
|
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOG
|
||||||
|
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
||||||
|
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOH
|
||||||
|
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
||||||
|
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOI
|
||||||
|
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||||
|
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Early initialization code.
|
||||||
|
* @details This initialization must be performed just after stack setup
|
||||||
|
* and before any other initialization.
|
||||||
|
*/
|
||||||
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
|
stm32_clock_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card write protection detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Board-specific initialization code.
|
||||||
|
* @todo Add your board-specific code, if any.
|
||||||
|
*/
|
||||||
|
void boardInit(void) {
|
||||||
|
}
|
@ -0,0 +1,922 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup for ST STM32F072B-Discovery board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board identifier.
|
||||||
|
*/
|
||||||
|
#define BOARD_ST_STM32F072B_DISCOVERY
|
||||||
|
#define BOARD_NAME "ST STM32F072B-Discovery"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board oscillators-related settings.
|
||||||
|
* NOTE: HSE not fitted.
|
||||||
|
*/
|
||||||
|
#if !defined(STM32_LSECLK)
|
||||||
|
#define STM32_LSECLK 32768
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_LSEDRV (3U << 3U)
|
||||||
|
|
||||||
|
#if !defined(STM32_HSECLK)
|
||||||
|
#define STM32_HSECLK 0U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_HSE_BYPASS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCU type as defined in the ST header.
|
||||||
|
*/
|
||||||
|
#define STM32F072xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO pins assignments.
|
||||||
|
*/
|
||||||
|
#define GPIOA_BUTTON 0U
|
||||||
|
#define GPIOA_PIN1 1U
|
||||||
|
#define GPIOA_PIN2 2U
|
||||||
|
#define GPIOA_PIN3 3U
|
||||||
|
#define GPIOA_PIN4 4U
|
||||||
|
#define GPIOA_PIN5 5U
|
||||||
|
#define GPIOA_PIN6 6U
|
||||||
|
#define GPIOA_PIN7 7U
|
||||||
|
#define GPIOA_PIN8 8U
|
||||||
|
#define GPIOA_PIN9 9U
|
||||||
|
#define GPIOA_PIN10 10U
|
||||||
|
#define GPIOA_USB_DM 11U
|
||||||
|
#define GPIOA_USB_DP 12U
|
||||||
|
#define GPIOA_SWDIO 13U
|
||||||
|
#define GPIOA_SWCLK 14U
|
||||||
|
#define GPIOA_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOB_PIN0 0U
|
||||||
|
#define GPIOB_PIN1 1U
|
||||||
|
#define GPIOB_PIN2 2U
|
||||||
|
#define GPIOB_PIN3 3U
|
||||||
|
#define GPIOB_PIN4 4U
|
||||||
|
#define GPIOB_PIN5 5U
|
||||||
|
#define GPIOB_PIN6 6U
|
||||||
|
#define GPIOB_PIN7 7U
|
||||||
|
#define GPIOB_PIN8 8U
|
||||||
|
#define GPIOB_PIN9 9U
|
||||||
|
#define GPIOB_PIN10 10U
|
||||||
|
#define GPIOB_PIN11 11U
|
||||||
|
#define GPIOB_PIN12 12U
|
||||||
|
#define GPIOB_SPI2_SCK 13U
|
||||||
|
#define GPIOB_SPI2_MISO 14U
|
||||||
|
#define GPIOB_SPI2_MOSI 15U
|
||||||
|
|
||||||
|
#define GPIOC_MEMS_CS 0U
|
||||||
|
#define GPIOC_PIN1 1U
|
||||||
|
#define GPIOC_PIN2 2U
|
||||||
|
#define GPIOC_PIN3 3U
|
||||||
|
#define GPIOC_PIN4 4U
|
||||||
|
#define GPIOC_PIN5 5U
|
||||||
|
#define GPIOC_LED_RED 6U
|
||||||
|
#define GPIOC_LED_BLUE 7U
|
||||||
|
#define GPIOC_LED_ORANGE 8U
|
||||||
|
#define GPIOC_LED_GREEN 9U
|
||||||
|
#define GPIOC_PIN10 10U
|
||||||
|
#define GPIOC_PIN11 11U
|
||||||
|
#define GPIOC_PIN12 12U
|
||||||
|
#define GPIOC_PIN13 13U
|
||||||
|
#define GPIOC_OSC32_IN 14U
|
||||||
|
#define GPIOC_OSC32_OUT 15U
|
||||||
|
|
||||||
|
#define GPIOD_PIN0 0U
|
||||||
|
#define GPIOD_PIN1 1U
|
||||||
|
#define GPIOD_PIN2 2U
|
||||||
|
#define GPIOD_PIN3 3U
|
||||||
|
#define GPIOD_PIN4 4U
|
||||||
|
#define GPIOD_PIN5 5U
|
||||||
|
#define GPIOD_PIN6 6U
|
||||||
|
#define GPIOD_PIN7 7U
|
||||||
|
#define GPIOD_PIN8 8U
|
||||||
|
#define GPIOD_PIN9 9U
|
||||||
|
#define GPIOD_PIN10 10U
|
||||||
|
#define GPIOD_PIN11 11U
|
||||||
|
#define GPIOD_PIN12 12U
|
||||||
|
#define GPIOD_PIN13 13U
|
||||||
|
#define GPIOD_PIN14 14U
|
||||||
|
#define GPIOD_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOE_PIN0 0U
|
||||||
|
#define GPIOE_PIN1 1U
|
||||||
|
#define GPIOE_PIN2 2U
|
||||||
|
#define GPIOE_PIN3 3U
|
||||||
|
#define GPIOE_PIN4 4U
|
||||||
|
#define GPIOE_PIN5 5U
|
||||||
|
#define GPIOE_PIN6 6U
|
||||||
|
#define GPIOE_PIN7 7U
|
||||||
|
#define GPIOE_PIN8 8U
|
||||||
|
#define GPIOE_PIN9 9U
|
||||||
|
#define GPIOE_PIN10 10U
|
||||||
|
#define GPIOE_PIN11 11U
|
||||||
|
#define GPIOE_PIN12 12U
|
||||||
|
#define GPIOE_PIN13 13U
|
||||||
|
#define GPIOE_PIN14 14U
|
||||||
|
#define GPIOE_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOF_OSC_IN 0U
|
||||||
|
#define GPIOF_OSC_OUT 1U
|
||||||
|
#define GPIOF_PIN2 2U
|
||||||
|
#define GPIOF_PIN3 3U
|
||||||
|
#define GPIOF_PIN4 4U
|
||||||
|
#define GPIOF_PIN5 5U
|
||||||
|
#define GPIOF_PIN6 6U
|
||||||
|
#define GPIOF_PIN7 7U
|
||||||
|
#define GPIOF_PIN8 8U
|
||||||
|
#define GPIOF_PIN9 9U
|
||||||
|
#define GPIOF_PIN10 10U
|
||||||
|
#define GPIOF_PIN11 11U
|
||||||
|
#define GPIOF_PIN12 12U
|
||||||
|
#define GPIOF_PIN13 13U
|
||||||
|
#define GPIOF_PIN14 14U
|
||||||
|
#define GPIOF_PIN15 15U
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO lines assignments.
|
||||||
|
*/
|
||||||
|
#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
|
||||||
|
#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
|
||||||
|
#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
|
||||||
|
#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
|
||||||
|
#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
|
||||||
|
|
||||||
|
#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
|
||||||
|
#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
|
||||||
|
#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
|
||||||
|
|
||||||
|
#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
|
||||||
|
#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
|
||||||
|
#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
|
||||||
|
#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
|
||||||
|
#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
|
||||||
|
#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
|
||||||
|
#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
|
||||||
|
#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I/O ports initial setup, this configuration is established soon after reset
|
||||||
|
* in the initialization code.
|
||||||
|
* Please refer to the STM32 Reference Manual for details.
|
||||||
|
*/
|
||||||
|
#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
|
||||||
|
#define PIN_ODR_LOW(n) (0U << (n))
|
||||||
|
#define PIN_ODR_HIGH(n) (1U << (n))
|
||||||
|
#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
|
||||||
|
#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
|
||||||
|
#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOA setup:
|
||||||
|
*
|
||||||
|
* PA0 - BUTTON (input floating).
|
||||||
|
* PA1 - PIN1 (input pullup).
|
||||||
|
* PA2 - PIN2 (input pullup).
|
||||||
|
* PA3 - PIN3 (input pullup).
|
||||||
|
* PA4 - PIN4 (input pullup).
|
||||||
|
* PA5 - PIN5 (input pullup).
|
||||||
|
* PA6 - PIN6 (input pullup).
|
||||||
|
* PA7 - PIN7 (input pullup).
|
||||||
|
* PA8 - PIN8 (input pullup).
|
||||||
|
* PA9 - PIN9 (input pullup).
|
||||||
|
* PA10 - PIN10 (input pullup).
|
||||||
|
* PA11 - USB_DM (input floating).
|
||||||
|
* PA12 - USB_DP (input floating).
|
||||||
|
* PA13 - SWDIO (alternate 0).
|
||||||
|
* PA14 - SWCLK (alternate 0).
|
||||||
|
* PA15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_USB_DM) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_USB_DP) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
|
||||||
|
PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_USB_DM) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_USB_DP) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_SWDIO) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_SWCLK) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN7, 0U))
|
||||||
|
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOB setup:
|
||||||
|
*
|
||||||
|
* PB0 - PIN0 (input pullup).
|
||||||
|
* PB1 - PIN1 (input pullup).
|
||||||
|
* PB2 - PIN2 (input pullup).
|
||||||
|
* PB3 - PIN3 (input pullup).
|
||||||
|
* PB4 - PIN4 (input pullup).
|
||||||
|
* PB5 - PIN5 (input pullup).
|
||||||
|
* PB6 - PIN6 (input pullup).
|
||||||
|
* PB7 - PIN7 (input pullup).
|
||||||
|
* PB8 - PIN8 (input pullup).
|
||||||
|
* PB9 - PIN9 (input pullup).
|
||||||
|
* PB10 - PIN10 (input pullup).
|
||||||
|
* PB11 - PIN11 (input pullup).
|
||||||
|
* PB12 - PIN12 (input pullup).
|
||||||
|
* PB13 - SPI2_SCK (alternate 0).
|
||||||
|
* PB14 - SPI2_MISO (alternate 0).
|
||||||
|
* PB15 - SPI2_MOSI (alternate 0).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN12) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN2) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN3) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN7, 0U))
|
||||||
|
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOC setup:
|
||||||
|
*
|
||||||
|
* PC0 - MEMS_CS (output pushpull maximum).
|
||||||
|
* PC1 - PIN1 (input pullup).
|
||||||
|
* PC2 - PIN2 (input pullup).
|
||||||
|
* PC3 - PIN3 (input pullup).
|
||||||
|
* PC4 - PIN4 (input pullup).
|
||||||
|
* PC5 - PIN5 (input pullup).
|
||||||
|
* PC6 - LED_RED (output pushpull maximum).
|
||||||
|
* PC7 - LED_BLUE (output pushpull maximum).
|
||||||
|
* PC8 - LED_ORANGE (output pushpull maximum).
|
||||||
|
* PC9 - LED_GREEN (output pushpull maximum).
|
||||||
|
* PC10 - PIN10 (input pullup).
|
||||||
|
* PC11 - PIN11 (input pullup).
|
||||||
|
* PC12 - PIN12 (input pullup).
|
||||||
|
* PC13 - PIN13 (input pullup).
|
||||||
|
* PC14 - OSC32_IN (input floating).
|
||||||
|
* PC15 - OSC32_OUT (input floating).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN5) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_RED) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_RED) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN5) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_RED) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
|
||||||
|
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOD setup:
|
||||||
|
*
|
||||||
|
* PD0 - PIN0 (input pullup).
|
||||||
|
* PD1 - PIN1 (input pullup).
|
||||||
|
* PD2 - PIN2 (input pullup).
|
||||||
|
* PD3 - PIN3 (input pullup).
|
||||||
|
* PD4 - PIN4 (input pullup).
|
||||||
|
* PD5 - PIN5 (input pullup).
|
||||||
|
* PD6 - PIN6 (input pullup).
|
||||||
|
* PD7 - PIN7 (input pullup).
|
||||||
|
* PD8 - PIN8 (input pullup).
|
||||||
|
* PD9 - PIN9 (input pullup).
|
||||||
|
* PD10 - PIN10 (input pullup).
|
||||||
|
* PD11 - PIN11 (input pullup).
|
||||||
|
* PD12 - PIN12 (input pullup).
|
||||||
|
* PD13 - PIN13 (input pullup).
|
||||||
|
* PD14 - PIN14 (input pullup).
|
||||||
|
* PD15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN7, 0U))
|
||||||
|
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOE setup:
|
||||||
|
*
|
||||||
|
* PE0 - PIN0 (input pullup).
|
||||||
|
* PE1 - PIN1 (input pullup).
|
||||||
|
* PE2 - PIN2 (input pullup).
|
||||||
|
* PE3 - PIN3 (input pullup).
|
||||||
|
* PE4 - PIN4 (input pullup).
|
||||||
|
* PE5 - PIN5 (input pullup).
|
||||||
|
* PE6 - PIN6 (input pullup).
|
||||||
|
* PE7 - PIN7 (input pullup).
|
||||||
|
* PE8 - PIN8 (input pullup).
|
||||||
|
* PE9 - PIN9 (input pullup).
|
||||||
|
* PE10 - PIN10 (input pullup).
|
||||||
|
* PE11 - PIN11 (input pullup).
|
||||||
|
* PE12 - PIN12 (input pullup).
|
||||||
|
* PE13 - PIN13 (input pullup).
|
||||||
|
* PE14 - PIN14 (input pullup).
|
||||||
|
* PE15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN7, 0U))
|
||||||
|
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOF setup:
|
||||||
|
*
|
||||||
|
* PF0 - OSC_IN (input floating).
|
||||||
|
* PF1 - OSC_OUT (input floating).
|
||||||
|
* PF2 - PIN2 (input pullup).
|
||||||
|
* PF3 - PIN3 (input pullup).
|
||||||
|
* PF4 - PIN4 (input pullup).
|
||||||
|
* PF5 - PIN5 (input pullup).
|
||||||
|
* PF6 - PIN6 (input pullup).
|
||||||
|
* PF7 - PIN7 (input pullup).
|
||||||
|
* PF8 - PIN8 (input pullup).
|
||||||
|
* PF9 - PIN9 (input pullup).
|
||||||
|
* PF10 - PIN10 (input pullup).
|
||||||
|
* PF11 - PIN11 (input pullup).
|
||||||
|
* PF12 - PIN12 (input pullup).
|
||||||
|
* PF13 - PIN13 (input pullup).
|
||||||
|
* PF14 - PIN14 (input pullup).
|
||||||
|
* PF15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN7, 0U))
|
||||||
|
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN15, 0U))
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(_FROM_ASM_)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void boardInit(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* _FROM_ASM_ */
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
@ -0,0 +1,5 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
|
@ -0,0 +1,703 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- STM32F0xx board Template -->
|
||||||
|
<board
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd">
|
||||||
|
<configuration_settings>
|
||||||
|
<templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path>
|
||||||
|
<output_path>..</output_path>
|
||||||
|
<hal_version>3.0.x</hal_version>
|
||||||
|
</configuration_settings>
|
||||||
|
<board_name>ST STM32F072B-Discovery</board_name>
|
||||||
|
<board_id>ST_STM32F072B_DISCOVERY</board_id>
|
||||||
|
<board_functions></board_functions>
|
||||||
|
<subtype>STM32F072xB</subtype>
|
||||||
|
<clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0"
|
||||||
|
LSEBypass="false" LSEDrive="3 High Drive (default)" />
|
||||||
|
<ports>
|
||||||
|
<GPIOA>
|
||||||
|
<pin0
|
||||||
|
ID="BUTTON"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID="USB_DM"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID="USB_DP"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SWDIO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SWCLK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullDown"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOA>
|
||||||
|
<GPIOB>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SPI2_SCK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SPI2_MISO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="SPI2_MOSI"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOB>
|
||||||
|
<GPIOC>
|
||||||
|
<pin0
|
||||||
|
ID="MEMS_CS"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID="LED_RED"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID="LED_BLUE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID="LED_ORANGE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" ></pin8>
|
||||||
|
<pin9
|
||||||
|
ID="LED_GREEN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="OSC32_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="OSC32_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOC>
|
||||||
|
<GPIOD>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOD>
|
||||||
|
<GPIOE>
|
||||||
|
<pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
</GPIOE>
|
||||||
|
<GPIOF>
|
||||||
|
<pin0
|
||||||
|
ID="OSC_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID="OSC_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOF>
|
||||||
|
</ports>
|
||||||
|
</board>
|
7
keyboards/cannonkeys/chimera65/bootloader_defs.h
Normal file
7
keyboards/cannonkeys/chimera65/bootloader_defs.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* Address for jumping to bootloader on STM32 chips. */
|
||||||
|
/* It is chip dependent, the correct number can be looked up here (page 175):
|
||||||
|
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
* This also requires a patch to chibios:
|
||||||
|
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
*/
|
||||||
|
#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
|
524
keyboards/cannonkeys/chimera65/chconf.h
Normal file
524
keyboards/cannonkeys/chimera65/chconf.h
Normal file
@ -0,0 +1,524 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_FREQUENCY 10000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
|
||||||
|
/* Use __WFI in the idle thread for waiting. Does lower the power
|
||||||
|
* consumption. */
|
||||||
|
#define CORTEX_ENABLE_WFI_IDLE TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_TM FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMCORE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_HEAP FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMPOOLS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_DYNAMIC FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p chThdInit() API.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user