Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2c179de58 | ||
|
|
977c316eb1 | ||
|
|
367eac2229 | ||
|
|
5fca6c0120 | ||
|
|
42f2ad96a3 | ||
|
|
a0f248c20e | ||
|
|
9bb4e63a11 | ||
|
|
4003d077ce | ||
|
|
91ee6a1dbb | ||
|
|
92f9b6c3bd | ||
|
|
ddaf37ffa9 | ||
|
|
683605a9dc | ||
|
|
c178bbf2e5 | ||
|
|
802c575506 | ||
|
|
848f3713ad | ||
|
|
0c03811d6a | ||
|
|
36dd261d06 | ||
|
|
61b5914a80 | ||
|
|
9813a6f950 | ||
|
|
fadb69e203 | ||
|
|
ee8d9bd40a | ||
|
|
d578aaefcd | ||
|
|
75b28225db | ||
|
|
5d23fb1e3a | ||
|
|
d14ef52b80 | ||
|
|
41482e02a6 | ||
|
|
547fbe769c | ||
|
|
5004562441 | ||
|
|
0ec0d29e9f | ||
|
|
d8d2a09674 | ||
|
|
576b138c6e | ||
|
|
38ad0d2673 | ||
|
|
ed65881565 | ||
|
|
b93e1309e5 | ||
|
|
9114d6ebe9 | ||
|
|
c0e6734d3f | ||
|
|
406f03bb0c | ||
|
|
405dea01be | ||
|
|
2f6c068e0d | ||
|
|
2a534e87ac | ||
|
|
f3e73965f0 | ||
|
|
b4c03070de | ||
|
|
4d72aa428f | ||
|
|
57540af102 | ||
|
|
2c0c25d014 | ||
|
|
8479dd65d4 | ||
|
|
3cb28bbe42 | ||
|
|
74d7d232e3 | ||
|
|
340c3abc28 | ||
|
|
009d45d4d7 | ||
|
|
59d3b37130 | ||
|
|
a6701c28d2 | ||
|
|
98b237a21b | ||
|
|
07bdc8f4b7 | ||
|
|
ae934c389e | ||
|
|
6b27ebefc6 | ||
|
|
f54e47c79d | ||
|
|
9587fac72a | ||
|
|
e5831d79c0 | ||
|
|
d967d3a6b5 | ||
|
|
620fcf12e8 | ||
|
|
cacfaedb81 | ||
|
|
209b6baaa8 | ||
|
|
7f8922ae7b | ||
|
|
72f382fc02 | ||
|
|
430c37024e | ||
|
|
f644db042c | ||
|
|
465acd4d09 | ||
|
|
9ae874e0c3 | ||
|
|
0261bf3e30 | ||
|
|
586bd92ea7 | ||
|
|
d68d510473 | ||
|
|
ac20e7e3f2 | ||
|
|
a2d61d76fa | ||
|
|
17eea779df | ||
|
|
f1cebc9d9d | ||
|
|
9609ae60a6 | ||
|
|
2a9856dff0 | ||
|
|
b567785345 | ||
|
|
9177c6fedd | ||
|
|
13493d3a78 | ||
|
|
2f3807682d | ||
|
|
4c4850f32a | ||
|
|
48cc61b188 | ||
|
|
45950bb3b6 | ||
|
|
a8427447bc | ||
|
|
046fb11259 | ||
|
|
77a1c75cf6 | ||
|
|
5cf7dbedd2 | ||
|
|
f2e0d38f17 | ||
|
|
c57994f09e | ||
|
|
43f388166f | ||
|
|
de107eb14e | ||
|
|
d5ab675251 | ||
|
|
a699fd3d04 | ||
|
|
207ebc42a9 | ||
|
|
b28f1e6a29 | ||
|
|
c806103f41 | ||
|
|
eafd38e2a1 | ||
|
|
e5bc50c03e | ||
|
|
1c5079a33c | ||
|
|
c9424eb8d7 | ||
|
|
bbdc82dd36 | ||
|
|
ec3954577c | ||
|
|
48067c530c | ||
|
|
57958ce88e | ||
|
|
dd6330b07c | ||
|
|
cd7bc03134 | ||
|
|
22a8992d1b | ||
|
|
2367e3e1fd | ||
|
|
abb65857ff |
No files matched your search
@@ -20,7 +20,10 @@ endif
|
|||||||
override SILENT := false
|
override SILENT := false
|
||||||
|
|
||||||
ifndef SUB_IS_SILENT
|
ifndef SUB_IS_SILENT
|
||||||
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
|
ifndef SKIP_GIT
|
||||||
|
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(QMK_VERSION),)
|
ifneq ($(QMK_VERSION),)
|
||||||
$(info QMK Firmware $(QMK_VERSION))
|
$(info QMK Firmware $(QMK_VERSION))
|
||||||
endif
|
endif
|
||||||
@@ -94,6 +97,7 @@ $(eval $(call NEXT_PATH_ELEMENT))
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
define GET_KEYBOARDS
|
define GET_KEYBOARDS
|
||||||
|
ifndef ALT_GET_KEYBOARDS
|
||||||
All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
|
All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
|
||||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
||||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
|
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
|
||||||
@@ -105,6 +109,9 @@ define GET_KEYBOARDS
|
|||||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))
|
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))
|
||||||
|
|
||||||
KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
|
KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
|
||||||
|
else
|
||||||
|
KEYBOARDS := $(shell find keyboards/ -type f -iname "rules.mk" | grep -v keymaps | sed 's!keyboards/\(.*\)/rules.mk!\1!' | sort | uniq)
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call GET_KEYBOARDS))
|
$(eval $(call GET_KEYBOARDS))
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ with open('requirements.txt', 'r') as fd:
|
|||||||
|
|
||||||
# Figure out our version
|
# Figure out our version
|
||||||
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
||||||
result = subprocess.run(command, text=True, capture_output=True)
|
result = subprocess.run(command, universal_newlines=True, capture_output=True)
|
||||||
|
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ This is a C header file that is one of the first things included, and will persi
|
|||||||
* `#define B7_AUDIO`
|
* `#define B7_AUDIO`
|
||||||
* enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
|
* enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
|
||||||
* `#define BACKLIGHT_PIN B7`
|
* `#define BACKLIGHT_PIN B7`
|
||||||
* pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation
|
* pin of the backlight
|
||||||
* `#define BACKLIGHT_LEVELS 3`
|
* `#define BACKLIGHT_LEVELS 3`
|
||||||
* number of levels your backlight will have (maximum 15 excluding off)
|
* number of levels your backlight will have (maximum 15 excluding off)
|
||||||
* `#define BACKLIGHT_BREATHING`
|
* `#define BACKLIGHT_BREATHING`
|
||||||
@@ -248,6 +248,9 @@ There are a few different ways to set handedness for split keyboards (listed in
|
|||||||
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
||||||
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
|
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
|
||||||
|
|
||||||
|
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
||||||
|
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
|
||||||
|
|
||||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||||
* See [RGB Light Configuration](#rgb-light-configuration)
|
* See [RGB Light Configuration](#rgb-light-configuration)
|
||||||
|
|
||||||
|
|||||||
+27
-1
@@ -19,7 +19,11 @@ Note that running `make` with `sudo` is generally ***not*** a good idea, and you
|
|||||||
|
|
||||||
### Linux `udev` Rules
|
### Linux `udev` Rules
|
||||||
On Linux, you'll need proper privileges to access the MCU. You can either use
|
On Linux, you'll need proper privileges to access the MCU. You can either use
|
||||||
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`.
|
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following:
|
||||||
|
```console
|
||||||
|
sudo udevadm control --reload-rules
|
||||||
|
sudo udevadm trigger
|
||||||
|
```
|
||||||
|
|
||||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||||
```
|
```
|
||||||
@@ -43,6 +47,28 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
|||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**/etc/udev/rules.d/55-catalina.rules:**
|
||||||
|
```
|
||||||
|
# ModemManager should ignore the following devices
|
||||||
|
ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** ModemManager filtering only works when not in strict mode, the following commands can update that settings:
|
||||||
|
```console
|
||||||
|
sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl restart ModemManager
|
||||||
|
```
|
||||||
|
|
||||||
|
**/etc/udev/rules.d/56-dfu-util.rules:**
|
||||||
|
```
|
||||||
|
# stm32duino
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"
|
||||||
|
# Generic stm32
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
|
||||||
|
```
|
||||||
|
|
||||||
### Serial device is not detected in bootloader mode on Linux
|
### Serial device is not detected in bootloader mode on Linux
|
||||||
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
|
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
|
||||||
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
|
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
|
||||||
|
|||||||
+5
-12
@@ -184,22 +184,15 @@ Pressing any key during sleep should wake host.
|
|||||||
|
|
||||||
Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
||||||
|
|
||||||
|
## Enabling JTAG
|
||||||
|
|
||||||
## Using PF4-7 Pins of USB AVR?
|
By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc.
|
||||||
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this.
|
|
||||||
|
|
||||||
If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
|
If you would like to keep JTAG enabled, just add the following to your `config.h`:
|
||||||
|
|
||||||
See this code.
|
```c
|
||||||
|
#define NO_JTAG_DISABLE
|
||||||
```
|
```
|
||||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
|
||||||
MCUCR |= (1<<JTD);
|
|
||||||
MCUCR |= (1<<JTD);
|
|
||||||
```
|
|
||||||
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
|
|
||||||
|
|
||||||
And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
|
|
||||||
|
|
||||||
|
|
||||||
## Adding LED Indicators of Lock Keys
|
## Adding LED Indicators of Lock Keys
|
||||||
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
||||||
|
|||||||
+20
-21
@@ -30,32 +30,31 @@ You should then be able to use the keycodes below to change the backlight level.
|
|||||||
|
|
||||||
This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
|
This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
|
||||||
|
|
||||||
Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used.
|
|
||||||
|
|
||||||
Hardware PWM is supported according to the following table:
|
Hardware PWM is supported according to the following table:
|
||||||
|
|
||||||
| Backlight Pin | Hardware timer |
|
|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|
|
||||||
|---------------|-------------------------|
|
|-------------|-------------|-------------|-------------|---------|
|
||||||
|`B5` | Timer 1 |
|
|`B5` |Timer 1 |Timer 1 | | |
|
||||||
|`B6` | Timer 1 |
|
|`B6` |Timer 1 |Timer 1 | | |
|
||||||
|`B7` | Timer 1 |
|
|`B7` |Timer 1 |Timer 1 |Timer 1 | |
|
||||||
|`C6` | Timer 3 |
|
|`C4` |Timer 3 | | | |
|
||||||
|`D4` | Timer 1 (ATmega32A only)|
|
|`C5` |Timer 3 | |Timer 1 | |
|
||||||
| other | Software PWM |
|
|`C6` |Timer 3 |Timer 3 |Timer 1 | |
|
||||||
|
|`D4` | | | |Timer 1 |
|
||||||
|
|`D5` | | | |Timer 1 |
|
||||||
|
|
||||||
The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration:
|
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:
|
||||||
|
|
||||||
| Audio Pin(s) | Audio Timer | Software PWM Timer |
|
|Audio Pin|Audio Timer|Software PWM Timer|
|
||||||
|--------------|-------------|--------------------|
|
|---------|-----------|------------------|
|
||||||
| `C4` | Timer 3 | Timer 1 |
|
|`C4` |Timer 3 |Timer 1 |
|
||||||
| `C5` | Timer 3 | Timer 1 |
|
|`C5` |Timer 3 |Timer 1 |
|
||||||
| `C6` | Timer 3 | Timer 1 |
|
|`C6` |Timer 3 |Timer 1 |
|
||||||
| `B5` | Timer 1 | Timer 3 |
|
|`B5` |Timer 1 |Timer 3 |
|
||||||
| `B6` | Timer 1 | Timer 3 |
|
|`B6` |Timer 1 |Timer 3 |
|
||||||
| `B7` | Timer 1 | Timer 3 |
|
|`B7` |Timer 1 |Timer 3 |
|
||||||
| `Bx` & `Cx` | Timer 1 & 3 | None |
|
|
||||||
|
|
||||||
When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision.
|
When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks.
|
The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks.
|
||||||
|
|
||||||
To enable this feature, yu need to add `COMBO_ENABLE = yes` to your `rules.mk`.
|
To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`.
|
||||||
|
|
||||||
Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using).
|
Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using).
|
||||||
<!-- At this time, this is necessary -->
|
<!-- At this time, this is necessary -->
|
||||||
|
|||||||
@@ -20,6 +20,15 @@ Additionally, the resolution can be specified in the same file (the default & su
|
|||||||
|
|
||||||
#define ENCODER_RESOLUTION 4
|
#define ENCODER_RESOLUTION 4
|
||||||
|
|
||||||
|
## Split Keyboards
|
||||||
|
|
||||||
|
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout for the right half like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||||
|
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||||
|
```
|
||||||
|
|
||||||
## Callbacks
|
## Callbacks
|
||||||
|
|
||||||
The callback functions can be inserted into your `<keyboard>.c`:
|
The callback functions can be inserted into your `<keyboard>.c`:
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
|||||||
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||||
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
|
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
|
||||||
```
|
```
|
||||||
|
|
||||||
## EEPROM storage
|
## EEPROM storage
|
||||||
|
|||||||
@@ -160,6 +160,18 @@ There are some settings that you may need to configure, based on how the hardwar
|
|||||||
|
|
||||||
This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency).
|
This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency).
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }
|
||||||
|
```
|
||||||
|
|
||||||
|
This allows you to specify a different set of direct pins for the right side.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||||
|
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||||
|
```
|
||||||
|
|
||||||
|
This allows you to specify a different set of encoder pins for the right side.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define RGBLIGHT_SPLIT
|
#define RGBLIGHT_SPLIT
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ This allows the keyboard to tell the host OS that up to 248 keys are held down a
|
|||||||
|
|
||||||
`BACKLIGHT_ENABLE`
|
`BACKLIGHT_ENABLE`
|
||||||
|
|
||||||
This enables your backlight on Timer1 and ports B5, B6, or B7 (for now). You can specify your port by putting this in your `config.h`:
|
This enables the in-switch LED backlighting. You can specify the backlight pin by putting this in your `config.h`:
|
||||||
|
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r
|
|||||||
#define DESCRIPTION A custom keyboard
|
#define DESCRIPTION A custom keyboard
|
||||||
```
|
```
|
||||||
|
|
||||||
?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. ?> On Linux these values will not be visible in lsusb by default, since Linux takes the information from the list maintained by [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. lsusb will show the information reported by the device when executed with -v option. It is also present in kernel logs after plugging in the device.
|
?> Windows and macOS will display the `MANUFACTURER` and `PRODUCT` in the list of USB devices. `lsusb` on Linux instead takes these from the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. `lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in.
|
||||||
|
|
||||||
### Keyboard Matrix Configuration
|
### Keyboard Matrix Configuration
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ To configure a keyboard where each switch is connected to a separate pin and gro
|
|||||||
|
|
||||||
### Backlight Configuration
|
### Backlight Configuration
|
||||||
|
|
||||||
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
|
QMK supports backlighting on most GPIO pins. A select few of these can be driven by the MCU in hardware. For more details see the [Backlight Documentation](feature_backlight.md).
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
@@ -134,8 +134,6 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us
|
|||||||
#define BREATHING_PERIOD 6
|
#define BREATHING_PERIOD 6
|
||||||
```
|
```
|
||||||
|
|
||||||
?> You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
|
|
||||||
|
|
||||||
### Other Configuration Options
|
### Other Configuration Options
|
||||||
|
|
||||||
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
|
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ The [QMK Configurator](https://config.qmk.fm) is an online graphical user interf
|
|||||||
|
|
||||||
?> **Please follow these steps in order.**
|
?> **Please follow these steps in order.**
|
||||||
|
|
||||||
Watch the [Video Tutorial](https://youtu.be/7RH-1pAbjvw)
|
Watch the [Video Tutorial](https://youtu.be/tx54jkRC9ZY)
|
||||||
|
|
||||||
The QMK Configurator works best with Chrome/Firefox.
|
The QMK Configurator works best with Chrome/Firefox.
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ For the PJRC devices (Teensy's), when you're ready to compile and flash your fir
|
|||||||
|
|
||||||
For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:
|
For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:
|
||||||
|
|
||||||
make erdogox_ez:xyverz:teensy
|
make ergodox_ez:xyverz:teensy
|
||||||
|
|
||||||
Once the firmware finishes compiling, it will output something like this:
|
Once the firmware finishes compiling, it will output something like this:
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the
|
|||||||
|
|
||||||
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
|
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
|
||||||
|
|
||||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
|
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to.
|
||||||
|
|
||||||
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
|
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
|
||||||
|
|
||||||
|
|||||||
@@ -173,23 +173,6 @@ EXTRAKEY_ENABLE = yes # 音频控制和系统控制
|
|||||||
|
|
||||||
Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。
|
Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。
|
||||||
|
|
||||||
|
|
||||||
## 在USB AVR使用PF4-7针脚?
|
|
||||||
你要置位MCUCR寄存器JTD位来将PF4-7设置为GPIO。这些针脚默认是JTAG功能。 像ATMega*U* or AT90USB*这样的MCU会受影响。
|
|
||||||
|
|
||||||
如果是用Teensy的话就不需要了。Tennsy自带JTAGEN位未编程来失能该功能。
|
|
||||||
<!--翻译问题:上句可能有错,原文为:Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. -->
|
|
||||||
代码如下。
|
|
||||||
```
|
|
||||||
// F接口JTAG失能。在四个周期内写入两次JTD位。
|
|
||||||
MCUCR |= (1<<JTD);
|
|
||||||
MCUCR |= (1<<JTD);
|
|
||||||
```
|
|
||||||
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
|
|
||||||
|
|
||||||
阅读ATMega32U4的datasheet中的**26.5.1 MCU Control Register – MCUCR**。
|
|
||||||
|
|
||||||
|
|
||||||
## 为锁定键添加指示灯
|
## 为锁定键添加指示灯
|
||||||
你要自制CapsLock, ScrollLock 和 NumLock指示灯?见下文。
|
你要自制CapsLock, ScrollLock 和 NumLock指示灯?见下文。
|
||||||
|
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ void oled_render(void) {
|
|||||||
|
|
||||||
// Send render data chunk after rotating
|
// Send render data chunk after rotating
|
||||||
if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
|
if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
|
||||||
print("oled_render data failed\n");
|
print("oled_render90 data failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,6 +393,11 @@ void oled_write_char(const char data, bool invert) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data == '\r') {
|
||||||
|
oled_advance_page(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// copy the current render buffer to check for dirty after
|
// copy the current render buffer to check for dirty after
|
||||||
static uint8_t oled_temp_buffer[OLED_FONT_WIDTH];
|
static uint8_t oled_temp_buffer[OLED_FONT_WIDTH];
|
||||||
memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH);
|
memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH);
|
||||||
|
|||||||
+3
-5
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2018 Jack Humbert
|
/* Copyright 2018 Chuck "@vosechu" Lauer Vose
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,8 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#pragma once
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
// place overrides here
|
||||||
[0] = {{ KC_A }}
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2018 Chuck "@vosechu" Lauer Vose
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#define SPACEFN LT(1, KC_SPC)
|
||||||
|
#define CTL_GRV CTL_T(KC_GRV)
|
||||||
|
#define ALT_TAB ALT_T(KC_TAB)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_60_ansi(
|
||||||
|
KC_ESC , 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_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_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 ,
|
||||||
|
CTL_GRV , ALT_TAB , KC_LGUI , SPACEFN , KC_RALT , KC_RGUI , MO(1) , KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_60_ansi(
|
||||||
|
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_DEL ,
|
||||||
|
KC_TRNS , KC_TRNS , KC_UP , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_PSCR , KC_SLCK , KC_PAUS , KC_TRNS ,
|
||||||
|
KC_TRNS , KC_LEFT , KC_DOWN , KC_RGHT , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_INS , KC_HOME , KC_PGUP , KC_TRNS ,
|
||||||
|
KC_TRNS , KC_VOLU , KC_VOLD , KC_MUTE , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_END , KC_PGDN , KC_TRNS ,
|
||||||
|
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , MO(2) , KC_TRNS , KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_60_ansi(
|
||||||
|
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 , RESET ,
|
||||||
|
BL_TOGG , BL_INC , BL_DEC , BL_STEP , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS ,
|
||||||
|
RGB_TOG , RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , RGB_SPI , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , KC_TRNS , KC_TRNS , KC_TRNS ,
|
||||||
|
KC_TRNS , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , RGB_SPD , RGB_M_SN , RGB_M_K , RGB_M_X , RGB_M_G , KC_TRNS , KC_TRNS ,
|
||||||
|
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# 1up60hse keymap made by vosechu
|
||||||
|
|
||||||
|
Tweaks from default
|
||||||
|
|
||||||
|
* Add in SpaceFN so arrows are reachable with just left hand (leaving right free for mousing).
|
||||||
|
* Also add tab/grv under the alt/ctrl keys to make those easier to reach.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2019 Sebastian Williams
|
||||||
|
*
|
||||||
|
* 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 "2_milk.h"
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/* Copyright 2019 Sebastian Williams
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, \
|
||||||
|
K01 \
|
||||||
|
) { \
|
||||||
|
{ K00 }, \
|
||||||
|
{ K01 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/* Copyright 2019 Sebastian Williams
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xB195
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER rionlion100
|
||||||
|
#define PRODUCT 2% Milk
|
||||||
|
#define DESCRIPTION A milk themed 2% Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 2
|
||||||
|
#define MATRIX_COLS 1
|
||||||
|
|
||||||
|
/* Milk default pinout */
|
||||||
|
#define DIRECT_PINS { \
|
||||||
|
{D4}, \
|
||||||
|
{C6} \
|
||||||
|
}
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGB_DI_PIN B6
|
||||||
|
#define RGBLED_NUM 1
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "2% Milk",
|
||||||
|
"keyboard_folder": "2_milk",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "rionlion100",
|
||||||
|
"width": 1,
|
||||||
|
"height": 2,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 2,
|
||||||
|
"layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_P0,
|
||||||
|
KC_P1
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Binary keymap
|
||||||
|
0 and 1 that's it
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
RCTL(KC_C),
|
||||||
|
RCTL(KC_V)
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Copy/Paste Keymap
|
||||||
|

|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_Z,
|
||||||
|
KC_X
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Default keymap for 2% Milk
|
||||||
|

|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
DISSA,
|
||||||
|
SHRUG
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
SHRUG,
|
||||||
|
DISSA
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case SHRUG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DISSA:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_unicode_hex_string("0CA0 005F 0CA0");
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Emoji Keymap
|
||||||
|

|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_LGUI,
|
||||||
|
KC_F11
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# ExcessBread's keymap
|
||||||
|
requested by excessbread
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_BTN1,
|
||||||
|
KC_BTN2
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# left and right mouse buttons
|
||||||
|
requested by WanderingVagrant
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# 2% Milk
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 2% Meme board themed around a milk carton
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Rionlion100](https://github.com/rionlion100)
|
||||||
|
Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 2_milk: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).
|
||||||
|
|
||||||
|
### Credits
|
||||||
|
+ Case design by Soft
|
||||||
|
+ PCB by PyroL
|
||||||
|
+ Name by jetpacktuxedo
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = no # 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.
|
||||||
@@ -18,46 +18,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void keyboard_pre_init_user(void) {
|
||||||
}
|
// Call the keyboard pre init code.
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
// Set our LED pins as output
|
||||||
}
|
setPinOutput(D5);
|
||||||
|
setPinOutput(B0);
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
writePinLow(D5);
|
||||||
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
|
|
||||||
} else {
|
} else {
|
||||||
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
|
writePinHigh(D5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
|
writePinLow(B0);
|
||||||
} else {
|
} else {
|
||||||
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
|
writePinHigh(B0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usb_led & (1 << USB_LED_KANA)) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include "adkb96.h"
|
#include "adkb96.h"
|
||||||
|
|
||||||
//void promicro_bootloader_jmp(bool program);
|
|
||||||
|
|
||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
@@ -12,9 +10,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//void promicro_bootloader_jmp(bool program);
|
|
||||||
|
|
||||||
|
|
||||||
// Keymap with right side flipped
|
// Keymap with right side flipped
|
||||||
// (TRRS jack on both halves are to the right)
|
// (TRRS jack on both halves are to the right)
|
||||||
#define LAYOUT_ortho_6x16( \
|
#define LAYOUT_ortho_6x16( \
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Helpful defines
|
||||||
|
#define ESC_CTL CTL_T(KC_ESCAPE) // Tap for Esc, hold for Ctrl
|
||||||
|
#define FL_KCF LT(1,KC_F)
|
||||||
|
#define FL_KCJ LT(1,KC_J)
|
||||||
|
#define CMD_ENT LGUI(LSFT(KC_ENT))
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
HASHRKT = SAFE_RANGE,
|
||||||
|
CLNEQLS,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT( /* Base */
|
||||||
|
KC_GRV, 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_BSLS, KC_BSLS, LGUI(KC_C),
|
||||||
|
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_BSPC, LGUI(KC_V),
|
||||||
|
ESC_CTL, KC_A, KC_S, KC_D, FL_KCF, KC_G, KC_H, FL_KCJ, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
|
||||||
|
CMD_ENT, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, MO(2), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT( /* FL */
|
||||||
|
KC_ESC, 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_DEL, KC_DEL, KC_VOLU,
|
||||||
|
_______, HASHRKT, _______, KC_LCBR, KC_RCBR, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, _______, _______, KC_VOLD,
|
||||||
|
_______, CLNEQLS, _______, KC_LBRC, KC_RBRC, _______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_GRV, _______, KC_HOME,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[2] = LAYOUT( /* FN */
|
||||||
|
RESET, 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_DEL, KC_DEL, _______,
|
||||||
|
KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______,
|
||||||
|
_______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch(keycode) {
|
||||||
|
case HASHRKT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("=>");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CLNEQLS:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(":=");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# muzfuz's keymap for Lunar
|
||||||
|
|
||||||
|
```shell
|
||||||
|
make ai03/lunar:muzfuz:dfu
|
||||||
|
```
|
||||||
@@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0x6060
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER AKB
|
#define MANUFACTURER AKB
|
||||||
#define PRODUCT Raine M3
|
#define PRODUCT Raine
|
||||||
#define DESCRIPTION Raine M3
|
#define DESCRIPTION Raine
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|||||||
@@ -68,10 +68,12 @@
|
|||||||
{ "label": "2", "x": 14.25, "y": 3 },
|
{ "label": "2", "x": 14.25, "y": 3 },
|
||||||
{ "label": "3", "x": 15.25, "y": 3 },
|
{ "label": "3", "x": 15.25, "y": 3 },
|
||||||
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Win", "x": 1.25, "y": 4},
|
||||||
{ "label": "Alt", "x": 2.25, "y": 4, "w": 1.25 },
|
{ "label": "Alt", "x": 2.25, "y": 4, "w": 1.25 },
|
||||||
{ "label": "SPLEFT", "x": 3.5, "y": 4, "w": 2.25 },
|
{ "label": "SPLEFT", "x": 3.5, "y": 4, "w": 2.25 },
|
||||||
{ "label": "7U", "x": 5.75, "y": 4 },
|
{ "label": "7U", "x": 5.75, "y": 4 },
|
||||||
{ "label": "SPRIGHT", "x": 6.75, "y": 4, "w": 1.75 },
|
{ "label": "SPRIGHT", "x": 6.75, "y": 4, "w": 1.75 },
|
||||||
|
{ "label": "alt", "x": 8.5, "y": 4},
|
||||||
{ "label": "Menu", "x": 9.5, "y": 4, "w": 1.25 },
|
{ "label": "Menu", "x": 9.5, "y": 4, "w": 1.25 },
|
||||||
{ "x": 11, "y": 4.25 },
|
{ "x": 11, "y": 4.25 },
|
||||||
{ "x": 12, "y": 4.25 },
|
{ "x": 12, "y": 4.25 },
|
||||||
|
|||||||
@@ -17,16 +17,16 @@
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT( /* Base */
|
[0] = LAYOUT( /* Base */
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_NLCK, KC_SLCK, KC_INS,
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_PSLS, KC_PAST, KC_PPLS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P7, KC_P8, KC_P9,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P7, KC_P8, KC_P9,
|
||||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_HASH, KC_ENT, KC_P4, KC_P5, KC_P6,
|
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||||
KC_LSFT, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3,
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,
|
||||||
KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_DEL),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_BSPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||||
[1] = LAYOUT( /* Second */
|
[1] = LAYOUT( /* Second */
|
||||||
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_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_DEL, KC_NLCK, KC_PSCR, KC_INS,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_HOME, KC_UP, KC_PGUP,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, KC_LEFT, KC_SLCK, KC_RGHT,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, KC_END, KC_DOWN, KC_PGDN,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -23,11 +23,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, \
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, K312, K313, K314, K315, \
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, K312, K313, K314, K315, \
|
||||||
K400, K402, K404, K405, K407, K409, K410, K412, K413, K414, K415 \
|
K400, K401, K402, K404, K405, K407, K408, K409, K410, K412, K413, K414, K415 \
|
||||||
) { \
|
) { \
|
||||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113, K114, K115 }, \
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113, K114, K115 }, \
|
||||||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, KC_NO, K312, K313, K314, K315 }, \
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, KC_NO, K312, K313, K314, K315 }, \
|
||||||
{ K400, KC_NO, K402, KC_NO, K404, K405, KC_NO, K407, KC_NO, K409, K410, KC_NO, K412, K413, K414, K415 } \
|
{ K400, K401, K402, KC_NO, K404, K405, KC_NO, K407, K408, K409, K410, KC_NO, K412, K413, K414, K415 } \
|
||||||
}
|
}
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
# TGR Alice
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
An ergonomic 60% keyboard.
|
|
||||||
|
|
||||||
Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
|
|
||||||
Hardware Supported: TGR Alice
|
|
||||||
Hardware Availability: Group buy finished
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
|
||||||
|
|
||||||
make alice:default
|
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
|
||||||
|
|
||||||
|
|
||||||
ps2avrGB keyboard firmware
|
|
||||||
==========================
|
|
||||||
|
|
||||||
This keyboard uses the port of the QMK firmware for boards that are based on the
|
|
||||||
ps2avrGB firmware.
|
|
||||||
|
|
||||||
Note that this is a complete replacement for the firmware, so you won't be
|
|
||||||
using Bootmapper Client to change any keyboard settings, since not all the
|
|
||||||
USB report options are supported.
|
|
||||||
|
|
||||||
## Installing
|
|
||||||
|
|
||||||
First, install the requirements. These commands are for OSX, but all you
|
|
||||||
need is the AVR toolchain and `bootloadHID` for flashing:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ brew cask install crosspack-avr
|
|
||||||
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
|
||||||
$ pip install pyusb
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, with the keyboard plugged in, simply run this command from the
|
|
||||||
`qmk_firmware` directory:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make alice
|
|
||||||
$ bootloadHID -r alice_default.hex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Setting the board to bootloader mode
|
|
||||||
|
|
||||||
Hold the ESC key (the one before the 1! key, in case you remaped it).
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
From my experience, it's really hard to brick these boards. But these
|
|
||||||
tricks have been useful when it got stuck in a weird scenario.
|
|
||||||
|
|
||||||
1. Try plugging the board in while holding the bootloader key. This will force
|
|
||||||
it to boot only the bootloader without loading the firmware. Once this is
|
|
||||||
done, just reflash the board with the original firmware.
|
|
||||||
2. Sometimes USB hubs can act weird, so try connecting the board directly
|
|
||||||
to your computer or plugging/unplugging the USB hub.
|
|
||||||
@@ -63,9 +63,6 @@ void matrix_init(void)
|
|||||||
#ifdef UART_RGB_ENABLE
|
#ifdef UART_RGB_ENABLE
|
||||||
uart_rgb_init();
|
uart_rgb_init();
|
||||||
#endif
|
#endif
|
||||||
// disable JTAG
|
|
||||||
MCUCR = _BV(JTD);
|
|
||||||
MCUCR = _BV(JTD);
|
|
||||||
|
|
||||||
// 85 REST
|
// 85 REST
|
||||||
DDRD |= _BV(PD7);
|
DDRD |= _BV(PD7);
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2018 Alex Peters
|
||||||
|
*
|
||||||
|
* 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 "amj66.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/* Copyright 2018 Alex Peters
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
|
||||||
|
/* LAYOUT_all
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||||
|
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ │0F │ ISO Enter
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┤ ┌─────┐
|
||||||
|
* │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ │1E │ │2C │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┘ ┌──┴┐ │
|
||||||
|
* │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │ │1D │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┬─┴─┐ └───┴────┘
|
||||||
|
* │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │
|
||||||
|
* ├────┴┬──┴─┬─┴──┬┴───┴───┴─┬─┴───┴───┴┬──┴─┬─┴──┬┴────┼───┼───┼───┐
|
||||||
|
* │40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │4A │
|
||||||
|
* └─────┴────┴────┴──────────┴──────────┴────┴────┴─────┴───┴───┴───┘
|
||||||
|
* 2u Backspace = k0D
|
||||||
|
* ISO # = k1D
|
||||||
|
* 2.25u Right Shift = k3C
|
||||||
|
* 6.25u Space = k44
|
||||||
|
*/
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, KC_NO }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_66_ansi( \
|
||||||
|
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, k1E, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO, k0F }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, KC_NO }, \
|
||||||
|
{ k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_66_iso( \
|
||||||
|
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, k1E, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2C, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO, k0F }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, KC_NO }, \
|
||||||
|
{ k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Alex Peters
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xBD66
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER AMJKeyboard
|
||||||
|
#define PRODUCT AMJ66
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for AMJ66
|
||||||
|
|
||||||
|
/* Key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
/* Keyboard Matrix Assignments */
|
||||||
|
#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1 }
|
||||||
|
#define MATRIX_COL_PINS { F0, B3, B2, B1, B0, B7, D0, D1, D2, D3, D5, D6, D7, B4, B5, B6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BREATHING_PERIOD 6
|
||||||
|
#define BACKLIGHT_ON_STATE 1
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "AMJ66",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "FSund, qmk",
|
||||||
|
"width": 16.5,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"key_count": 70,
|
||||||
|
"layout": [
|
||||||
|
{"label":"~", "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":"|", "x":13, "y":0},
|
||||||
|
{"label":"~", "x":14, "y":0},
|
||||||
|
{"label":"Insert", "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":"Backspace", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"Delete", "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":1.25},
|
||||||
|
{"label":"ISO Backslash", "x":1.25, "y":3},
|
||||||
|
{"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":1.25},
|
||||||
|
{"label":"HHKB Fn", "x":13.5, "y":3},
|
||||||
|
{"label":"Up", "x":14.5, "y":3},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":4, "w":1.5},
|
||||||
|
{"label":"Space", "x":4, "y":4, "w":2.75},
|
||||||
|
{"label":"Space", "x":6.75, "y":4, "w":2.75},
|
||||||
|
{"label":"Alt", "x":9.5, "y":4, "w":1.5},
|
||||||
|
{"label":"GUI", "x":11, "y":4, "w":1.25},
|
||||||
|
{"label":"Ctrl", "x":12.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Left", "x":13.5, "y":4},
|
||||||
|
{"label":"Down", "x":14.5, "y":4},
|
||||||
|
{"label":"Right", "x":15.5, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_66_ansi": {
|
||||||
|
"key_count": 66,
|
||||||
|
"layout": [
|
||||||
|
{"label":"~", "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":"Insert", "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":"Delete", "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":"Up", "x":14.5, "y":3},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":4, "w":6.25},
|
||||||
|
{"label":"Alt", "x":10, "y":4, "w":1.25},
|
||||||
|
{"label":"Fn", "x":11.25, "y":4},
|
||||||
|
{"label":"Ctrl", "x":12.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Left", "x":13.5, "y":4},
|
||||||
|
{"label":"Down", "x":14.5, "y":4},
|
||||||
|
{"label":"Right", "x":15.5, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_66_iso": {
|
||||||
|
"key_count": 67,
|
||||||
|
"layout": [
|
||||||
|
{"label":"\u00ac", "x":0, "y":0},
|
||||||
|
{"label":"!", "x":1, "y":0},
|
||||||
|
{"label":"\"", "x":2, "y":0},
|
||||||
|
{"label":"\u00a3", "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":"Insert", "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":"Delete", "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":"~", "x":12.75, "y":2},
|
||||||
|
{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
|
||||||
|
{"label":"Shift", "x":0, "y":3, "w":1.25},
|
||||||
|
{"label":"|", "x":1.25, "y":3},
|
||||||
|
{"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":"Up", "x":14.5, "y":3},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":4, "w":6.25},
|
||||||
|
{"label":"AltGr", "x":10, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":11.25, "y":4},
|
||||||
|
{"label":"Ctrl", "x":12.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Left", "x":13.5, "y":4},
|
||||||
|
{"label":"Down", "x":14.5, "y":4},
|
||||||
|
{"label":"Right", "x":15.5, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2018 Alex Peters
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/* Copyright 2018 Alex Peters
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_ESC, 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_GRV, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
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_BSPC, KC_BSPC, KC_INS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_DEL,
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_STEP, KC_SLEP, _______, _______, KC_PGUP,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# The default keymap for AMJ66
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is a fairly universal layout that supports standard ANSI, split backspace,
|
||||||
|
split left shift, and split right shift.
|
||||||
|
Cycle backlight: Fn + .
|
||||||
|
Backlight breathing: Fn + ,
|
||||||
|
Volume Up/Down: Fn + [ and Fn + ]
|
||||||
|
Mute: Fn + \
|
||||||
|
Sleep: Fn + /
|
||||||
|
Bootloader Mode: Fn + CapsLock
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# AMJ66
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 66% keyboard formerly sold by Massdrop and KBDFans.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [FSund](https://github.com/fsund), [The QMK Community](https://github.com/qmk)
|
||||||
|
Hardware Supported: AMJ66, ATmega32U4
|
||||||
|
Hardware Availability: [Drop.com](https://drop.com/buy/kbd66-mechanical-keyboard-kit?mode=guest_open)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make amjkeyboard/amj66: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).
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# 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 = 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
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # 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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
|
||||||
|
LAYOUTS = 66_ansi 66_iso
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#undef MATRIX_ROWS
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
|
||||||
|
#undef MATRIX_COLS
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
#undef MATRIX_ROW_PINS
|
||||||
|
#define MATRIX_ROW_PINS { A6, A7, A8, A15, B11, B12, A14, A13 }
|
||||||
|
|
||||||
|
#undef MATRIX_COL_PINS
|
||||||
|
#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 }
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
/* Copyright 2019 George Koenig
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
#include "ridingqwerty.h"
|
||||||
|
|
||||||
|
/* Atreus
|
||||||
|
┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓
|
||||||
|
┃ Q │ W │ E │ R │ T ┃ ┃ Y │ U │ I │ O │ P ┃
|
||||||
|
┠────────┼────────┼────────┼────────┼────────┨ ┠────────┼────────┼────────┼────────┼────────┨
|
||||||
|
/┃ ¶ A │ S │ D │ F │ G ┃ ┃ H │ J │ K │ L │ 🔢 ; ┃
|
||||||
|
┠────────┼────────┼────────┼────────┼────────┞━━━━━━━━┳━━━━━━━━┞────────┼────────┼────────┼────────┼────────┨
|
||||||
|
/┃ ⇧ Z │ X │ C │ V │ B │ ┃ │ N │ M │ , │ 𝔽 . │ ⇧ / ┃
|
||||||
|
┠────────┼────────┼────────┼────────┼────────┤ ¶ ⎋ ┃ ❦ ⇥ ├────────┼────────┼────────┼────────┼────────┨
|
||||||
|
┃ ⎈ ⎋ │ ⌘ ⇥ │ ⎇ [ │ ⇧ ] │ 🔢 ⌫ │ ┃ │ ★ ␣ │ ⇧ - │ ⎇ = │ ⌘ ' │ ⎈ ↵ ┃
|
||||||
|
┗━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┻━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┛
|
||||||
|
MODS // LAYERS // MODS //
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef LAYOUT
|
||||||
|
#undef LAYOUT
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K40, K41, K42, K43, K44, \
|
||||||
|
K10, K11, K12, K13, K14, K50, K51, K52, K53, K54, \
|
||||||
|
K20, K21, K22, K23, K24, K60, K61, K62, K63, K64, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K70, K71, K72, K73, K74, K75 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, KC_NO }, \
|
||||||
|
{ K10, K11, K12, K13, K14, KC_NO }, \
|
||||||
|
{ K20, K21, K22, K23, K24, KC_NO }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35 }, \
|
||||||
|
{ K44, K43, K42, K41, K40, KC_NO }, \
|
||||||
|
{ K54, K53, K52, K51, K50, KC_NO }, \
|
||||||
|
{ K64, K63, K62, K61, K60, KC_NO }, \
|
||||||
|
{ K75, K74, K73, K72, K71, K70 } \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT( /* Qwerty */
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
ED_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NM_SCLN,
|
||||||
|
LS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK_DOT, RS_SLSH,
|
||||||
|
LC_ESC, LG_TAB, LA_LBRC, LS_RBRC, NM_BSPC, ED_ESC, SC_TAB, SM_SPC, RS_MINS, RA_EQL, RG_QUOT, RC_ENT
|
||||||
|
),
|
||||||
|
[_EDITOR] = LAYOUT( /* ED_A, ED_ESC */
|
||||||
|
KC_GRV, _______, KC_END, _______, KC_TAB, _______, _______, KC_INS, _______, KC_PGUP,
|
||||||
|
KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT,
|
||||||
|
_______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_NUMBER] = LAYOUT( /* NM_SCLN, NM_BSPC */
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_4, KC_5, KC_6, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_0, KC_0, KC_DOT, _______, _______
|
||||||
|
),
|
||||||
|
[_SYMBOL] = LAYOUT( /* SM_SPC */
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
||||||
|
KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_COLN,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_F_KEYS] = LAYOUT( /* FK_DOT */
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||||
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_F11,
|
||||||
|
KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_F12,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_SECRET] = LAYOUT( /* shhhh... */
|
||||||
|
RESET, _______, _______, RUSTY, FUEL, KC_F13, _______, _______, _______, _______,
|
||||||
|
AR1ST, SYSNOC, _______, _______, _______, _______, _______, _______, OS_LAB, _______,
|
||||||
|
CDLOCAL, _______, C0RE, VAXIS, _______, _______, MUNKY, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_FINAL] = LAYOUT( /* . */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
// custom tap/hold keys
|
||||||
|
uint16_t key_timer;
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch(keycode) {
|
||||||
|
case RG_QUOT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
key_timer = timer_read();
|
||||||
|
layer_on(_NUMBER);
|
||||||
|
register_mods(MOD_BIT(KC_RGUI));
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_RGUI));
|
||||||
|
layer_off(_NUMBER);
|
||||||
|
if (timer_elapsed(key_timer) < TAPPING_TERM) {
|
||||||
|
tap_code(KC_QUOT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false; break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This is a handwired Atreus42 using a Proton C
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
MCU = STM32F303
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
BOOTMAGIC_ENABLE = no # 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
|
||||||
|
AUDIO_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
# SERIAL_LINK_ENABLE = yes
|
||||||
|
#TAP_DANCE_ENABLE = yes
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
void promicro_bootloader_jmp(bool program);
|
|
||||||
|
|
||||||
// This a shortcut to help you visually see your layout.
|
// This a shortcut to help you visually see your layout.
|
||||||
// The first section contains all of the arguements
|
// The first section contains all of the arguements
|
||||||
// The second converts the arguments into a two-dimensional array
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "business_card alpha",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "kakunpc",
|
||||||
|
"width": 3,
|
||||||
|
"height": 2,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"1", "x":0, "y":0},
|
||||||
|
{"label":"2", "x":1, "y":0},
|
||||||
|
{"label":"3", "x":2, "y":0},
|
||||||
|
{"label":"4", "x":0, "y":1},
|
||||||
|
{"label":"5", "x":1, "y":1},
|
||||||
|
{"label":"6", "x":2, "y":1}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "business_card beta",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "kakunpc",
|
||||||
|
"width": 2,
|
||||||
|
"height": 3,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"1", "x":0, "y":0},
|
||||||
|
{"label":"2", "x":1, "y":0},
|
||||||
|
{"label":"3", "x":0, "y":1},
|
||||||
|
{"label":"4", "x":1, "y":1},
|
||||||
|
{"label":"5", "x":0, "y":2},
|
||||||
|
{"label":"6", "x":1, "y":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,21 +45,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
uint32_t processQwerty(bool lookup) {
|
uint32_t processQwerty(bool lookup) {
|
||||||
// SECRET AGENT CHORDS
|
// SECRET AGENT CHORDS
|
||||||
P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
|
P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
|
||||||
P( LR | ST2| RR | RB, SEND(KC_BSPC));
|
P( LR | ST2| RR | RB, SEND(KC_BSPC));
|
||||||
P( LSD | RZ, SEND(KC_SPC));
|
P( LSD | RZ, SEND(KC_SPC));
|
||||||
|
|
||||||
// Dual chords
|
// Dual chords
|
||||||
P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
|
P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
|
||||||
P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
|
P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
|
||||||
P( LSU | LFT, SEND(KC_ESC));
|
P( LSU | LFT, SEND(KC_ESC));
|
||||||
P( LSD | LK, SEND(KC_LSFT));
|
P( LSD | LK, SEND(KC_LSFT));
|
||||||
P( RZ | RS, SEND(KC_LSFT));
|
P( RZ | RS, SEND(KC_LSFT));
|
||||||
P( ST2 | RR, SEND(KC_SPC));
|
P( ST2 | RR, SEND(KC_SPC));
|
||||||
P( RP | RL, SEND(KC_LGUI));
|
P( RP | RL, SEND(KC_LGUI));
|
||||||
P( RT | RD, SEND(KC_LCTL));
|
P( RT | RD, SEND(KC_LCTL));
|
||||||
P( RL | RT, SEND(KC_LALT));
|
P( RL | RT, SEND(KC_LALT));
|
||||||
P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
|
P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
|
||||||
P( RS | RT | RD | RZ, SEND(KC_ENT));
|
P( RS | RT | RD | RZ, SEND(KC_ENT));
|
||||||
|
|
||||||
// Function Layer
|
// Function Layer
|
||||||
P( FUNCT | RF, SEND(KC_F1));
|
P( FUNCT | RF, SEND(KC_F1));
|
||||||
@@ -179,6 +179,5 @@ uint32_t processQwerty(bool lookup) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Don't fuck with this, thanks.
|
// Don't fuck with this, thanks.
|
||||||
size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
|
size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
|
||||||
@@ -11,6 +11,18 @@ uint32_t pChord = 0; // Previous Chord
|
|||||||
int pChordIndex = 0; // Keys in previousachord
|
int pChordIndex = 0; // Keys in previousachord
|
||||||
uint32_t pChordState[32]; // Previous chord sate
|
uint32_t pChordState[32]; // Previous chord sate
|
||||||
uint32_t stickyBits = 0; // Or'd with every incoming press
|
uint32_t stickyBits = 0; // Or'd with every incoming press
|
||||||
|
#ifndef NO_DEBUG
|
||||||
|
char debugMsg[32];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// StenoLayer
|
||||||
|
uint32_t releasedChord = 0; // Keys released from current chord
|
||||||
|
uint32_t tChord = 0; // Protects state of cChord
|
||||||
|
|
||||||
|
#ifndef STENOLAYERS
|
||||||
|
uint32_t stenoLayers[] = { PWR };
|
||||||
|
size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Mode state
|
// Mode state
|
||||||
enum MODE { STENO = 0, QWERTY, COMMAND };
|
enum MODE { STENO = 0, QWERTY, COMMAND };
|
||||||
@@ -39,7 +51,6 @@ bool inMouse = false;
|
|||||||
int8_t mousePress;
|
int8_t mousePress;
|
||||||
|
|
||||||
// All processing done at chordUp goes through here
|
// All processing done at chordUp goes through here
|
||||||
// Note, this is a gutted version of the Georgi sten.h
|
|
||||||
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
|
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
|
||||||
// Check for mousekeys, this is release
|
// Check for mousekeys, this is release
|
||||||
#ifdef MOUSEKEY_ENABLE
|
#ifdef MOUSEKEY_ENABLE
|
||||||
@@ -50,8 +61,21 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Toggle Serial/QWERTY steno
|
||||||
|
if (cChord == (PWR | FN | ST1 | ST2)) {
|
||||||
|
#ifndef NO_DEBUG
|
||||||
|
uprintf("Fallback Toggle\n");
|
||||||
|
#endif
|
||||||
|
QWERSTENO = !QWERSTENO;
|
||||||
|
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
// handle command mode
|
// handle command mode
|
||||||
if (cChord == (LSU | LSD | RD | RZ)) {
|
if (cChord == (PWR | FN | RD | RZ)) {
|
||||||
|
#ifndef NO_DEBUG
|
||||||
|
uprintf("COMMAND Toggle\n");
|
||||||
|
#endif
|
||||||
if (cMode != COMMAND) { // Entering Command Mode
|
if (cMode != COMMAND) { // Entering Command Mode
|
||||||
CMDLEN = 0;
|
CMDLEN = 0;
|
||||||
pMode = cMode;
|
pMode = cMode;
|
||||||
@@ -70,7 +94,7 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle Gaming Toggle,
|
// Handle Gaming Toggle,
|
||||||
if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) {
|
if (cChord == (PWR | FN | ST4 | ST3) && keymapsCount > 1) {
|
||||||
#ifndef NO_DEBUG
|
#ifndef NO_DEBUG
|
||||||
uprintf("Switching to QMK\n");
|
uprintf("Switching to QMK\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -78,11 +102,38 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lone FN press, toggle QWERTY
|
||||||
|
#ifndef ONLYQWERTY
|
||||||
|
if (cChord == FN) {
|
||||||
|
(cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Check for Plover momentary
|
||||||
|
if (cMode == QWERTY && (cChord & FN)) {
|
||||||
|
cChord ^= FN;
|
||||||
|
goto steno;
|
||||||
|
}
|
||||||
|
|
||||||
// Do QWERTY and Momentary QWERTY
|
// Do QWERTY and Momentary QWERTY
|
||||||
if (cMode == QWERTY || (cMode == COMMAND)) {
|
if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) {
|
||||||
processChord(false);
|
processChord(false);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fallback NKRO Steno
|
||||||
|
if (cMode == STENO && QWERSTENO) {
|
||||||
|
processChord(true);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
steno:
|
||||||
|
// Hey that's a steno chord!
|
||||||
|
inChord = false;
|
||||||
|
chordIndex = 0;
|
||||||
|
cChord = 0;
|
||||||
|
return true;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
cChord = 0;
|
cChord = 0;
|
||||||
|
|||||||
@@ -13,11 +13,14 @@
|
|||||||
|
|
||||||
extern size_t keymapsCount; // Total keymaps
|
extern size_t keymapsCount; // Total keymaps
|
||||||
extern uint32_t cChord; // Current Chord
|
extern uint32_t cChord; // Current Chord
|
||||||
|
extern uint32_t stenoLayers[]; // Chords that simulate QMK layers
|
||||||
|
extern size_t stenoLayerCount; // Number of simulated layers
|
||||||
|
uint32_t refChord; // Reference chord for PC macro
|
||||||
|
|
||||||
// Function defs
|
// Function defs
|
||||||
void processChord(bool useFakeSteno);
|
void processChord(bool useFakeSteno);
|
||||||
uint32_t processQwerty(bool lookup);
|
uint32_t processQwerty(bool lookup);
|
||||||
uint32_t processFakeSteno(bool lookup);
|
uint32_t processFakeSteno(bool lookup);
|
||||||
void saveState(uint32_t cChord);
|
void saveState(uint32_t cChord);
|
||||||
void restoreState(void);
|
void restoreState(void);
|
||||||
|
|
||||||
@@ -30,6 +33,11 @@ void CLICK_MOUSE(uint8_t);
|
|||||||
|
|
||||||
// Keymap helper
|
// Keymap helper
|
||||||
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
|
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
|
||||||
|
#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \
|
||||||
|
for(int i = 0; i < stenoLayerCount; i++) { \
|
||||||
|
refChord = stenoLayers[i] | chord; \
|
||||||
|
if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \
|
||||||
|
}
|
||||||
|
|
||||||
// Shift to internal representation
|
// Shift to internal representation
|
||||||
// i.e) S(teno)R(ight)F
|
// i.e) S(teno)R(ight)F
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
Copyright 2017 Art Ortenburger
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#undef IS_COMMAND
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
//#ifdef RGBLIGHT_ENABLE
|
||||||
|
//#define RGB_DI_PIN D3
|
||||||
|
//#define RGBLED_NUM 16 // Number of LEDs
|
||||||
|
//#define RGBLED_SPLIT { 8, 8 }
|
||||||
|
//
|
||||||
|
//#define RGBLIGHT_HUE_STEP 12
|
||||||
|
//#define RGBLIGHT_SAT_STEP 12
|
||||||
|
//#define RGBLIGHT_VAL_STEP 12
|
||||||
|
//#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
|
//#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
|
//#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
|
//#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
/*
|
||||||
|
This is the keymap for the keyboard
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
Copyright 2017 Art Ortenburger
|
||||||
|
|
||||||
|
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
|
||||||
|
#include "kuchosauronad0.h"
|
||||||
|
|
||||||
|
#ifdef INDICATOR_LIGHTS
|
||||||
|
extern userspace_config_t userspace_config;
|
||||||
|
|
||||||
|
uint8_t last_mod;
|
||||||
|
uint8_t last_led;
|
||||||
|
uint8_t last_osm;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define LAYOUT_collide39_base( \
|
||||||
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
|
) \
|
||||||
|
LAYOUT_wrapper( \
|
||||||
|
MT(MOD_LALT,KC_TAB), K01, K02, K03, K04, K05, LT(RAISE,KC_PGUP), K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
|
SFT_T(KC_ESC), K11, K12, K13, K14, K15, LT(LOWER,KC_PGDN), K16, K17, K18, K19, K1A, SFT_T(KC_ENT), \
|
||||||
|
MT(MOD_LCTL,KC_DEL), K21, K22, K23, K24, K25, KC_SPACE, K26, K27, K28, K29, K2A, KC_LEAD \
|
||||||
|
)
|
||||||
|
#define LAYOUT_collide39_base_wrapper(...) LAYOUT_collide39_base(__VA_ARGS__)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||||
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||||
|
),
|
||||||
|
|
||||||
|
[_COLEMAK] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||||
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||||
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||||
|
),
|
||||||
|
|
||||||
|
[_DVORAK] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||||
|
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||||
|
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||||
|
),
|
||||||
|
|
||||||
|
#ifdef UNICODEMAP_ENABLE
|
||||||
|
[_UNICODE] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_______________UNICODE_L1__________________, _______________UNICODE_R1__________________,
|
||||||
|
_______________UNICODE_L2__________________, _______________UNICODE_R2__________________,
|
||||||
|
_______________UNICODE_L3__________________, _______________UNICODE_R3__________________
|
||||||
|
),
|
||||||
|
#endif
|
||||||
|
[_WORKMAN] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||||
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||||
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NORMAN] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
|
||||||
|
_________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
|
||||||
|
_________________NORMAN_L3_________________, _________________NORMAN_R3_________________
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MALTRON] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________MALTRON_L1________________, _________________MALTRON_R1________________,
|
||||||
|
_________________MALTRON_L2________________, _________________MALTRON_R2________________,
|
||||||
|
_________________MALTRON_L3________________, _________________MALTRON_R3________________
|
||||||
|
),
|
||||||
|
|
||||||
|
[_EUCALYN] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
|
||||||
|
_________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
|
||||||
|
_________________EUCALYN_L3________________, _________________EUCALYN_R3________________
|
||||||
|
),
|
||||||
|
|
||||||
|
[_CARPLAX] = LAYOUT_collide39_base_wrapper(
|
||||||
|
_____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
|
||||||
|
_____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
|
||||||
|
_____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[_MODS] = LAYOUT_wrapper(\
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_wrapper(\
|
||||||
|
KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC,
|
||||||
|
KC_F11, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE,
|
||||||
|
KC_F12, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_wrapper(\
|
||||||
|
KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC,
|
||||||
|
_______, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS,
|
||||||
|
_______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT_wrapper(\
|
||||||
|
KC_MAKE, _________________ADJUST_L1_________________, _______, _________________ADJUST_R1_________________, KC_RESET,
|
||||||
|
VRSN, _________________ADJUST_L2_________________, _______, _________________ADJUST_R2_________________, EEP_RST,
|
||||||
|
TG_MODS, _________________ADJUST_L3_________________, _______, _________________ADJUST_R3_________________, KC_MPLY
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_keymap(void) {
|
||||||
|
#ifndef CONVERT_TO_PROTON_C
|
||||||
|
setPinOutput(D5);
|
||||||
|
writePinHigh(D5);
|
||||||
|
setPinOutput(B0);
|
||||||
|
writePinHigh(B0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Personal keymap for the collide39
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
BOOTLOADER = caterina
|
||||||
|
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 = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
LEADER_ENABLE = yes # default is yes
|
||||||
|
TAP_DANCE_ENABLE = no #(+1254)
|
||||||
|
UNICODE_ENABLE = no #(+1134)
|
||||||
|
UNICODEMAP_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
|
||||||
|
INDICATOR_LIGHTS = no
|
||||||
|
MACROS_ENABLED = no
|
||||||
|
RGBLIGHT_TWINKLE = no
|
||||||
|
RGBLIGHT_STARTUP_ANIMATION = no
|
||||||
|
|
||||||
|
NO_SECRETS = yes
|
||||||
@@ -54,4 +54,4 @@ BACKLIGHT_ENABLE = yes
|
|||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
ENCODER_ENABLE = yes
|
ENCODER_ENABLE = yes
|
||||||
|
|
||||||
LAYOUTS = LAYOUT_ortho_5x15
|
LAYOUTS = ortho_5x15
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "hal.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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.
|
|
||||||
*/
|
|
||||||
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
|
||||||
const PALConfig pal_default_config =
|
|
||||||
{
|
|
||||||
{VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH},
|
|
||||||
{VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH},
|
|
||||||
{VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH},
|
|
||||||
{VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH},
|
|
||||||
{VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Early initialization code.
|
|
||||||
* This initialization must be performed just after stack setup and before
|
|
||||||
* any other initialization.
|
|
||||||
*/
|
|
||||||
void __early_init(void) {
|
|
||||||
|
|
||||||
stm32_clock_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Board-specific initialization code.
|
|
||||||
*/
|
|
||||||
void boardInit(void) {
|
|
||||||
}
|
|
||||||
@@ -1,166 +0,0 @@
|
|||||||
/*
|
|
||||||
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 _BOARD_H_
|
|
||||||
#define _BOARD_H_
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Setup for a Generic STM32F103 board.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Board identifier.
|
|
||||||
*/
|
|
||||||
#define BOARD_GENERIC_STM32_F103
|
|
||||||
#define BOARD_NAME "Generic STM32F103x board"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Board frequencies.
|
|
||||||
*/
|
|
||||||
#define STM32_LSECLK 32768
|
|
||||||
#define STM32_HSECLK 8000000
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
|
|
||||||
*/
|
|
||||||
#define STM32F103xB
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IO pins assignments
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* on-board */
|
|
||||||
|
|
||||||
#define GPIOC_LED 13
|
|
||||||
#define GPIOD_OSC_IN 0
|
|
||||||
#define GPIOD_OSC_OUT 1
|
|
||||||
|
|
||||||
/* In case your board has a "USB enable" hardware
|
|
||||||
controlled by a pin, define it here. (It could be just
|
|
||||||
a 1.5k resistor connected to D+ line.)
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
#define GPIOB_USB_DISC 10
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I/O ports initial setup, this configuration is established soon after reset
|
|
||||||
* in the initialization code.
|
|
||||||
*
|
|
||||||
* The digits have the following meaning:
|
|
||||||
* 0 - Analog input.
|
|
||||||
* 1 - Push Pull output 10MHz.
|
|
||||||
* 2 - Push Pull output 2MHz.
|
|
||||||
* 3 - Push Pull output 50MHz.
|
|
||||||
* 4 - Digital input.
|
|
||||||
* 5 - Open Drain output 10MHz.
|
|
||||||
* 6 - Open Drain output 2MHz.
|
|
||||||
* 7 - Open Drain output 50MHz.
|
|
||||||
* 8 - Digital input with PullUp or PullDown resistor depending on ODR.
|
|
||||||
* 9 - Alternate Push Pull output 10MHz.
|
|
||||||
* A - Alternate Push Pull output 2MHz.
|
|
||||||
* B - Alternate Push Pull output 50MHz.
|
|
||||||
* C - Reserved.
|
|
||||||
* D - Alternate Open Drain output 10MHz.
|
|
||||||
* E - Alternate Open Drain output 2MHz.
|
|
||||||
* F - Alternate Open Drain output 50MHz.
|
|
||||||
* Please refer to the STM32 Reference Manual for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Port A setup.
|
|
||||||
* Everything input with pull-up except:
|
|
||||||
* PA2 - Alternate output (USART2 TX).
|
|
||||||
* PA3 - Normal input (USART2 RX).
|
|
||||||
* PA9 - Alternate output (USART1 TX).
|
|
||||||
* PA10 - Normal input (USART1 RX).
|
|
||||||
*/
|
|
||||||
#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */
|
|
||||||
#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */
|
|
||||||
#define VAL_GPIOAODR 0xFFFFFFFF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Port B setup.
|
|
||||||
* Everything input with pull-up except:
|
|
||||||
* PB10 - Push Pull output (USB switch).
|
|
||||||
*/
|
|
||||||
#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
|
|
||||||
#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */
|
|
||||||
#define VAL_GPIOBODR 0xFFFFFFFF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Port C setup.
|
|
||||||
* Everything input with pull-up except:
|
|
||||||
* PC13 - Push Pull output (LED).
|
|
||||||
*/
|
|
||||||
#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */
|
|
||||||
#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */
|
|
||||||
#define VAL_GPIOCODR 0xFFFFFFFF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Port D setup.
|
|
||||||
* Everything input with pull-up except:
|
|
||||||
* PD0 - Normal input (XTAL).
|
|
||||||
* PD1 - Normal input (XTAL).
|
|
||||||
*/
|
|
||||||
#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */
|
|
||||||
#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */
|
|
||||||
#define VAL_GPIODODR 0xFFFFFFFF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Port E setup.
|
|
||||||
* Everything input with pull-up except:
|
|
||||||
*/
|
|
||||||
#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */
|
|
||||||
#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
|
|
||||||
#define VAL_GPIOEODR 0xFFFFFFFF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* USB bus activation macro, required by the USB driver.
|
|
||||||
*/
|
|
||||||
/* The point is that most of the generic STM32F103* boards
|
|
||||||
have a 1.5k resistor connected on one end to the D+ line
|
|
||||||
and on the other end to some pin. Or even a slightly more
|
|
||||||
complicated "USB enable" circuit, controlled by a pin.
|
|
||||||
That should go here.
|
|
||||||
|
|
||||||
However on some boards (e.g. one that I have), there's no
|
|
||||||
such hardware. In which case it's better to not do anything.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)
|
|
||||||
*/
|
|
||||||
#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* USB bus de-activation macro, required by the USB driver.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC)
|
|
||||||
*/
|
|
||||||
#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12);
|
|
||||||
|
|
||||||
#if !defined(_FROM_ASM_)
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
void boardInit(void);
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* _FROM_ASM_ */
|
|
||||||
|
|
||||||
#endif /* _BOARD_H_ */
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 159 KiB |
@@ -1,111 +0,0 @@
|
|||||||
/*
|
|
||||||
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) {
|
|
||||||
}
|
|
||||||
@@ -1,923 +0,0 @@
|
|||||||
/*
|
|
||||||
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: LSE not fitted.
|
|
||||||
* NOTE: HSE not fitted.
|
|
||||||
*/
|
|
||||||
#if !defined(STM32_LSECLK)
|
|
||||||
#define STM32_LSECLK 0U
|
|
||||||
#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 */
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# 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
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 232 KiB |
@@ -1 +0,0 @@
|
|||||||
#include "chibios_test.h"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#ifndef KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_
|
|
||||||
#define KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_
|
|
||||||
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
#define LAYOUT(k00) {{ k00 }}
|
|
||||||
|
|
||||||
#endif /* KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_ */
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
|
|
||||||
* (C) 2016 flabbergast <[email protected]>
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
* a copy of this software and associated documentation files (the "Software"),
|
|
||||||
* to deal in the Software without restriction, including without limitation
|
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* KL26Z64 memory setup.
|
|
||||||
*/
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash0 : org = 0x00000000, len = 0x100
|
|
||||||
flash1 : org = 0x00000400, len = 0x10
|
|
||||||
flash2 : org = 0x00000410, len = 62k - 0x410
|
|
||||||
flash3 : org = 0x0000F800, len = 2k
|
|
||||||
flash4 : org = 0x00000000, len = 0
|
|
||||||
flash5 : org = 0x00000000, len = 0
|
|
||||||
flash6 : org = 0x00000000, len = 0
|
|
||||||
flash7 : org = 0x00000000, len = 0
|
|
||||||
ram0 : org = 0x1FFFF800, len = 8k
|
|
||||||
ram1 : org = 0x00000000, len = 0
|
|
||||||
ram2 : org = 0x00000000, len = 0
|
|
||||||
ram3 : org = 0x00000000, len = 0
|
|
||||||
ram4 : org = 0x00000000, len = 0
|
|
||||||
ram5 : org = 0x00000000, len = 0
|
|
||||||
ram6 : org = 0x00000000, len = 0
|
|
||||||
ram7 : org = 0x00000000, len = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Flash region for the configuration bytes.*/
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.cfmprotect : ALIGN(4) SUBALIGN(4)
|
|
||||||
{
|
|
||||||
KEEP(*(.cfmconfig))
|
|
||||||
} > flash1
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For each data/text section two region are defined, a virtual region
|
|
||||||
and a load region (_LMA suffix).*/
|
|
||||||
|
|
||||||
/* Flash region to be used for exception vectors.*/
|
|
||||||
REGION_ALIAS("VECTORS_FLASH", flash0);
|
|
||||||
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* Flash region to be used for constructors and destructors.*/
|
|
||||||
REGION_ALIAS("XTORS_FLASH", flash2);
|
|
||||||
REGION_ALIAS("XTORS_FLASH_LMA", flash2);
|
|
||||||
|
|
||||||
/* Flash region to be used for code text.*/
|
|
||||||
REGION_ALIAS("TEXT_FLASH", flash2);
|
|
||||||
REGION_ALIAS("TEXT_FLASH_LMA", flash2);
|
|
||||||
|
|
||||||
/* Flash region to be used for read only data.*/
|
|
||||||
REGION_ALIAS("RODATA_FLASH", flash2);
|
|
||||||
REGION_ALIAS("RODATA_FLASH_LMA", flash2);
|
|
||||||
|
|
||||||
/* Flash region to be used for various.*/
|
|
||||||
REGION_ALIAS("VARIOUS_FLASH", flash2);
|
|
||||||
REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
|
|
||||||
|
|
||||||
/* Flash region to be used for RAM(n) initialization data.*/
|
|
||||||
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
|
|
||||||
|
|
||||||
/* RAM region to be used for Main stack. This stack accommodates the processing
|
|
||||||
of all exceptions and interrupts.*/
|
|
||||||
REGION_ALIAS("MAIN_STACK_RAM", ram0);
|
|
||||||
|
|
||||||
/* RAM region to be used for the process stack. This is the stack used by
|
|
||||||
the main() function.*/
|
|
||||||
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
|
|
||||||
|
|
||||||
/* RAM region to be used for data segment.*/
|
|
||||||
REGION_ALIAS("DATA_RAM", ram0);
|
|
||||||
REGION_ALIAS("DATA_RAM_LMA", flash2);
|
|
||||||
|
|
||||||
/* RAM region to be used for BSS segment.*/
|
|
||||||
REGION_ALIAS("BSS_RAM", ram0);
|
|
||||||
|
|
||||||
/* RAM region to be used for the default heap.*/
|
|
||||||
REGION_ALIAS("HEAP_RAM", ram0);
|
|
||||||
|
|
||||||
__eeprom_workarea_start__ = ORIGIN(flash3);
|
|
||||||
__eeprom_workarea_size__ = LENGTH(flash3);
|
|
||||||
__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__;
|
|
||||||
|
|
||||||
/* Generic rules inclusion.*/
|
|
||||||
INCLUDE rules.ld
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
/*
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ST32F103xB memory setup for use with the maplemini bootloader.
|
|
||||||
* You will have to
|
|
||||||
* #define CORTEX_VTOR_INIT 0x5000
|
|
||||||
* in your projects chconf.h
|
|
||||||
*/
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash0 : org = 0x08002000, len = 128k - 0x2000
|
|
||||||
flash1 : org = 0x00000000, len = 0
|
|
||||||
flash2 : org = 0x00000000, len = 0
|
|
||||||
flash3 : org = 0x00000000, len = 0
|
|
||||||
flash4 : org = 0x00000000, len = 0
|
|
||||||
flash5 : org = 0x00000000, len = 0
|
|
||||||
flash6 : org = 0x00000000, len = 0
|
|
||||||
flash7 : org = 0x00000000, len = 0
|
|
||||||
ram0 : org = 0x20000000, len = 20k
|
|
||||||
ram1 : org = 0x00000000, len = 0
|
|
||||||
ram2 : org = 0x00000000, len = 0
|
|
||||||
ram3 : org = 0x00000000, len = 0
|
|
||||||
ram4 : org = 0x00000000, len = 0
|
|
||||||
ram5 : org = 0x00000000, len = 0
|
|
||||||
ram6 : org = 0x00000000, len = 0
|
|
||||||
ram7 : org = 0x00000000, len = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For each data/text section two region are defined, a virtual region
|
|
||||||
and a load region (_LMA suffix).*/
|
|
||||||
|
|
||||||
/* Flash region to be used for exception vectors.*/
|
|
||||||
REGION_ALIAS("VECTORS_FLASH", flash0);
|
|
||||||
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* Flash region to be used for constructors and destructors.*/
|
|
||||||
REGION_ALIAS("XTORS_FLASH", flash0);
|
|
||||||
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* Flash region to be used for code text.*/
|
|
||||||
REGION_ALIAS("TEXT_FLASH", flash0);
|
|
||||||
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* Flash region to be used for read only data.*/
|
|
||||||
REGION_ALIAS("RODATA_FLASH", flash0);
|
|
||||||
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* Flash region to be used for various.*/
|
|
||||||
REGION_ALIAS("VARIOUS_FLASH", flash0);
|
|
||||||
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* Flash region to be used for RAM(n) initialization data.*/
|
|
||||||
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
|
|
||||||
|
|
||||||
/* RAM region to be used for Main stack. This stack accommodates the processing
|
|
||||||
of all exceptions and interrupts.*/
|
|
||||||
REGION_ALIAS("MAIN_STACK_RAM", ram0);
|
|
||||||
|
|
||||||
/* RAM region to be used for the process stack. This is the stack used by
|
|
||||||
the main() function.*/
|
|
||||||
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
|
|
||||||
|
|
||||||
/* RAM region to be used for data segment.*/
|
|
||||||
REGION_ALIAS("DATA_RAM", ram0);
|
|
||||||
REGION_ALIAS("DATA_RAM_LMA", flash0);
|
|
||||||
|
|
||||||
/* RAM region to be used for BSS segment.*/
|
|
||||||
REGION_ALIAS("BSS_RAM", ram0);
|
|
||||||
|
|
||||||
/* RAM region to be used for the default heap.*/
|
|
||||||
REGION_ALIAS("HEAP_RAM", ram0);
|
|
||||||
|
|
||||||
/* Generic rules inclusion.*/
|
|
||||||
INCLUDE rules.ld
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# ChibiOS Test Keyboards
|
|
||||||
|
|
||||||
Test code for several ARM based ChibiOS boards
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#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 = yes # Custom matrix file
|
|
||||||
|
|
||||||
DEFAULT_FOLDER = chibios_test/stm32_f072_onekey
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/* 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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#ifndef KEYBOARDS_CHIBIOS_TEST_STM32_F072_ONEKEY_CONFIG_H_
|
|
||||||
#define KEYBOARDS_CHIBIOS_TEST_STM32_F072_ONEKEY_CONFIG_H_
|
|
||||||
|
|
||||||
#include "../config.h"
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* KEYBOARDS_CHIBIOS_TEST_STM32_F072_ONEKEY_CONFIG_H_ */
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2012 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 "ch.h"
|
|
||||||
#include "hal.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* scan matrix
|
|
||||||
*/
|
|
||||||
#include "print.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "matrix.h"
|
|
||||||
#include "wait.h"
|
|
||||||
|
|
||||||
#ifndef DEBOUNCE
|
|
||||||
# define DEBOUNCE 5
|
|
||||||
#endif
|
|
||||||
static uint8_t debouncing = DEBOUNCE;
|
|
||||||
|
|
||||||
/* matrix state(1:on, 0:off) */
|
|
||||||
static matrix_row_t matrix[MATRIX_ROWS];
|
|
||||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
|
||||||
|
|
||||||
static matrix_row_t read_cols(void);
|
|
||||||
static void init_cols(void);
|
|
||||||
static void unselect_rows(void);
|
|
||||||
static void select_row(uint8_t row);
|
|
||||||
|
|
||||||
|
|
||||||
inline
|
|
||||||
uint8_t matrix_rows(void)
|
|
||||||
{
|
|
||||||
return MATRIX_ROWS;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
uint8_t matrix_cols(void)
|
|
||||||
{
|
|
||||||
return MATRIX_COLS;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LED_ON() do { palSetPad(GPIOC, GPIOC_LED_BLUE) ;} while (0)
|
|
||||||
#define LED_OFF() do { palClearPad(GPIOC, GPIOC_LED_BLUE); } while (0)
|
|
||||||
#define LED_TGL() do { palTogglePad(GPIOC, GPIOC_LED_BLUE); } while (0)
|
|
||||||
|
|
||||||
void matrix_init(void)
|
|
||||||
{
|
|
||||||
// initialize row and col
|
|
||||||
unselect_rows();
|
|
||||||
init_cols();
|
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = 0;
|
|
||||||
matrix_debouncing[i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//debug
|
|
||||||
debug_matrix = true;
|
|
||||||
LED_ON();
|
|
||||||
wait_ms(500);
|
|
||||||
LED_OFF();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t matrix_scan(void)
|
|
||||||
{
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
select_row(i);
|
|
||||||
wait_us(30); // without this wait read unstable value.
|
|
||||||
matrix_row_t cols = read_cols();
|
|
||||||
if (matrix_debouncing[i] != cols) {
|
|
||||||
matrix_debouncing[i] = cols;
|
|
||||||
if (debouncing) {
|
|
||||||
debug("bounce!: "); debug_hex(debouncing); debug("\n");
|
|
||||||
}
|
|
||||||
debouncing = DEBOUNCE;
|
|
||||||
}
|
|
||||||
unselect_rows();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debouncing) {
|
|
||||||
if (--debouncing) {
|
|
||||||
wait_ms(1);
|
|
||||||
} else {
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = matrix_debouncing[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
|
||||||
{
|
|
||||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
matrix_row_t matrix_get_row(uint8_t row)
|
|
||||||
{
|
|
||||||
return matrix[row];
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_print(void)
|
|
||||||
{
|
|
||||||
print("\nr/c 0123456789ABCDEF\n");
|
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
phex(row); print(": ");
|
|
||||||
pbin_reverse16(matrix_get_row(row));
|
|
||||||
print("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Column pin configuration
|
|
||||||
*/
|
|
||||||
static void init_cols(void)
|
|
||||||
{
|
|
||||||
// don't need pullup/down, since it's pulled down in hardware
|
|
||||||
palSetPadMode(GPIOA, GPIOA_BUTTON, PAL_MODE_INPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns status of switches(1:on, 0:off) */
|
|
||||||
static matrix_row_t read_cols(void)
|
|
||||||
{
|
|
||||||
return ((palReadPad(GPIOA, GPIOA_BUTTON)==PAL_LOW) ? 0 : (1<<0));
|
|
||||||
// | ((palReadPad(...)==PAL_HIGH) ? 0 : (1<<1))
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Row pin configuration
|
|
||||||
*/
|
|
||||||
static void unselect_rows(void)
|
|
||||||
{
|
|
||||||
// palSetPadMode(GPIOA, GPIOA_PIN10, PAL_MODE_INPUT); // hi-Z
|
|
||||||
}
|
|
||||||
|
|
||||||
static void select_row(uint8_t row)
|
|
||||||
{
|
|
||||||
(void)row;
|
|
||||||
// Output low to select
|
|
||||||
// switch (row) {
|
|
||||||
// case 0:
|
|
||||||
// palSetPadMode(GPIOA, GPIOA_PIN10, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
// palSetPad(GPIOA, GPIOA_PIN10, PAL_LOW);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# ChibiOS Test
|
|
||||||
|
|
||||||
Test code for the stm32_f072 one key keyboard
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#include "stm32_f072_onekey.h"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#ifndef STM32_F072_ONEKEY_H
|
|
||||||
#define STM32_F072_ONEKEY_H
|
|
||||||
#include "chibios_test.h"
|
|
||||||
|
|
||||||
#define LAYOUT(k00) {{ k00 }}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
/* 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
// STM32F103* does NOT have an USB bootloader in ROM (only serial),
|
|
||||||
// so setting anything here does not make much sense
|
|
||||||
// #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#ifndef KEYBOARDS_CHIBIOS_TEST_STM32_F103_ONEKEY_CONFIG_H_
|
|
||||||
#define KEYBOARDS_CHIBIOS_TEST_STM32_F103_ONEKEY_CONFIG_H_
|
|
||||||
|
|
||||||
#include "../config.h"
|
|
||||||
|
|
||||||
#endif /* KEYBOARDS_CHIBIOS_TEST_STM32_F103_ONEKEY_CONFIG_H_ */
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
Arduino_STM32_usb_hid/tools/linux/maple_upload ttyACM0 2 1EAF:0003 build/ch.bin
|
|
||||||
@@ -1,353 +0,0 @@
|
|||||||
/*
|
|
||||||
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 FALSE
|
|
||||||
#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 FALSE
|
|
||||||
#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 FALSE
|
|
||||||
#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_ */
|
|
||||||
|
|
||||||
/** @} */
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2012 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 "ch.h"
|
|
||||||
#include "hal.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* scan matrix
|
|
||||||
*/
|
|
||||||
#include "print.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "matrix.h"
|
|
||||||
#include "wait.h"
|
|
||||||
|
|
||||||
#ifndef DEBOUNCE
|
|
||||||
# define DEBOUNCE 5
|
|
||||||
#endif
|
|
||||||
static uint8_t debouncing = DEBOUNCE;
|
|
||||||
|
|
||||||
/* matrix state(1:on, 0:off) */
|
|
||||||
static matrix_row_t matrix[MATRIX_ROWS];
|
|
||||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
|
||||||
|
|
||||||
static matrix_row_t read_cols(void);
|
|
||||||
static void init_cols(void);
|
|
||||||
static void unselect_rows(void);
|
|
||||||
static void select_row(uint8_t row);
|
|
||||||
|
|
||||||
|
|
||||||
inline
|
|
||||||
uint8_t matrix_rows(void)
|
|
||||||
{
|
|
||||||
return MATRIX_ROWS;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
uint8_t matrix_cols(void)
|
|
||||||
{
|
|
||||||
return MATRIX_COLS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* generic STM32F103C8T6 board */
|
|
||||||
#ifdef BOARD_GENERIC_STM32_F103
|
|
||||||
#define LED_ON() do { palClearPad(GPIOC, GPIOC_LED) ;} while (0)
|
|
||||||
#define LED_OFF() do { palSetPad(GPIOC, GPIOC_LED); } while (0)
|
|
||||||
#define LED_TGL() do { palTogglePad(GPIOC, GPIOC_LED); } while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Maple Mini */
|
|
||||||
#ifdef BOARD_MAPLEMINI_STM32_F103
|
|
||||||
#define LED_ON() do { palSetPad(GPIOB, 1) ;} while (0)
|
|
||||||
#define LED_OFF() do { palClearPad(GPIOB, 1); } while (0)
|
|
||||||
#define LED_TGL() do { palTogglePad(GPIOB, 1); } while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void matrix_init(void)
|
|
||||||
{
|
|
||||||
// initialize row and col
|
|
||||||
unselect_rows();
|
|
||||||
init_cols();
|
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = 0;
|
|
||||||
matrix_debouncing[i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//debug
|
|
||||||
debug_matrix = true;
|
|
||||||
LED_ON();
|
|
||||||
wait_ms(500);
|
|
||||||
LED_OFF();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t matrix_scan(void)
|
|
||||||
{
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
select_row(i);
|
|
||||||
wait_us(30); // without this wait read unstable value.
|
|
||||||
matrix_row_t cols = read_cols();
|
|
||||||
if (matrix_debouncing[i] != cols) {
|
|
||||||
matrix_debouncing[i] = cols;
|
|
||||||
if (debouncing) {
|
|
||||||
debug("bounce!: "); debug_hex(debouncing); debug("\n");
|
|
||||||
}
|
|
||||||
debouncing = DEBOUNCE;
|
|
||||||
}
|
|
||||||
unselect_rows();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debouncing) {
|
|
||||||
if (--debouncing) {
|
|
||||||
wait_ms(1);
|
|
||||||
} else {
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = matrix_debouncing[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
|
||||||
{
|
|
||||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
matrix_row_t matrix_get_row(uint8_t row)
|
|
||||||
{
|
|
||||||
return matrix[row];
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_print(void)
|
|
||||||
{
|
|
||||||
print("\nr/c 0123456789ABCDEF\n");
|
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
phex(row); print(": ");
|
|
||||||
pbin_reverse16(matrix_get_row(row));
|
|
||||||
print("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Column pin configuration
|
|
||||||
*/
|
|
||||||
static void init_cols(void)
|
|
||||||
{
|
|
||||||
#ifdef BOARD_MAPLEMINI_STM32_F103
|
|
||||||
// don't need pullup/down, since it's pulled down in hardware
|
|
||||||
palSetPadMode(GPIOB, 8, PAL_MODE_INPUT);
|
|
||||||
#else
|
|
||||||
palSetPadMode(GPIOB, 8, PAL_MODE_INPUT_PULLDOWN);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns status of switches(1:on, 0:off) */
|
|
||||||
static matrix_row_t read_cols(void)
|
|
||||||
{
|
|
||||||
return ((palReadPad(GPIOB, 8)==PAL_LOW) ? 0 : (1<<0));
|
|
||||||
// | ((palReadPad(...)==PAL_HIGH) ? 0 : (1<<1))
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Row pin configuration
|
|
||||||
*/
|
|
||||||
static void unselect_rows(void)
|
|
||||||
{
|
|
||||||
// palSetPadMode(GPIOA, GPIOA_PIN10, PAL_MODE_INPUT); // hi-Z
|
|
||||||
}
|
|
||||||
|
|
||||||
static void select_row(uint8_t row)
|
|
||||||
{
|
|
||||||
(void)row;
|
|
||||||
// Output low to select
|
|
||||||
// switch (row) {
|
|
||||||
// case 0:
|
|
||||||
// palSetPadMode(GPIOA, GPIOA_PIN10, PAL_MODE_OUTPUT_PUSHPULL);
|
|
||||||
// palSetPad(GPIOA, GPIOA_PIN10, PAL_LOW);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# ChibiOS Test
|
|
||||||
|
|
||||||
Test code for the stm32_f103 one key keyboard
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
# project specific files
|
|
||||||
SRC = matrix.c \
|
|
||||||
led.c
|
|
||||||
|
|
||||||
# GENERIC STM32F103C8T6 board - stm32duino bootloader
|
|
||||||
OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
|
|
||||||
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
|
||||||
BOARD = GENERIC_STM32_F103
|
|
||||||
|
|
||||||
# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
|
|
||||||
# OPT_DEFS =
|
|
||||||
# MCU_LDSCRIPT = STM32F103x8
|
|
||||||
# BOARD = GENERIC_STM32_F103
|
|
||||||
|
|
||||||
# MAPLE MINI
|
|
||||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
|
|
||||||
# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader
|
|
||||||
# BOARD = MAPLEMINI_STM32_F103
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
MCU_FAMILY = STM32
|
|
||||||
MCU_SERIES = STM32F1xx
|
|
||||||
# linker script to use
|
|
||||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
|
||||||
# or <this_dir>/ld/
|
|
||||||
# startup code to use
|
|
||||||
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
MCU_STARTUP = stm32f1xx
|
|
||||||
# it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m3
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
ARMV = 7
|
|
||||||
# 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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#include "stm32_f103_onekey.h"
|
|
||||||
Loaded 100 of 780 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user