mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-18 05:32:05 +00:00
Merge branch 'master' of https://github.com/qmk/qmk_firmware
This commit is contained in:
commit
2641ba7906
@ -23,4 +23,4 @@ endif
|
|||||||
|
|
||||||
# Generate the keymap.c
|
# Generate the keymap.c
|
||||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||||
bin/qmk json-keymap --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||||
|
@ -141,6 +141,10 @@ else
|
|||||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||||
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
|
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
|
||||||
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
||||||
|
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
|
||||||
else
|
else
|
||||||
# This will effectively work the same as "transient" if not supported by the chip
|
# This will effectively work the same as "transient" if not supported by the chip
|
||||||
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders.md).
|
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders.md).
|
||||||
|
|
||||||
This driver is currently AVR-only. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V).
|
This driver currently supports both AVR and a limited selection of ARM devices. On AVR devices, the values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V). On supported ARM devices, there is more flexibility in control of operation through `#define`s, but by default the values returned are 12-bit integers (0-4095) mapped between 0V and VCC (usually 3.3V).
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -20,6 +20,8 @@ Then place this include at the top of your code:
|
|||||||
|
|
||||||
## Channels
|
## Channels
|
||||||
|
|
||||||
|
### AVR
|
||||||
|
|
||||||
|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328P|
|
|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328P|
|
||||||
|-------|-------------|-------------|---------|----------|
|
|-------|-------------|-------------|---------|----------|
|
||||||
|0 |`F0` |`F0` |`A0` |`C0` |
|
|0 |`F0` |`F0` |`A0` |`C0` |
|
||||||
@ -39,8 +41,84 @@ Then place this include at the top of your code:
|
|||||||
|
|
||||||
<sup>\* The ATmega328P possesses two extra ADC channels; however, they are not present on the DIP pinout, and are not shared with GPIO pins. You can use `adc_read()` directly to gain access to these.</sup>
|
<sup>\* The ATmega328P possesses two extra ADC channels; however, they are not present on the DIP pinout, and are not shared with GPIO pins. You can use `adc_read()` directly to gain access to these.</sup>
|
||||||
|
|
||||||
|
### ARM
|
||||||
|
|
||||||
|
Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC.
|
||||||
|
|
||||||
|
Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-based, whereas the F3 has 4 ADCs and the channels are 1 based. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
|
||||||
|
|
||||||
|
|ADC|Channel|STM32F0XX|STM32F3XX|
|
||||||
|
|---|-------|---------|---------|
|
||||||
|
|1 |0 |`A0` | |
|
||||||
|
|1 |1 |`A1` |`A0` |
|
||||||
|
|1 |2 |`A2` |`A1` |
|
||||||
|
|1 |3 |`A3` |`A2` |
|
||||||
|
|1 |4 |`A4` |`A3` |
|
||||||
|
|1 |5 |`A5` |`F4` |
|
||||||
|
|1 |6 |`A6` |`C0` |
|
||||||
|
|1 |7 |`A7` |`C1` |
|
||||||
|
|1 |8 |`B0` |`C2` |
|
||||||
|
|1 |9 |`B1` |`C3` |
|
||||||
|
|1 |10 |`C0` |`F2` |
|
||||||
|
|1 |11 |`C1` | |
|
||||||
|
|1 |12 |`C2` | |
|
||||||
|
|1 |13 |`C3` | |
|
||||||
|
|1 |14 |`C4` | |
|
||||||
|
|1 |15 |`C5` | |
|
||||||
|
|1 |16 | | |
|
||||||
|
|2 |1 | |`A4` |
|
||||||
|
|2 |2 | |`A5` |
|
||||||
|
|2 |3 | |`A6` |
|
||||||
|
|2 |4 | |`A7` |
|
||||||
|
|2 |5 | |`C4` |
|
||||||
|
|2 |6 | |`C0` |
|
||||||
|
|2 |7 | |`C1` |
|
||||||
|
|2 |8 | |`C2` |
|
||||||
|
|2 |9 | |`C3` |
|
||||||
|
|2 |10 | |`F2` |
|
||||||
|
|2 |11 | |`C5` |
|
||||||
|
|2 |12 | |`B2` |
|
||||||
|
|2 |13 | | |
|
||||||
|
|2 |14 | | |
|
||||||
|
|2 |15 | | |
|
||||||
|
|2 |16 | | |
|
||||||
|
|3 |1 | |`B1` |
|
||||||
|
|3 |2 | |`E9` |
|
||||||
|
|3 |3 | |`E13` |
|
||||||
|
|3 |4 | | |
|
||||||
|
|3 |5 | | |
|
||||||
|
|3 |6 | |`E8` |
|
||||||
|
|3 |7 | |`D10` |
|
||||||
|
|3 |8 | |`D11` |
|
||||||
|
|3 |9 | |`D12` |
|
||||||
|
|3 |10 | |`D13` |
|
||||||
|
|3 |11 | |`D14` |
|
||||||
|
|3 |12 | |`B0` |
|
||||||
|
|3 |13 | |`E7` |
|
||||||
|
|3 |14 | |`E10` |
|
||||||
|
|3 |15 | |`E11` |
|
||||||
|
|3 |16 | |`E12` |
|
||||||
|
|4 |1 | |`E14` |
|
||||||
|
|4 |2 | |`B12` |
|
||||||
|
|4 |3 | |`B13` |
|
||||||
|
|4 |4 | |`B14` |
|
||||||
|
|4 |5 | |`B15` |
|
||||||
|
|4 |6 | |`E8` |
|
||||||
|
|4 |7 | |`D10` |
|
||||||
|
|4 |8 | |`D11` |
|
||||||
|
|4 |9 | |`D12` |
|
||||||
|
|4 |10 | |`D13` |
|
||||||
|
|4 |11 | |`D14` |
|
||||||
|
|4 |12 | |`D8` |
|
||||||
|
|4 |13 | |`D9` |
|
||||||
|
|4 |14 | | |
|
||||||
|
|4 |15 | | |
|
||||||
|
|4 |16 | | |
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|
### AVR
|
||||||
|
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|----------------------------|-------------------------------------------------------------------------------------------------------------------|
|
|----------------------------|-------------------------------------------------------------------------------------------------------------------|
|
||||||
|`analogReference(mode)` |Sets the analog voltage reference source. Must be one of `ADC_REF_EXTERNAL`, `ADC_REF_POWER` or `ADC_REF_INTERNAL`.|
|
|`analogReference(mode)` |Sets the analog voltage reference source. Must be one of `ADC_REF_EXTERNAL`, `ADC_REF_POWER` or `ADC_REF_INTERNAL`.|
|
||||||
@ -48,3 +126,28 @@ Then place this include at the top of your code:
|
|||||||
|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `F6` for ADC6 on the ATmega32U4. |
|
|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `F6` for ADC6 on the ATmega32U4. |
|
||||||
|`pinToMux(pin)` |Translates a given QMK pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". |
|
|`pinToMux(pin)` |Translates a given QMK pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". |
|
||||||
|`adc_read(mux)` |Reads the value from the ADC according to the specified mux. See your MCU's datasheet for more information. |
|
|`adc_read(mux)` |Reads the value from the ADC according to the specified mux. See your MCU's datasheet for more information. |
|
||||||
|
|
||||||
|
### ARM
|
||||||
|
|
||||||
|
Note that care was taken to match all of the functions used for AVR devices, however complications in the ARM platform prevent that from always being possible. For example, the `STM32` chips do not have assigned Arduino pins. We could use the default pin numbers, but those numbers change based on the package type of the device. For this reason, please specify your target pins with their identifiers (`A0`, `F3`, etc.). Also note that there are some variants of functions that accept the target ADC for the pin. Some pins can be used for multiple ADCs, and this specified can help you pick which ADC will be used to interact with that pin.
|
||||||
|
|
||||||
|
|Function |Description |
|
||||||
|
|----------------------------|--------------------------------------------------------------------------------------------------------------------|
|
||||||
|
|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `A0` for channel 0 on the STM32F0 and ADC1 channel 1 on the STM32F3. Note that if a pin can be used for multiple ADCs, it will pick the lower numbered ADC for this function. eg. `C0` will be channel 6 of ADC 1 when it could be used for ADC 2 as well.|
|
||||||
|
|`analogReadPinAdc(pin, adc)`|Reads the value from the specified QMK pin and ADC, eg. `C0, 1` will read from channel 6, ADC 2 instead of ADC 1. Note that the ADCs are 0-indexed for this function.|
|
||||||
|
|`pinToMux(pin)` |Translates a given QMK pin to a channel and ADC combination. If an unsupported pin is given, returns the mux value for "0V (GND)".|
|
||||||
|
|`adc_read(mux)` |Reads the value from the ADC according to the specified pin and adc combination. See your MCU's datasheet for more information.|
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
## ARM
|
||||||
|
|
||||||
|
The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates.
|
||||||
|
|
||||||
|
|`#define` |Type |Default |Description|
|
||||||
|
|-------------------|------|---------------------|-----------|
|
||||||
|
|ADC_CIRCULAR_BUFFER|`bool`|`false` |If `TRUE`, then the implementation will use a circular buffer.|
|
||||||
|
|ADC_NUM_CHANNELS |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`.|
|
||||||
|
|ADC_BUFFER_DEPTH |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to `2` bytes so we can contain our one value. This could be set to 1 if you opt for a 8-bit or lower result.|
|
||||||
|
|ADC_SAMPLING_RATE |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.|
|
||||||
|
|ADC_RESOLUTION |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.|
|
||||||
|
@ -231,14 +231,14 @@ Check your environment and report problems only:
|
|||||||
|
|
||||||
qmk doctor -n
|
qmk doctor -n
|
||||||
|
|
||||||
## `qmk json-keymap`
|
## `qmk json2c`
|
||||||
|
|
||||||
Creates a keymap.c from a QMK Configurator export.
|
Creates a keymap.c from a QMK Configurator export.
|
||||||
|
|
||||||
**Usage**:
|
**Usage**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk json-keymap [-o OUTPUT] filename
|
qmk json2c [-o OUTPUT] filename
|
||||||
```
|
```
|
||||||
|
|
||||||
## `qmk kle2json`
|
## `qmk kle2json`
|
||||||
|
@ -190,6 +190,8 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* pin the DI on the WS2812 is hooked-up to
|
* pin the DI on the WS2812 is hooked-up to
|
||||||
* `#define RGBLIGHT_ANIMATIONS`
|
* `#define RGBLIGHT_ANIMATIONS`
|
||||||
* run RGB animations
|
* run RGB animations
|
||||||
|
* `#define RGBLIGHT_LAYERS`
|
||||||
|
* Lets you define [lighting layers](feature_rgblight.md) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||||
* `#define RGBLED_NUM 12`
|
* `#define RGBLED_NUM 12`
|
||||||
* number of LEDs
|
* number of LEDs
|
||||||
* `#define RGBLIGHT_SPLIT`
|
* `#define RGBLIGHT_SPLIT`
|
||||||
|
@ -3,13 +3,15 @@
|
|||||||
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
||||||
|
|
||||||
Driver | Description
|
Driver | Description
|
||||||
--------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
`EEPROM_DRIVER = vendor` | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. Other chips will generally act as "transient" below.
|
`EEPROM_DRIVER = vendor` (default) | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
|
||||||
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
||||||
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
||||||
|
|
||||||
## Vendor Driver Configuration
|
## Vendor Driver Configuration
|
||||||
|
|
||||||
|
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
|
||||||
|
|
||||||
No configurable options are available.
|
No configurable options are available.
|
||||||
|
|
||||||
## I2C Driver Configuration
|
## I2C Driver Configuration
|
||||||
|
@ -172,6 +172,62 @@ const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
|||||||
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Lighting Layers
|
||||||
|
|
||||||
|
By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make
|
||||||
|
it easy to use your underglow LEDs as status indicators to show which keyboard layer is currently active, or the state of caps lock, all without disrupting any animations. [Here's a video](https://youtu.be/uLGE1epbmdY) showing an example of what you can do.
|
||||||
|
|
||||||
|
To define a layer, we modify `keymap.c` to list out LED ranges and the colors we want to overlay on them using an array of `rgblight_segment_t` using the `RGBLIGHT_LAYER_SEGMENTS` macro. We can define multiple layers and enable/disable them independently:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// Light LEDs 6 to 9 and 12 to 15 red when caps lock is active. Hard to ignore!
|
||||||
|
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{6, 4, HSV_RED}, // Light 4 LEDs, starting with LED 6
|
||||||
|
{12, 4, HSV_RED} // Light 4 LEDs, starting with LED 12
|
||||||
|
);
|
||||||
|
// Light LEDs 9 & 10 in cyan when keyboard layer 1 is active
|
||||||
|
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{9, 2, HSV_CYAN}
|
||||||
|
);
|
||||||
|
// Light LEDs 11 & 12 in purple when keyboard layer 2 is active
|
||||||
|
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{11, 2, HSV_PURPLE},
|
||||||
|
);
|
||||||
|
// etc..
|
||||||
|
```
|
||||||
|
|
||||||
|
We combine these layers into an array using the `RGBLIGHT_LAYERS_LIST` macro, and assign it to the `rgblight_layers` variable during keyboard setup. Note that you can only define up to 8 lighting layers. Any extra layers will be ignored. Since the different lighting layers overlap, the order matters in the array, with later layers taking precedence:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// Now define the array of layers. Later layers take precedence
|
||||||
|
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||||
|
my_capslock_layer,
|
||||||
|
my_layer1_layer, // Overrides caps lock layer
|
||||||
|
my_layer2_layer // Overrides other layers
|
||||||
|
);
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Enable the LED layers
|
||||||
|
rgblight_layers = my_rgb_layers;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, we enable and disable the lighting layers whenever the state of the keyboard changes:
|
||||||
|
|
||||||
|
```c
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
// Both layers will light up if both kb layers are active
|
||||||
|
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||||
|
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_user(led_t led_state) {
|
||||||
|
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
||||||
@ -263,6 +319,12 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2
|
|||||||
|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||||
|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|
|
||||||
|
#### layer functions
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgblight_get_layer_state(i)` |Returns `true` if lighting layer `i` is enabled |
|
||||||
|
|`rgblight_set_layer_state(i, is_on)` |Enable or disable lighting layer `i` based on value of `bool is_on` |
|
||||||
|
|
||||||
#### query
|
#### query
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|-----------------------|-----------------|
|
|-----------------------|-----------------|
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css" title="light">
|
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css" title="light">
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css" media="(prefers-color-scheme: dark)">
|
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css" media="(prefers-color-scheme: dark)">
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify-toc@1.0.0/dist/toc.css">
|
<link rel="stylesheet" href="//unpkg.com/docsify-toc@1.0.0/dist/toc.css">
|
||||||
<link rel="stylesheet" href="sidebar.css" />
|
<link rel="stylesheet" href="qmk_custom_light.css">
|
||||||
|
<link rel="stylesheet" href="qmk_custom_dark.css" media="(prefers-color-scheme: dark)">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -215,14 +215,14 @@ qmk doctor [-y] [-n]
|
|||||||
|
|
||||||
qmk doctor -n
|
qmk doctor -n
|
||||||
|
|
||||||
## `qmk json-keymap`
|
## `qmk json2c`
|
||||||
|
|
||||||
QMK Configurator からエクスポートしたものから keymap.c を生成します。
|
QMK Configurator からエクスポートしたものから keymap.c を生成します。
|
||||||
|
|
||||||
**使用法**:
|
**使用法**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk json-keymap [-o OUTPUT] filename
|
qmk json2c [-o OUTPUT] filename
|
||||||
```
|
```
|
||||||
|
|
||||||
## `qmk kle2json`
|
## `qmk kle2json`
|
||||||
|
29
docs/qmk_custom_dark.css
Normal file
29
docs/qmk_custom_dark.css
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
.sidebar li.active {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section p.tip,
|
||||||
|
.markdown-section tr:nth-child(2n) {
|
||||||
|
background-color:#444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section tr {
|
||||||
|
border-top: 1px solid #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section td, .markdown-section th {
|
||||||
|
border: 1px solid #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section p.tip code {
|
||||||
|
background-color: #555;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page_toc code {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section hr, .search {
|
||||||
|
border-bottom: 1px solid #777 !important;
|
||||||
|
}
|
207
drivers/arm/analog.c
Normal file
207
drivers/arm/analog.c
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
/* Copyright 2019 Drew Mills
|
||||||
|
*
|
||||||
|
* 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 "analog.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* User configurable ADC options */
|
||||||
|
#ifndef ADC_CIRCULAR_BUFFER
|
||||||
|
# define ADC_CIRCULAR_BUFFER FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ADC_NUM_CHANNELS
|
||||||
|
# define ADC_NUM_CHANNELS 1
|
||||||
|
#elif ADC_NUM_CHANNELS != 1
|
||||||
|
# error "The ARM ADC implementation currently only supports reading one channel at a time."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ADC_BUFFER_DEPTH
|
||||||
|
# define ADC_BUFFER_DEPTH 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For more sampling rate options, look at hal_adc_lld.h in ChibiOS
|
||||||
|
#ifndef ADC_SAMPLING_RATE
|
||||||
|
# define ADC_SAMPLING_RATE ADC_SMPR_SMP_1P5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Options are 12, 10, 8, and 6 bit.
|
||||||
|
#ifndef ADC_RESOLUTION
|
||||||
|
# define ADC_RESOLUTION ADC_CFGR1_RES_12BIT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static ADCConfig adcCfg = {};
|
||||||
|
static adcsample_t sampleBuffer[ADC_NUM_CHANNELS * ADC_BUFFER_DEPTH];
|
||||||
|
|
||||||
|
// Initialize to max number of ADCs, set to empty object to initialize all to false.
|
||||||
|
#if defined(STM32F0XX)
|
||||||
|
static bool adcInitialized[1] = {};
|
||||||
|
#elif defined(STM32F3XX)
|
||||||
|
static bool adcInitialized[4] = {};
|
||||||
|
#else
|
||||||
|
# error "adcInitialized has not been implemented for this ARM microcontroller."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static ADCConversionGroup adcConversionGroup = {
|
||||||
|
ADC_CIRCULAR_BUFFER,
|
||||||
|
(uint16_t)(ADC_NUM_CHANNELS),
|
||||||
|
NULL, // No end callback
|
||||||
|
NULL, // No error callback
|
||||||
|
#if defined(STM32F0XX)
|
||||||
|
ADC_CFGR1_CONT | ADC_RESOLUTION,
|
||||||
|
ADC_TR(0, 0).ADC_SAMPLING_RATE,
|
||||||
|
NULL, // Doesn't specify a default channel
|
||||||
|
#elif defined(STM32F3XX)
|
||||||
|
ADC_CFGR_CONT | ADC_RESOLUTION,
|
||||||
|
ADC_TR(0, 4095),
|
||||||
|
{
|
||||||
|
ADC_SAMPLING_RATE,
|
||||||
|
ADC_SAMPLING_RATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, // Doesn't specify a default channel
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline ADCDriver* intToADCDriver(uint8_t adcInt) {
|
||||||
|
ADCDriver* target;
|
||||||
|
|
||||||
|
switch (adcInt) {
|
||||||
|
// clang-format off
|
||||||
|
#if STM32_ADC_USE_ADC1
|
||||||
|
case 0: target = &ADCD1; break;
|
||||||
|
#endif
|
||||||
|
#if STM32_ADC_USE_ADC2
|
||||||
|
case 1: target = &ADCD2; break;
|
||||||
|
#endif
|
||||||
|
#if STM32_ADC_USE_ADC3
|
||||||
|
case 2: target = &ADCD3; break;
|
||||||
|
#endif
|
||||||
|
#if STM32_ADC_USE_ADC4
|
||||||
|
case 3: target = &ADCD4; break;
|
||||||
|
#endif
|
||||||
|
default: target = NULL; break;
|
||||||
|
// clang-format on
|
||||||
|
}
|
||||||
|
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void manageAdcInitializationDriver(uint8_t adc, ADCDriver* adcDriver) {
|
||||||
|
if (!adcInitialized[adc]) {
|
||||||
|
adcStart(adcDriver, &adcCfg);
|
||||||
|
adcInitialized[adc] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void manageAdcInitialization(uint8_t adc) { manageAdcInitializationDriver(adc, intToADCDriver(adc)); }
|
||||||
|
|
||||||
|
pin_and_adc pinToMux(pin_t pin) {
|
||||||
|
switch (pin) {
|
||||||
|
// clang-format off
|
||||||
|
#if defined(STM32F0XX)
|
||||||
|
case A0: return (pin_and_adc){ ADC_CHANNEL_IN0, 0 };
|
||||||
|
case A1: return (pin_and_adc){ ADC_CHANNEL_IN1, 0 };
|
||||||
|
case A2: return (pin_and_adc){ ADC_CHANNEL_IN2, 0 };
|
||||||
|
case A3: return (pin_and_adc){ ADC_CHANNEL_IN3, 0 };
|
||||||
|
case A4: return (pin_and_adc){ ADC_CHANNEL_IN4, 0 };
|
||||||
|
case A5: return (pin_and_adc){ ADC_CHANNEL_IN5, 0 };
|
||||||
|
case A6: return (pin_and_adc){ ADC_CHANNEL_IN6, 0 };
|
||||||
|
case A7: return (pin_and_adc){ ADC_CHANNEL_IN7, 0 };
|
||||||
|
case B0: return (pin_and_adc){ ADC_CHANNEL_IN8, 0 };
|
||||||
|
case B1: return (pin_and_adc){ ADC_CHANNEL_IN9, 0 };
|
||||||
|
case C0: return (pin_and_adc){ ADC_CHANNEL_IN10, 0 };
|
||||||
|
case C1: return (pin_and_adc){ ADC_CHANNEL_IN11, 0 };
|
||||||
|
case C2: return (pin_and_adc){ ADC_CHANNEL_IN12, 0 };
|
||||||
|
case C3: return (pin_and_adc){ ADC_CHANNEL_IN13, 0 };
|
||||||
|
case C4: return (pin_and_adc){ ADC_CHANNEL_IN14, 0 };
|
||||||
|
case C5: return (pin_and_adc){ ADC_CHANNEL_IN15, 0 };
|
||||||
|
#elif defined(STM32F3XX)
|
||||||
|
case A0: return (pin_and_adc){ ADC_CHANNEL_IN1, 0 };
|
||||||
|
case A1: return (pin_and_adc){ ADC_CHANNEL_IN2, 0 };
|
||||||
|
case A2: return (pin_and_adc){ ADC_CHANNEL_IN3, 0 };
|
||||||
|
case A3: return (pin_and_adc){ ADC_CHANNEL_IN4, 0 };
|
||||||
|
case A4: return (pin_and_adc){ ADC_CHANNEL_IN1, 1 };
|
||||||
|
case A5: return (pin_and_adc){ ADC_CHANNEL_IN2, 1 };
|
||||||
|
case A6: return (pin_and_adc){ ADC_CHANNEL_IN3, 1 };
|
||||||
|
case A7: return (pin_and_adc){ ADC_CHANNEL_IN4, 1 };
|
||||||
|
case B0: return (pin_and_adc){ ADC_CHANNEL_IN12, 2 };
|
||||||
|
case B1: return (pin_and_adc){ ADC_CHANNEL_IN1, 2 };
|
||||||
|
case B2: return (pin_and_adc){ ADC_CHANNEL_IN12, 1 };
|
||||||
|
case B12: return (pin_and_adc){ ADC_CHANNEL_IN2, 3 };
|
||||||
|
case B13: return (pin_and_adc){ ADC_CHANNEL_IN3, 3 };
|
||||||
|
case B14: return (pin_and_adc){ ADC_CHANNEL_IN4, 3 };
|
||||||
|
case B15: return (pin_and_adc){ ADC_CHANNEL_IN5, 3 };
|
||||||
|
case C0: return (pin_and_adc){ ADC_CHANNEL_IN6, 0 }; // Can also be ADC2
|
||||||
|
case C1: return (pin_and_adc){ ADC_CHANNEL_IN7, 0 }; // Can also be ADC2
|
||||||
|
case C2: return (pin_and_adc){ ADC_CHANNEL_IN8, 0 }; // Can also be ADC2
|
||||||
|
case C3: return (pin_and_adc){ ADC_CHANNEL_IN9, 0 }; // Can also be ADC2
|
||||||
|
case C4: return (pin_and_adc){ ADC_CHANNEL_IN5, 1 };
|
||||||
|
case C5: return (pin_and_adc){ ADC_CHANNEL_IN11, 1 };
|
||||||
|
case D8: return (pin_and_adc){ ADC_CHANNEL_IN12, 3 };
|
||||||
|
case D9: return (pin_and_adc){ ADC_CHANNEL_IN13, 3 };
|
||||||
|
case D10: return (pin_and_adc){ ADC_CHANNEL_IN7, 2 }; // Can also be ADC4
|
||||||
|
case D11: return (pin_and_adc){ ADC_CHANNEL_IN8, 2 }; // Can also be ADC4
|
||||||
|
case D12: return (pin_and_adc){ ADC_CHANNEL_IN9, 2 }; // Can also be ADC4
|
||||||
|
case D13: return (pin_and_adc){ ADC_CHANNEL_IN10, 2 }; // Can also be ADC4
|
||||||
|
case D14: return (pin_and_adc){ ADC_CHANNEL_IN11, 2 }; // Can also be ADC4
|
||||||
|
case E7: return (pin_and_adc){ ADC_CHANNEL_IN13, 2 };
|
||||||
|
case E8: return (pin_and_adc){ ADC_CHANNEL_IN6, 2 }; // Can also be ADC4
|
||||||
|
case E9: return (pin_and_adc){ ADC_CHANNEL_IN2, 2 };
|
||||||
|
case E10: return (pin_and_adc){ ADC_CHANNEL_IN14, 2 };
|
||||||
|
case E11: return (pin_and_adc){ ADC_CHANNEL_IN15, 2 };
|
||||||
|
case E12: return (pin_and_adc){ ADC_CHANNEL_IN16, 2 };
|
||||||
|
case E13: return (pin_and_adc){ ADC_CHANNEL_IN3, 2 };
|
||||||
|
case E14: return (pin_and_adc){ ADC_CHANNEL_IN1, 3 };
|
||||||
|
case E15: return (pin_and_adc){ ADC_CHANNEL_IN2, 3 };
|
||||||
|
case F2: return (pin_and_adc){ ADC_CHANNEL_IN10, 0 }; // Can also be ADC2
|
||||||
|
case F4: return (pin_and_adc){ ADC_CHANNEL_IN5, 0 };
|
||||||
|
#else
|
||||||
|
#error "An ADC pin-to-mux configuration has not been specified for this microcontroller."
|
||||||
|
#endif
|
||||||
|
default: return (pin_and_adc){ 0, 0 };
|
||||||
|
// clang-format on
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
adcsample_t analogReadPin(pin_t pin) { return adc_read(pinToMux(pin)); }
|
||||||
|
|
||||||
|
adcsample_t analogReadPinAdc(pin_t pin, uint8_t adc) {
|
||||||
|
pin_and_adc target = pinToMux(pin);
|
||||||
|
target.adc = adc;
|
||||||
|
return adc_read(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
adcsample_t adc_read(pin_and_adc mux) {
|
||||||
|
#if defined(STM32F0XX)
|
||||||
|
adcConversionGroup.sqr = ADC_CHSELR_CHSEL1;
|
||||||
|
#elif defined(STM32F3XX)
|
||||||
|
adcConversionGroup.sqr[0] = ADC_SQR1_SQ1_N(mux.pin);
|
||||||
|
#else
|
||||||
|
# error "adc_read has not been updated to support this ARM microcontroller."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ADCDriver* targetDriver = intToADCDriver(mux.adc);
|
||||||
|
manageAdcInitializationDriver(mux.adc, targetDriver);
|
||||||
|
|
||||||
|
adcConvert(targetDriver, &adcConversionGroup, &sampleBuffer[0], ADC_BUFFER_DEPTH);
|
||||||
|
adcsample_t* result = sampleBuffer;
|
||||||
|
|
||||||
|
return *result;
|
||||||
|
}
|
57
drivers/arm/analog.h
Normal file
57
drivers/arm/analog.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/* Copyright 2019 Drew Mills
|
||||||
|
*
|
||||||
|
* 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"
|
||||||
|
#include "ch.h"
|
||||||
|
#include <hal.h>
|
||||||
|
|
||||||
|
#if !defined(STM32F0XX) && !defined(STM32F3XX)
|
||||||
|
# error "Only STM23F0 and STM32F3 devices have ADC support in QMK at this time."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAL_USE_ADC
|
||||||
|
# error "You need to set HAL_USE_ADC to TRUE in your halconf.h to use the ADC."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !STM32_ADC_USE_ADC1 && !STM32_ADC_USE_ADC2 && !STM32_ADC_USE_ADC3 && !STM32_ADC_USE_ADC4
|
||||||
|
# error "You need to set one of the 'STM32_ADC_USE_ADCx' settings to TRUE in your mcuconf.h to use the ADC."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ADC_DUAL_MODE
|
||||||
|
# error "STM32 ADC Dual Mode is not supported at this time."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ADCV3_OVERSAMPLING
|
||||||
|
# error "STM32 ADCV3 Oversampling is not supported at this time."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
pin_t pin;
|
||||||
|
uint8_t adc;
|
||||||
|
} pin_and_adc;
|
||||||
|
#define PIN_AND_ADC(p, a) \
|
||||||
|
(pin_and_adc) { p, a }
|
||||||
|
|
||||||
|
// analogReference has been left un-defined for ARM devices.
|
||||||
|
// void analogReference(uint8_t mode);
|
||||||
|
|
||||||
|
adcsample_t analogReadPin(pin_t pin);
|
||||||
|
adcsample_t analogReadPinAdc(pin_t pin, uint8_t adc);
|
||||||
|
pin_and_adc pinToMux(pin_t pin);
|
||||||
|
|
||||||
|
adcsample_t adc_read(pin_and_adc mux);
|
96
drivers/eeprom/eeprom_stm32_L0_L1.c
Normal file
96
drivers/eeprom/eeprom_stm32_L0_L1.c
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* 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 <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
#include "eeprom_driver.h"
|
||||||
|
#include "eeprom_stm32_L0_L1.h"
|
||||||
|
|
||||||
|
#define EEPROM_BASE_ADDR 0x08080000
|
||||||
|
#define EEPROM_ADDR(offset) (EEPROM_BASE_ADDR + (offset))
|
||||||
|
#define EEPROM_PTR(offset) ((__IO uint8_t *)EEPROM_ADDR(offset))
|
||||||
|
#define EEPROM_BYTE(location, offset) (*(EEPROM_PTR(((uint32_t)location) + ((uint32_t)offset))))
|
||||||
|
|
||||||
|
#define BUFFER_BYTE(buffer, offset) (*(((uint8_t *)buffer) + offset))
|
||||||
|
|
||||||
|
#define FLASH_PEKEY1 0x89ABCDEF
|
||||||
|
#define FLASH_PEKEY2 0x02030405
|
||||||
|
|
||||||
|
static inline void STM32_L0_L1_EEPROM_WaitNotBusy(void) {
|
||||||
|
while (FLASH->SR & FLASH_SR_BSY) {
|
||||||
|
__WFI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void STM32_L0_L1_EEPROM_Unlock(void) {
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
if (FLASH->PECR & FLASH_PECR_PELOCK) {
|
||||||
|
FLASH->PEKEYR = FLASH_PEKEY1;
|
||||||
|
FLASH->PEKEYR = FLASH_PEKEY2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void STM32_L0_L1_EEPROM_Lock(void) {
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
FLASH->PECR |= FLASH_PECR_PELOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_driver_init(void) {}
|
||||||
|
|
||||||
|
void eeprom_driver_erase(void) {
|
||||||
|
STM32_L0_L1_EEPROM_Unlock();
|
||||||
|
|
||||||
|
for (size_t offset = 0; offset < STM32_ONBOARD_EEPROM_SIZE; offset += sizeof(uint32_t)) {
|
||||||
|
FLASH->PECR |= FLASH_PECR_ERASE | FLASH_PECR_DATA;
|
||||||
|
|
||||||
|
*(__IO uint32_t *)EEPROM_ADDR(offset) = (uint32_t)0;
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
FLASH->PECR &= ~(FLASH_PECR_ERASE | FLASH_PECR_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_Lock();
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
|
for (size_t offset = 0; offset < len; ++offset) {
|
||||||
|
// Drop out if we've hit the limit of the EEPROM
|
||||||
|
if ((((uint32_t)addr) + offset) >= STM32_ONBOARD_EEPROM_SIZE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
BUFFER_BYTE(buf, offset) = EEPROM_BYTE(addr, offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
|
STM32_L0_L1_EEPROM_Unlock();
|
||||||
|
|
||||||
|
for (size_t offset = 0; offset < len; ++offset) {
|
||||||
|
// Drop out if we've hit the limit of the EEPROM
|
||||||
|
if ((((uint32_t)addr) + offset) >= STM32_ONBOARD_EEPROM_SIZE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
EEPROM_BYTE(addr, offset) = BUFFER_BYTE(buf, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_Lock();
|
||||||
|
}
|
33
drivers/eeprom/eeprom_stm32_L0_L1.h
Normal file
33
drivers/eeprom/eeprom_stm32_L0_L1.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
The size used by the STM32 L0/L1 EEPROM driver.
|
||||||
|
*/
|
||||||
|
#ifndef STM32_ONBOARD_EEPROM_SIZE
|
||||||
|
# ifdef VIA_ENABLE
|
||||||
|
# define STM32_ONBOARD_EEPROM_SIZE 1024
|
||||||
|
# else
|
||||||
|
# include "eeconfig.h"
|
||||||
|
# define STM32_ONBOARD_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO and EEPROM page sizing
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ONBOARD_EEPROM_SIZE > 128
|
||||||
|
# pragma message("Please note: resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.")
|
||||||
|
#endif
|
@ -1,49 +0,0 @@
|
|||||||
/* Copyright 2019 Ryota Goto
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
/*
|
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
|
||||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
|
||||||
K300, K301, K302, K304, K306, K308, K309, K310, K311 \
|
|
||||||
*/
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
[0] = LAYOUT_all( /* Base */
|
|
||||||
MO(2), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
|
||||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
|
||||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_GRV, KC_RGUI, KC_DEL
|
|
||||||
),
|
|
||||||
[1] = LAYOUT_all( /* Extra Keys */
|
|
||||||
_______, _______, KC_PGUP, _______, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______,
|
|
||||||
_______, KC_HOME, KC_PGDN, KC_END, _______, KC_BSLS, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, KC_PSCR, KC_ESC, KC_QUOT, _______, KC_DOT, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
[2] = LAYOUT_all( /* Num and FN */
|
|
||||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
|
||||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
[3] = LAYOUT_all( /* Other */
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
)
|
|
||||||
};
|
|
@ -1,4 +0,0 @@
|
|||||||
# The proto via keymap for equinox
|
|
||||||
|
|
||||||
Has the necessary tweaks to run on early prototype PCBs.
|
|
||||||
Not to be used for production run PCBs.
|
|
@ -1,5 +0,0 @@
|
|||||||
VIA_ENABLE = yes
|
|
||||||
|
|
||||||
# Fix for prototype missing COL0, COL1, using backlight and RGB underglow I/O pins
|
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
|
@ -21,3 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#undef MATRIX_COL_PINS
|
#undef MATRIX_COL_PINS
|
||||||
#define MATRIX_COL_PINS { C4, B7, C6, C7, B6, B5, B4, B3, B2, B1, B0, D6 }
|
#define MATRIX_COL_PINS { C4, B7, C6, C7, B6, B5, B4, B3, B2, B1, B0, D6 }
|
||||||
|
|
||||||
|
// This directs backlight code to use a disconnected pin, so the firwmare still has
|
||||||
|
// backlight code and VIA support even though it doesn't do anything.
|
||||||
|
#undef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_PIN D1
|
1
keyboards/ai03/equinox/rev0/rules.mk
Normal file
1
keyboards/ai03/equinox/rev0/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Dummy rules.mk, rev0 uses parent rules.mk as is
|
18
keyboards/ai03/equinox/rev1/config.h
Normal file
18
keyboards/ai03/equinox/rev1/config.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Ryota Goto
|
||||||
|
|
||||||
|
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
|
1
keyboards/ai03/equinox/rev1/rules.mk
Normal file
1
keyboards/ai03/equinox/rev1/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Dummy rules.mk, rev1 uses parent rules.mk as is
|
@ -42,8 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
/* key combination for magic key command */
|
/* key combination for magic key command */
|
||||||
/* defined by default; to change, uncomment and set to the combination you want */
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
@ -41,5 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
@ -1,268 +0,0 @@
|
|||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 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"
|
|
||||||
#include "stm32_gpio.h"
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver local definitions. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver exported variables. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver local variables and types. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Type of STM32 GPIO port setup.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
uint32_t moder;
|
|
||||||
uint32_t otyper;
|
|
||||||
uint32_t ospeedr;
|
|
||||||
uint32_t pupdr;
|
|
||||||
uint32_t odr;
|
|
||||||
uint32_t afrl;
|
|
||||||
uint32_t afrh;
|
|
||||||
} gpio_setup_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Type of STM32 GPIO initialization data.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PAData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PBData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PCData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PDData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PEData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PFData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PGData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PHData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PIData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PJData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PKData;
|
|
||||||
#endif
|
|
||||||
} gpio_config_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief STM32 GPIO static initialization data.
|
|
||||||
*/
|
|
||||||
static const gpio_config_t gpio_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
|
|
||||||
#if STM32_HAS_GPIOJ
|
|
||||||
{VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
|
|
||||||
VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOK
|
|
||||||
{VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
|
|
||||||
VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver local functions. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
|
|
||||||
|
|
||||||
gpiop->OTYPER = config->otyper;
|
|
||||||
gpiop->OSPEEDR = config->ospeedr;
|
|
||||||
gpiop->PUPDR = config->pupdr;
|
|
||||||
gpiop->ODR = config->odr;
|
|
||||||
gpiop->AFRL = config->afrl;
|
|
||||||
gpiop->AFRH = config->afrh;
|
|
||||||
gpiop->MODER = config->moder;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void stm32_gpio_init(void) {
|
|
||||||
|
|
||||||
/* Enabling GPIO-related clocks, the mask comes from the
|
|
||||||
registry header file.*/
|
|
||||||
rccResetAHB(STM32_GPIO_EN_MASK);
|
|
||||||
rccEnableAHB(STM32_GPIO_EN_MASK, true);
|
|
||||||
|
|
||||||
/* Initializing all the defined GPIO ports.*/
|
|
||||||
#if STM32_HAS_GPIOA
|
|
||||||
gpio_init(GPIOA, &gpio_default_config.PAData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOB
|
|
||||||
gpio_init(GPIOB, &gpio_default_config.PBData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOC
|
|
||||||
gpio_init(GPIOC, &gpio_default_config.PCData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOD
|
|
||||||
gpio_init(GPIOD, &gpio_default_config.PDData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOE
|
|
||||||
gpio_init(GPIOE, &gpio_default_config.PEData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOF
|
|
||||||
gpio_init(GPIOF, &gpio_default_config.PFData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOG
|
|
||||||
gpio_init(GPIOG, &gpio_default_config.PGData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOH
|
|
||||||
gpio_init(GPIOH, &gpio_default_config.PHData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOI
|
|
||||||
gpio_init(GPIOI, &gpio_default_config.PIData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOJ
|
|
||||||
gpio_init(GPIOJ, &gpio_default_config.PJData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOK
|
|
||||||
gpio_init(GPIOK, &gpio_default_config.PKData);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver interrupt handlers. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver exported functions. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Early initialization code.
|
|
||||||
* @details GPIO ports and system clocks are initialized before everything
|
|
||||||
* else.
|
|
||||||
*/
|
|
||||||
void __early_init(void) {
|
|
||||||
extern void enter_bootloader_mode_if_requested(void);
|
|
||||||
enter_bootloader_mode_if_requested();
|
|
||||||
stm32_gpio_init();
|
|
||||||
stm32_clock_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if HAL_USE_SDC || defined(__DOXYGEN__)
|
|
||||||
/**
|
|
||||||
* @brief SDC card detection.
|
|
||||||
*/
|
|
||||||
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
|
||||||
|
|
||||||
(void)sdcp;
|
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief SDC card write protection detection.
|
|
||||||
*/
|
|
||||||
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
|
||||||
|
|
||||||
(void)sdcp;
|
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* HAL_USE_SDC */
|
|
||||||
|
|
||||||
#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) {
|
|
||||||
SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
|
|
||||||
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
|
|
||||||
}
|
|
@ -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
|
|
@ -6,13 +6,6 @@
|
|||||||
"height": 4,
|
"height": 4,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
|
||||||
{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Del", "x":11, "y":0}, {"label":"BkSp", "x":12, "y":0}, {"label":"7", "x":13, "y":0}, {"label":"8", "x":14, "y":0}, {"label":"9", "x":15, "y":0}, {"label":"*", "x":16, "y":0},
|
|
||||||
{"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"Enter", "x":11.25, "y":1, "w":1.75}, {"label":"4", "x":13, "y":1}, {"label":"5", "x":14, "y":1}, {"label":"6", "x":15, "y":1}, {"label":"-", "x":16, "y":1},
|
|
||||||
{"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"Shift", "x":10.75, "y":2, "w":1.25}, {"label":"↑", "x":12, "y":2}, {"label":"1", "x":13, "y":2}, {"label":"2", "x":14, "y":2}, {"label":"3", "x":15, "y":2}, {"label":"+", "x":16, "y":2},
|
|
||||||
{"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"GUI", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":1.75}, {"x":5.5, "y":3, "w":1}, {"label":"Backspace", "x":6.5, "y":3, "w":2.25}, {"label":"Menu", "x":8.75, "y":3, "w":1.25}, {"label":"Fn", "x":10, "y":3}, {"label":"←", "x":11, "y":3}, {"label":"↓", "x":12, "y":3}, {"label":"→", "x":13, "y":3}, {"label":"0", "x":14, "y":3}, {"label":".", "x":15, "y":3}, {"label":"Enter", "x":16, "y":3}]
|
|
||||||
},
|
|
||||||
"LAYOUT_lefty": {
|
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"7", "x":0, "y":0}, {"label":"8", "x":1, "y":0}, {"label":"9", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"Q", "x":5, "y":0}, {"label":"W", "x":6, "y":0}, {"label":"E", "x":7, "y":0}, {"label":"R", "x":8, "y":0}, {"label":"T", "x":9, "y":0}, {"label":"Y", "x":10, "y":0}, {"label":"U", "x":11, "y":0}, {"label":"I", "x":12, "y":0}, {"label":"O", "x":13, "y":0}, {"label":"P", "x":14, "y":0}, {"label":"{", "x":15, "y":0}, {"label":"}", "x":16, "y":0},
|
{"label":"7", "x":0, "y":0}, {"label":"8", "x":1, "y":0}, {"label":"9", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"Q", "x":5, "y":0}, {"label":"W", "x":6, "y":0}, {"label":"E", "x":7, "y":0}, {"label":"R", "x":8, "y":0}, {"label":"T", "x":9, "y":0}, {"label":"Y", "x":10, "y":0}, {"label":"U", "x":11, "y":0}, {"label":"I", "x":12, "y":0}, {"label":"O", "x":13, "y":0}, {"label":"P", "x":14, "y":0}, {"label":"{", "x":15, "y":0}, {"label":"}", "x":16, "y":0},
|
||||||
{"label":"4", "x":0, "y":1}, {"label":"5", "x":1, "y":1}, {"label":"6", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.25}, {"label":"A", "x":5.25, "y":1}, {"label":"S", "x":6.25, "y":1}, {"label":"D", "x":7.25, "y":1}, {"label":"F", "x":8.25, "y":1}, {"label":"G", "x":9.25, "y":1}, {"label":"H", "x":10.25, "y":1}, {"label":"J", "x":11.25, "y":1}, {"label":"K", "x":12.25, "y":1}, {"label":"L", "x":13.25, "y":1}, {"label":":", "x":14.25, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.75},
|
{"label":"4", "x":0, "y":1}, {"label":"5", "x":1, "y":1}, {"label":"6", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.25}, {"label":"A", "x":5.25, "y":1}, {"label":"S", "x":6.25, "y":1}, {"label":"D", "x":7.25, "y":1}, {"label":"F", "x":8.25, "y":1}, {"label":"G", "x":9.25, "y":1}, {"label":"H", "x":10.25, "y":1}, {"label":"J", "x":11.25, "y":1}, {"label":"K", "x":12.25, "y":1}, {"label":"L", "x":13.25, "y":1}, {"label":":", "x":14.25, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.75},
|
@ -22,7 +22,7 @@
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap _BL: Base Layer (Default Layer)
|
/* Keymap _BL: Base Layer (Default Layer)
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT_lefty(
|
[_BL] = LAYOUT(
|
||||||
KC_P7 , KC_P8, KC_P9 , KC_PAST, KC_ESC , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_BSPC , \
|
KC_P7 , KC_P8, KC_P9 , KC_PAST, KC_ESC , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_BSPC , \
|
||||||
KC_P4 , KC_P5, KC_P6 , KC_PMNS, KC_TAB , KC_A , KC_S , KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , \
|
KC_P4 , KC_P5, KC_P6 , KC_PMNS, KC_TAB , KC_A , KC_S , KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , \
|
||||||
KC_P1 , KC_P2, KC_P3 , KC_PPLS, KC_LSFT, KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_UP ,KC_RSFT , \
|
KC_P1 , KC_P2, KC_P3 , KC_PPLS, KC_LSFT, KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_UP ,KC_RSFT , \
|
||||||
@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Keymap _FL: Function Layer
|
/* Keymap _FL: Function Layer
|
||||||
*/
|
*/
|
||||||
[_FL] = LAYOUT_lefty(
|
[_FL] = LAYOUT(
|
||||||
KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \
|
KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \
|
||||||
KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \
|
KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \
|
||||||
KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \
|
KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \
|
@ -14,7 +14,7 @@
|
|||||||
* 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 "candybar.h"
|
#include "lefty.h"
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
matrix_init_user();
|
matrix_init_user();
|
@ -17,19 +17,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, k1d, k1e, k1f, k1g, \
|
|
||||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
|
|
||||||
k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g \
|
|
||||||
) { \
|
|
||||||
{ k00, k01 , k02, k03 , k04 , k05, k06 , k07, k08, k09, k0a, k0b , k0c, k0d, k0e, k0f, k0g } , \
|
|
||||||
{ k10, k11 , k12, k13 , k14 , k15, k16 , k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g } , \
|
|
||||||
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
|
||||||
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_lefty( \
|
#define LAYOUT( \
|
||||||
k0d, k0e, k0f, k0g, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
|
k0d, k0e, k0f, k0g, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
|
||||||
k1d, k1e, k1f, k1g, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \
|
k1d, k1e, k1f, k1g, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \
|
||||||
k2d, k2e, k2f, k2g, k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
k2d, k2e, k2f, k2g, k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
||||||
@ -40,5 +29,3 @@
|
|||||||
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
||||||
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_righty LAYOUT
|
|
15
keyboards/candybar/lefty/readme.md
Normal file
15
keyboards/candybar/lefty/readme.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# The Key Company Candybar
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/)
|
||||||
|
* Hardware Supported: TKC Candybar
|
||||||
|
* Hardware Availability: [TheKey.Company](https://thekey.company/collections/candybar)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make candybar/lefty:default:dfu-util
|
||||||
|
|
||||||
|
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).
|
@ -1,6 +1,5 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
BOARD = ST_STM32F072B_DISCOVERY
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
@ -1,18 +0,0 @@
|
|||||||
The Key Company Candybar
|
|
||||||
===
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller.
|
|
||||||
|
|
||||||
Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/)
|
|
||||||
Hardware Supported: TKC Candybar
|
|
||||||
Hardware Availability: Via GB
|
|
||||||
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
|
||||||
|
|
||||||
make candybar:default:dfu-util
|
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
|
115
keyboards/candybar/righty/config.h
Normal file
115
keyboards/candybar/righty/config.h
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
/* Copyright 2018 Jack Humbert
|
||||||
|
*
|
||||||
|
* 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 0x6060
|
||||||
|
#define DEVICE_VER 0x0006
|
||||||
|
#define MANUFACTURER The Key Company
|
||||||
|
#define PRODUCT Candybar
|
||||||
|
#define DESCRIPTION A compact staggered 40% keyboard with attached numpad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 17
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define MATRIX_ROW_PINS { A8, A9, A10, A13 }
|
||||||
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 }
|
||||||
|
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
// #define WS2812_LED_N 2
|
||||||
|
// #define RGBLED_NUM WS2812_LED_N
|
||||||
|
// #define WS2812_TIM_N 2
|
||||||
|
// #define WS2812_TIM_CH 2
|
||||||
|
// #define PORT_WS2812 GPIOA
|
||||||
|
// #define PIN_WS2812 1
|
||||||
|
// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
|
||||||
|
//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
|
||||||
|
//#define WS2812_EXTERNAL_PULLUP
|
16
keyboards/candybar/righty/info.json
Normal file
16
keyboards/candybar/righty/info.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "TKC Candybar",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "terrymathews",
|
||||||
|
"width": 17,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Del", "x":11, "y":0}, {"label":"BkSp", "x":12, "y":0}, {"label":"7", "x":13, "y":0}, {"label":"8", "x":14, "y":0}, {"label":"9", "x":15, "y":0}, {"label":"*", "x":16, "y":0},
|
||||||
|
{"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"Enter", "x":11.25, "y":1, "w":1.75}, {"label":"4", "x":13, "y":1}, {"label":"5", "x":14, "y":1}, {"label":"6", "x":15, "y":1}, {"label":"-", "x":16, "y":1},
|
||||||
|
{"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"Shift", "x":10.75, "y":2, "w":1.25}, {"label":"↑", "x":12, "y":2}, {"label":"1", "x":13, "y":2}, {"label":"2", "x":14, "y":2}, {"label":"3", "x":15, "y":2}, {"label":"+", "x":16, "y":2},
|
||||||
|
{"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"GUI", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":1.75}, {"x":5.5, "y":3, "w":1}, {"label":"Backspace", "x":6.5, "y":3, "w":2.25}, {"label":"Menu", "x":8.75, "y":3, "w":1.25}, {"label":"Fn", "x":10, "y":3}, {"label":"←", "x":11, "y":3}, {"label":"↓", "x":12, "y":3}, {"label":"→", "x":13, "y":3}, {"label":"0", "x":14, "y":3}, {"label":".", "x":15, "y":3}, {"label":"Enter", "x":16, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
keyboards/candybar/righty/readme.md
Normal file
15
keyboards/candybar/righty/readme.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# The Key Company Candybar
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/)
|
||||||
|
* Hardware Supported: TKC Candybar
|
||||||
|
* Hardware Availability: [TheKey.Company](https://thekey.company/collections/candybar)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make candybar/righty:default:dfu-util
|
||||||
|
|
||||||
|
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).
|
17
keyboards/candybar/righty/righty.c
Normal file
17
keyboards/candybar/righty/righty.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2018 Jack Humbert
|
||||||
|
*
|
||||||
|
* 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 "righty.h"
|
30
keyboards/candybar/righty/righty.h
Normal file
30
keyboards/candybar/righty/righty.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2018 Jack Humbert
|
||||||
|
*
|
||||||
|
* 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, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, k1d, k1e, k1f, k1g, \
|
||||||
|
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
|
||||||
|
k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g \
|
||||||
|
) { \
|
||||||
|
{ k00, k01 , k02, k03 , k04 , k05, k06 , k07, k08, k09, k0a, k0b , k0c, k0d, k0e, k0f, k0g } , \
|
||||||
|
{ k10, k11 , k12, k13 , k14 , k15, k16 , k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g } , \
|
||||||
|
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
||||||
|
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
||||||
|
}
|
24
keyboards/candybar/righty/rules.mk
Normal file
24
keyboards/candybar/righty/rules.mk
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = STM32F072
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
# EXTRAFLAGS+=-flto
|
||||||
|
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
|
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
SERIAL_LINK_ENABLE = no
|
||||||
|
|
||||||
|
|
||||||
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
#define USB_MAX_POWER_CONSUMPTION 100
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -47,7 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
#define USB_MAX_POWER_CONSUMPTION 100
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -47,8 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
*/
|
*/
|
||||||
|
@ -25,88 +25,115 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
#define EE_HANDS
|
#define EE_HANDS
|
||||||
|
|
||||||
#undef SSD1306OLED
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
# undef SSD1306OLED
|
||||||
|
# define OLED_TIMEOUT 600000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef USE_I2C
|
||||||
#define USE_SERIAL_PD2
|
#define USE_SERIAL_PD2
|
||||||
|
|
||||||
#define FORCE_NKRO
|
// #define FORCE_NKRO
|
||||||
|
|
||||||
#define QMK_ESC_OUTPUT F4 // usually COL
|
#define QMK_ESC_OUTPUT F4 // usually COL
|
||||||
#define QMK_ESC_INPUT D4 // usually ROW
|
#define QMK_ESC_INPUT D4 // usually ROW
|
||||||
#define QMK_LED B0
|
#define QMK_LED B0
|
||||||
|
|
||||||
|
#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
|
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
|
||||||
|
|
||||||
#define RGB_MATRIX_HUE_STEP 10
|
# define RGB_MATRIX_HUE_STEP 8
|
||||||
#define RGB_MATRIX_SAT_STEP 15
|
# define RGB_MATRIX_SAT_STEP 12
|
||||||
#define RGB_MATRIX_VAL_STEP 16
|
# define RGB_MATRIX_VAL_STEP 10
|
||||||
#define RGB_MATRIX_SPD_STEP 10
|
# define RGB_MATRIX_SPD_STEP 10
|
||||||
|
|
||||||
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||||
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||||
#define DISABLE_RGB_MATRIX_BREATHING
|
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||||
#define DISABLE_RGB_MATRIX_BAND_SAT
|
# define DISABLE_RGB_MATRIX_BREATHING
|
||||||
#define DISABLE_RGB_MATRIX_BAND_VAL
|
# define DISABLE_RGB_MATRIX_BAND_SAT
|
||||||
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
# define DISABLE_RGB_MATRIX_BAND_VAL
|
||||||
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||||
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||||
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||||
// #define DISABLE_RGB_MATRIX_CYCLE_ALL
|
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||||
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
|
||||||
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
|
||||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
|
||||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
|
||||||
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
|
||||||
#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
|
||||||
#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
|
||||||
// #define DISABLE_RGB_MATRIX_DUAL_BEACON
|
|
||||||
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
|
||||||
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
|
||||||
#define DISABLE_RGB_MATRIX_RAINDROPS
|
|
||||||
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
|
||||||
|
|
||||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
// #define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||||
// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||||
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||||
|
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||||
|
// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINDROPS
|
||||||
|
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
|
|
||||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
|
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
|
||||||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
|
||||||
|
|
||||||
// #define DISABLE_RGB_MATRIX_SPLASH
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||||
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||||
|
// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||||
|
|
||||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP
|
# define DISABLE_RGB_MATRIX_SPLASH
|
||||||
|
# define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||||
|
|
||||||
|
# define RGB_MATRIX_ANIMATION_SPEED_DEFAULT UINT8_MAX / 2
|
||||||
|
# define RGB_MATRIX_ANIMATION_SPEED_SLOW RGB_MATRIX_ANIMATION_SPEED_DEFAULT / 4
|
||||||
|
# define RGB_MATRIX_ANIMATION_SPEED_SLOWER RGB_MATRIX_ANIMATION_SPEED_SLOW / 3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TAPPING_TERM 150
|
#define TAPPING_TERM 140
|
||||||
// #define PERMISSIVE_HOLD
|
#define PERMISSIVE_HOLD
|
||||||
#define IGNORE_MOD_TAP_INTERRUPT
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
// #define RETRO_TAPPING
|
|
||||||
|
|
||||||
#define TAPPING_TOGGLE 2
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
#define MOUSEKEY_DELAY 0
|
#ifdef MOUSEKEY_ENABLE
|
||||||
#define MOUSEKEY_INTERVAL 16
|
# define MOUSEKEY_DELAY 0
|
||||||
#define MOUSEKEY_MAX_SPEED 6
|
# define MOUSEKEY_INTERVAL 16
|
||||||
#define MOUSEKEY_TIME_TO_MAX 32
|
# define MOUSEKEY_MAX_SPEED 6
|
||||||
#define MOUSEKEY_WHEEL_MAX_SPEED 4
|
# define MOUSEKEY_TIME_TO_MAX 36
|
||||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
# define MOUSEKEY_WHEEL_MAX_SPEED 4
|
||||||
|
# define MOUSEKEY_WHEEL_TIME_TO_MAX 100
|
||||||
|
#endif
|
||||||
|
|
||||||
#define OLED_FONT_H "keyboards/crkbd/keymaps/rpbaptist/glcdfont.c"
|
#ifdef THEME_GODSPEED
|
||||||
|
# define OLED_FONT_H "keyboards/crkbd/keymaps/rpbaptist/glcdfont_godspeed.c"
|
||||||
|
# define THEME_HSV 132, 255, 125
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef THEME_PULSE
|
||||||
|
# define OLED_FONT_H "keyboards/crkbd/keymaps/rpbaptist/glcdfont_pulse.c"
|
||||||
|
# define THEME_HSV 123, 255, 125
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef THEME_LASER
|
||||||
|
# define OLED_FONT_H "keyboards/crkbd/keymaps/rpbaptist/glcdfont_laser.c"
|
||||||
|
# define THEME_HSV HSV_MAGENTA
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NO_ACTION_ONESHOT
|
#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#define PRODUCT Corne Keyboard
|
#define PRODUCT Corne Keyboard
|
||||||
|
|
||||||
|
#define LCPC_KEYS KC_LCTL, KC_LSFT, KC_9
|
||||||
|
#define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0
|
||||||
|
231
keyboards/crkbd/keymaps/rpbaptist/glcdfont_godspeed.c
Normal file
231
keyboards/crkbd/keymaps/rpbaptist/glcdfont_godspeed.c
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
#include "progmem.h"
|
||||||
|
|
||||||
|
// Helidox 8x6 font with QMK Firmware Logo
|
||||||
|
// Online editor: http://teripom.x0.com/
|
||||||
|
|
||||||
|
const unsigned char font[] PROGMEM = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||||
|
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||||
|
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||||
|
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||||
|
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||||
|
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||||
|
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||||
|
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||||
|
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||||
|
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||||
|
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||||
|
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||||
|
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||||
|
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||||
|
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||||
|
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||||
|
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||||
|
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||||
|
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||||
|
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||||
|
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||||
|
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||||
|
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||||
|
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||||
|
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||||
|
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||||
|
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||||
|
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||||
|
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||||
|
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||||
|
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||||
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||||
|
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||||
|
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||||
|
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||||
|
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||||
|
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||||
|
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||||
|
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||||
|
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||||
|
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||||
|
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||||
|
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||||
|
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||||
|
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||||
|
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||||
|
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||||
|
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||||
|
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||||
|
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||||
|
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||||
|
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||||
|
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||||
|
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||||
|
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||||
|
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||||
|
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||||
|
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||||
|
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||||
|
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||||
|
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||||
|
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||||
|
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||||
|
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||||
|
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||||
|
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||||
|
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||||
|
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||||
|
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||||
|
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||||
|
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||||
|
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||||
|
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||||
|
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||||
|
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||||
|
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||||
|
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||||
|
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||||
|
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
|
||||||
|
0x38, 0x1C, 0x0C, 0x06, 0x03, 0x03,
|
||||||
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||||
|
0x03, 0x03, 0x82, 0x86, 0xCC, 0xF8,
|
||||||
|
0xF0, 0xF0, 0x38, 0x1C, 0x0C, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xC0, 0x70,
|
||||||
|
0xF8, 0x0C, 0x04, 0xC6, 0xA2, 0xB3,
|
||||||
|
0x9F, 0x87, 0x01, 0x01, 0x1F, 0x66,
|
||||||
|
0x66, 0x44, 0x4C, 0x58, 0x70, 0xE0,
|
||||||
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||||
|
0xE0, 0x78, 0x18, 0x8C, 0xC6, 0xE6,
|
||||||
|
0xE3, 0xE3, 0xC3, 0x83, 0x03, 0x03,
|
||||||
|
0x73, 0x76, 0x76, 0x0C, 0x18, 0xF8,
|
||||||
|
0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
|
||||||
|
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
|
||||||
|
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
|
||||||
|
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
|
||||||
|
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
|
||||||
|
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
|
||||||
|
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x80, 0xC0, 0x40, 0x7F, 0xF3,
|
||||||
|
0x60, 0x20, 0x30, 0x30, 0x38, 0x18,
|
||||||
|
0x9C, 0xCC, 0x6C, 0x6E, 0x3E, 0x3E,
|
||||||
|
0x1F, 0x0F, 0x0F, 0x03, 0x03, 0x01,
|
||||||
|
0xC0, 0xFF, 0x3E, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x7F, 0xC1, 0x00,
|
||||||
|
0x1D, 0x67, 0xC0, 0x80, 0x01, 0x00,
|
||||||
|
0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00,
|
||||||
|
0x0C, 0x1A, 0x32, 0xC2, 0x01, 0xC1,
|
||||||
|
0xFF, 0x3E, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF,
|
||||||
|
0x80, 0x00, 0x00, 0xC3, 0xC7, 0xC7,
|
||||||
|
0x8F, 0x0F, 0x07, 0x03, 0x80, 0xC0,
|
||||||
|
0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x07,
|
||||||
|
0x0F, 0xFF, 0x7F, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
|
||||||
|
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
|
||||||
|
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
|
||||||
|
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
|
||||||
|
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
|
||||||
|
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
|
||||||
|
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x01, 0x00, 0x40, 0x60, 0x31,
|
||||||
|
0x3B, 0x1E, 0x0C, 0x1E, 0x36, 0x23,
|
||||||
|
0x61, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||||
|
0x60, 0x30, 0x1C, 0x3E, 0x3E, 0x3F,
|
||||||
|
0x1D, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
||||||
|
0x0C, 0x18, 0x10, 0x33, 0x3E, 0x38,
|
||||||
|
0x6E, 0x67, 0x60, 0x60, 0x60, 0x20,
|
||||||
|
0x30, 0x18, 0x08, 0x0F, 0x06, 0x03,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||||
|
0x03, 0x06, 0x0C, 0x19, 0x31, 0x21,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x61, 0x63,
|
||||||
|
0x67, 0x67, 0x33, 0x39, 0x18, 0x0E,
|
||||||
|
0x07, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
231
keyboards/crkbd/keymaps/rpbaptist/glcdfont_laser.c
Normal file
231
keyboards/crkbd/keymaps/rpbaptist/glcdfont_laser.c
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
#include "progmem.h"
|
||||||
|
|
||||||
|
// Helidox 8x6 font with QMK Firmware Logo
|
||||||
|
// Online editor: http://teripom.x0.com/
|
||||||
|
|
||||||
|
const unsigned char font[] PROGMEM = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||||
|
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||||
|
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||||
|
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||||
|
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||||
|
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||||
|
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||||
|
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||||
|
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||||
|
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||||
|
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||||
|
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||||
|
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||||
|
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||||
|
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||||
|
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||||
|
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||||
|
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||||
|
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||||
|
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||||
|
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||||
|
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||||
|
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||||
|
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||||
|
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||||
|
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||||
|
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||||
|
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||||
|
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||||
|
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||||
|
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||||
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||||
|
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||||
|
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||||
|
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||||
|
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||||
|
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||||
|
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||||
|
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||||
|
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||||
|
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||||
|
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||||
|
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||||
|
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||||
|
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||||
|
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||||
|
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||||
|
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||||
|
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||||
|
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||||
|
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||||
|
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||||
|
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||||
|
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||||
|
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||||
|
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||||
|
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||||
|
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||||
|
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||||
|
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||||
|
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||||
|
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||||
|
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||||
|
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||||
|
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||||
|
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||||
|
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||||
|
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||||
|
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||||
|
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||||
|
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||||
|
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||||
|
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||||
|
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||||
|
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||||
|
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||||
|
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||||
|
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||||
|
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||||
|
0xE0, 0xF8, 0x3E, 0x0F, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x80, 0xC0,
|
||||||
|
0xE0, 0xF0, 0xF8, 0xFC, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xE0, 0xF0, 0x7C,
|
||||||
|
0x3F, 0x0F, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x03, 0x03, 0x1B, 0x1F, 0x1F, 0x07,
|
||||||
|
0x03, 0xC0, 0xE0, 0xFC, 0x1C, 0x0F,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||||
|
0xE7, 0xFF, 0xFF, 0x0F, 0x03, 0x03,
|
||||||
|
0x03, 0x03, 0x83, 0x83, 0xE3, 0xE7,
|
||||||
|
0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
|
||||||
|
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
|
||||||
|
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
|
||||||
|
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
|
||||||
|
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
|
||||||
|
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
|
||||||
|
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x80, 0xC0, 0xF0, 0x7C, 0x1F, 0x07,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||||
|
0x80, 0x90, 0x98, 0x9C, 0x8C, 0x80,
|
||||||
|
0x80, 0x80, 0x9C, 0x9C, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
|
||||||
|
0x10, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x9C, 0x9C, 0x1C, 0x1C,
|
||||||
|
0x0C, 0x0C, 0x80, 0x90, 0x90, 0x10,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x0C,
|
||||||
|
0x00, 0x00, 0x90, 0x90, 0x9C, 0x9C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x9C, 0x9C,
|
||||||
|
0x9C, 0x0C, 0x0C, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
|
||||||
|
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
|
||||||
|
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
|
||||||
|
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
|
||||||
|
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
|
||||||
|
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
|
||||||
|
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x70, 0x7C, 0x7E,
|
||||||
|
0x6F, 0x63, 0x60, 0x60, 0x60, 0x60,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||||
|
0x60, 0x70, 0x78, 0x3C, 0x1E, 0x0F,
|
||||||
|
0x07, 0x03, 0x01, 0x01, 0x01, 0x01,
|
||||||
|
0x01, 0x01, 0x7F, 0x7F, 0x00, 0x00,
|
||||||
|
0x60, 0x70, 0x7C, 0x7C, 0x6C, 0x60,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x78,
|
||||||
|
0x3E, 0x0F, 0x03, 0x01, 0x00, 0x60,
|
||||||
|
0x78, 0x7E, 0x67, 0x61, 0x60, 0x60,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||||
|
0x70, 0x00, 0x00, 0x00, 0x00, 0x60,
|
||||||
|
0x78, 0x7E, 0x0F, 0x07, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x03, 0x0F,
|
||||||
|
0x7F, 0x70, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
231
keyboards/crkbd/keymaps/rpbaptist/glcdfont_pulse.c
Normal file
231
keyboards/crkbd/keymaps/rpbaptist/glcdfont_pulse.c
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
#include "progmem.h"
|
||||||
|
|
||||||
|
// Helidox 8x6 font with QMK Firmware Logo
|
||||||
|
// Online editor: http://teripom.x0.com/
|
||||||
|
|
||||||
|
const unsigned char font[] PROGMEM = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||||
|
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||||
|
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||||
|
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||||
|
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||||
|
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||||
|
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||||
|
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||||
|
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||||
|
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||||
|
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||||
|
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||||
|
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||||
|
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||||
|
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||||
|
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||||
|
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||||
|
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||||
|
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||||
|
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||||
|
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||||
|
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||||
|
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||||
|
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||||
|
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||||
|
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||||
|
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||||
|
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||||
|
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||||
|
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||||
|
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||||
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||||
|
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||||
|
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||||
|
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||||
|
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||||
|
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||||
|
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||||
|
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||||
|
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||||
|
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||||
|
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||||
|
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||||
|
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||||
|
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||||
|
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||||
|
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||||
|
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||||
|
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||||
|
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||||
|
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||||
|
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||||
|
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||||
|
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||||
|
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||||
|
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||||
|
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||||
|
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||||
|
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||||
|
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||||
|
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||||
|
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||||
|
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||||
|
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||||
|
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||||
|
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||||
|
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||||
|
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||||
|
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||||
|
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||||
|
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||||
|
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||||
|
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||||
|
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||||
|
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||||
|
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||||
|
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||||
|
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||||
|
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x80, 0xF0, 0xF8, 0xF8, 0xF0,
|
||||||
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||||
|
0xF0, 0xFE, 0x7F, 0x7F, 0xFE, 0xF0,
|
||||||
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
|
||||||
|
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
|
||||||
|
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
|
||||||
|
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
|
||||||
|
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
|
||||||
|
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
|
||||||
|
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1F, 0x0F, 0x03, 0x03, 0x1F,
|
||||||
|
0xFF, 0xFC, 0xE0, 0xE0, 0xFC, 0xFF,
|
||||||
|
0x1F, 0x03, 0x00, 0x00, 0x03, 0x1F,
|
||||||
|
0xFF, 0xFC, 0xE0, 0xE0, 0xF8, 0xFC,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||||
|
0x1F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
|
||||||
|
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
|
||||||
|
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
|
||||||
|
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
|
||||||
|
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
|
||||||
|
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
|
||||||
|
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x0F, 0x0F, 0x07, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x0F, 0x0F, 0x07, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
@ -1,17 +1,50 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern uint8_t is_master;
|
extern uint8_t is_master;
|
||||||
|
static uint32_t oled_timer = 0;
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
static uint32_t hypno_timer;
|
||||||
|
#endif
|
||||||
|
|
||||||
enum layer_names {
|
enum layer_names {
|
||||||
_COLEMAKDHM,
|
_COLEMAKDHM,
|
||||||
_GAMING,
|
_GAMING,
|
||||||
_GAMING_EXT,
|
_GAMING_EXT,
|
||||||
_NUM,
|
_NUMPAD,
|
||||||
_FN,
|
_SYM,
|
||||||
_NAV,
|
_NAV,
|
||||||
_UTIL
|
_UTIL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
BSP_DEL = SAFE_RANGE,
|
||||||
|
RGB_RST, // Reset RGB
|
||||||
|
RGB_UND, // Toggle RGB underglow as layer indicator
|
||||||
|
RGB_IDL, // RGB Idling animations
|
||||||
|
RGB_MAP, // RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
RGB_NXS, // RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||||
|
RGB_SOL, // RGB_MATRIX_SOLID_COLOR
|
||||||
|
RGB_CYC, // RGB_MATRIX_CYCLE_ALL
|
||||||
|
RGB_DUO, // RGB_MATRIX_RAINBOW_PINWHEELS
|
||||||
|
RGB_SCR // RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
uint32_t raw;
|
||||||
|
struct {
|
||||||
|
bool rgb_layer_change : 1;
|
||||||
|
bool rgb_matrix_idle_anim : 1;
|
||||||
|
uint8_t rgb_matrix_active_mode : 4;
|
||||||
|
uint8_t rgb_matrix_idle_mode : 4;
|
||||||
|
uint8_t rgb_matrix_active_speed : 8;
|
||||||
|
uint8_t rgb_matrix_idle_speed : 8;
|
||||||
|
uint16_t rgb_matrix_idle_timeout : 16;
|
||||||
|
};
|
||||||
|
} user_config_t;
|
||||||
|
|
||||||
|
user_config_t user_config;
|
||||||
|
|
||||||
// Base layers
|
// Base layers
|
||||||
#define COLEMAK DF(_COLEMAKDHM)
|
#define COLEMAK DF(_COLEMAKDHM)
|
||||||
#define GAMING DF(_GAMING)
|
#define GAMING DF(_GAMING)
|
||||||
@ -20,27 +53,32 @@ enum layer_names {
|
|||||||
#define T_NAV TT(_NAV)
|
#define T_NAV TT(_NAV)
|
||||||
#define S_NAV MO(_NAV)
|
#define S_NAV MO(_NAV)
|
||||||
|
|
||||||
#define T_NUM TT(_NUM)
|
#define T_SYM TT(_SYM)
|
||||||
#define S_NUM MO(_NUM)
|
#define S_SYM MO(_SYM)
|
||||||
|
|
||||||
// Layer keys with functionality on tap
|
// Layer keys with functionality on tap
|
||||||
#define FN_TAB LT(_FN, KC_TAB)
|
|
||||||
#define NAV_0 LT(_NAV, KC_0)
|
#define NAV_0 LT(_NAV, KC_0)
|
||||||
|
#define TAB_NUM LT(_NUMPAD, KC_TAB)
|
||||||
|
|
||||||
#define EXT_SF LT(_GAMING_EXT, KC_LSHIFT)
|
#define EXT_SF LT(_GAMING_EXT, KC_LSHIFT)
|
||||||
|
|
||||||
// Tap/mod keys
|
// Tap/mod keys
|
||||||
#define RCTBR RCTL_T(KC_RBRACKET)
|
#define RCTL_BR RCTL_T(KC_RBRACKET)
|
||||||
#define LCTBR LCTL_T(KC_LBRACKET)
|
#define LCTL_BR LCTL_T(KC_LBRACKET)
|
||||||
|
|
||||||
#define SFSPC LSFT_T(KC_SPACE)
|
#define SFT_SPC LSFT_T(KC_SPACE)
|
||||||
#define SFENT LSFT_T(KC_ENTER)
|
#define SFT_ENT RSFT_T(KC_ENTER)
|
||||||
|
|
||||||
// Global tab forward and backward
|
// Global tab forward and backward
|
||||||
#define TBFWD LCTL(KC_TAB)
|
#define TAB_FWD LCTL(KC_TAB)
|
||||||
#define TBBCK LCTL(LSFT(KC_TAB))
|
#define TAB_BCK LCTL(LSFT(KC_TAB))
|
||||||
|
#define TAB_CLS LCTL(KC_W)
|
||||||
|
|
||||||
// Custom key for NUM layer
|
#define WIN_CLS LALT(KC_F4)
|
||||||
#define CTEQL RCTL_T(KC_EQL)
|
|
||||||
|
// CTRL become parens keys on NAV and NUM layers
|
||||||
|
#define LCT_PRN KC_LCPO
|
||||||
|
#define RCT_PRN KC_RCPC
|
||||||
|
|
||||||
// €
|
// €
|
||||||
#define KC_EUR ALGR(KC_5)
|
#define KC_EUR ALGR(KC_5)
|
||||||
@ -48,19 +86,19 @@ enum layer_names {
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_COLEMAKDHM] = LAYOUT( \
|
[_COLEMAKDHM] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,\
|
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, BSP_DEL,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
FN_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,\
|
TAB_NUM, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
LCTBR, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, RCTBR,\
|
LCTL_BR, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, RCTL_BR,\
|
||||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||||
KC_LALT, T_NUM, SFSPC, SFENT, T_NAV, KC_RGUI \
|
KC_LALT, T_SYM, SFT_SPC, SFT_ENT, T_NAV, KC_RGUI \
|
||||||
//`--------------------------' `--------------------------'
|
//`--------------------------' `--------------------------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_GAMING] = LAYOUT( \
|
[_GAMING] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
|
KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
@ -72,59 +110,59 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_GAMING_EXT] = LAYOUT( \
|
[_GAMING_EXT] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
KC_GRV, KC_1, KC_2, _______, KC_3, KC_4, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_DEL,\
|
KC_GRV, KC_1, KC_2, _______, KC_3, KC_4, _______, _______, _______, _______, _______, KC_DEL,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
KC_LBRC, KC_RBRC, _______, _______, _______, KC_BSLS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\
|
KC_LBRC, KC_RBRC, _______, _______, _______, KC_BSLS, _______, _______, _______, _______, _______, _______,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F11, KC_F12, KC_MINS, KC_EQL, _______, _______,\
|
KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______,\
|
||||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||||
_______, _______, _______, KC_ENT, _______, _______ \
|
_______, _______, _______, KC_ENT, _______, _______ \
|
||||||
//`--------------------------' `--------------------------'
|
//`--------------------------' `--------------------------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN] = LAYOUT( \
|
[_NUMPAD] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EUR, KC_P7, KC_P8, KC_P9, XXXXXXX, _______,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, KC_NLCK, XXXXXXX, KC_MINS, KC_PIPE, KC_BSLS, KC_PLUS, XXXXXXX,\
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PPLS,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, XXXXXXX, KC_PAUS, KC_SLCK, KC_PSCR, KC_INS, XXXXXXX, KC_UNDS, KC_LT, KC_GT, KC_EQL, _______,\
|
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_EQL, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PAST,\
|
||||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||||
_______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, KC_P0, KC_DOT \
|
||||||
//`--------------------------' `--------------------------'
|
//`--------------------------' `--------------------------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_NUM] = LAYOUT( \
|
[_SYM] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLSH, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS,\
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_MINS, KC_PLUS,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, KC_CIRC, KC_AMPR, KC_EUR, KC_LPRN, KC_RPRN, KC_ASTR, KC_1, KC_2, KC_3, KC_UNDS, CTEQL,\
|
LCT_PRN, XXXXXXX, XXXXXXX, XXXXXXX, KC_EUR, XXXXXXX, KC_EQL, KC_PIPE, KC_LT, KC_GT, KC_BSLS, RCT_PRN,\
|
||||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||||
_______, S_NUM, _______, _______, NAV_0, KC_DOT \
|
_______, S_SYM, _______, _______, _______, _______ \
|
||||||
//`--------------------------' `--------------------------'
|
//`--------------------------' `--------------------------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_NAV] = LAYOUT( \
|
[_NAV] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
_______, KC_WH_U, TBBCK, KC_MS_U, TBFWD, KC_BTN2, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_DEL,\
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_BSPC,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
KC_TAB, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,\
|
KC_TILD, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
_______, XXXXXXX, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, _______,\
|
LCT_PRN, KC_F11, KC_F12, KC_INS, KC_PSCR, KC_CAPS, WIN_CLS, TAB_BCK, TAB_CLS, TAB_FWD, XXXXXXX, RCT_PRN,\
|
||||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------+---------|
|
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+---------|
|
||||||
_______, _______, _______, _______, S_NAV, _______ \
|
_______, _______, _______, _______, S_NAV, _______ \
|
||||||
//`--------------------------' `--------------------------'
|
//`--------------------------' `--------------------------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_UTIL] = LAYOUT( \
|
[_UTIL] = LAYOUT( \
|
||||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
RESET, XXXXXXX, KC_MSTP, KC_VOLU, KC_MNXT, XXXXXXX, COLEMAK, GAMING, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
RESET, XXXXXXX, KC_MPRV, KC_VOLU, KC_MNXT, COLEMAK, RGB_IDL, RGB_MAP, RGB_NXS, XXXXXXX, RGB_HUD, RGB_HUI,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI,\
|
RGB_RST, XXXXXXX, KC_MSTP, KC_VOLD, KC_MPLY, GAMING, RGB_UND, RGB_DUO, RGB_SCR, RGB_SPI, RGB_SAD, RGB_SAI,\
|
||||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
XXXXXXX, KC_SLEP, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, RGB_TOG,RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD,\
|
EEP_RST, KC_SLEP, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, RGB_TOG, RGB_SOL, RGB_CYC, RGB_SPD, RGB_VAD, RGB_VAI,\
|
||||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||||
_______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, _______ \
|
||||||
//`--------------------------' `--------------------------'
|
//`--------------------------' `--------------------------'
|
||||||
@ -134,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
switch (get_highest_layer(default_layer_state)) {
|
switch (get_highest_layer(default_layer_state)) {
|
||||||
case _COLEMAKDHM:
|
case _COLEMAKDHM:
|
||||||
state = update_tri_layer_state(state, _NUM, _NAV, _UTIL);
|
state = update_tri_layer_state(state, _SYM, _NAV, _UTIL);
|
||||||
break;
|
break;
|
||||||
case _GAMING:
|
case _GAMING:
|
||||||
state = update_tri_layer_state(state, _GAMING_EXT, _NAV, _UTIL);
|
state = update_tri_layer_state(state, _GAMING_EXT, _NAV, _UTIL);
|
||||||
@ -161,11 +199,32 @@ void render_crkbd_logo(void) {
|
|||||||
oled_write_P(crkbd_logo, false);
|
oled_write_P(crkbd_logo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ifdef RGB_MATRIX_ENABLE
|
||||||
|
const char *rgb_matrix_anim_oled_text(uint8_t mode) {
|
||||||
|
switch (mode) {
|
||||||
|
case RGB_MATRIX_TYPING_HEATMAP:
|
||||||
|
return PSTR("Heat ");
|
||||||
|
case RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS:
|
||||||
|
return PSTR("Nexus");
|
||||||
|
case RGB_MATRIX_SOLID_COLOR:
|
||||||
|
return PSTR("Solid");
|
||||||
|
case RGB_MATRIX_CYCLE_ALL:
|
||||||
|
return PSTR("Cycle");
|
||||||
|
case RGB_MATRIX_RAINBOW_PINWHEELS:
|
||||||
|
return PSTR("Wheel");
|
||||||
|
case RGB_MATRIX_CYCLE_LEFT_RIGHT:
|
||||||
|
return PSTR("Wave ");
|
||||||
|
default:
|
||||||
|
return PSTR("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
void render_status(void) {
|
void render_status(void) {
|
||||||
// oled_write_P(PSTR("Layout: "), false);
|
// oled_write_P(PSTR("Layout: "), false);
|
||||||
switch (get_highest_layer(default_layer_state)) {
|
switch (get_highest_layer(default_layer_state)) {
|
||||||
case _COLEMAKDHM:
|
case _COLEMAKDHM:
|
||||||
oled_write_P(PSTR("CLMK "), false);
|
oled_write_P(PSTR("TYPE "), false);
|
||||||
break;
|
break;
|
||||||
case _GAMING:
|
case _GAMING:
|
||||||
oled_write_P(PSTR("GAME "), false);
|
oled_write_P(PSTR("GAME "), false);
|
||||||
@ -178,18 +237,18 @@ void render_status(void) {
|
|||||||
case 0:
|
case 0:
|
||||||
oled_write_P(PSTR(" "), false);
|
oled_write_P(PSTR(" "), false);
|
||||||
break;
|
break;
|
||||||
case _NUM:
|
case _SYM:
|
||||||
oled_write_P(PSTR("Comm "), false);
|
oled_write_P(PSTR("Sym "), false);
|
||||||
break;
|
|
||||||
case _FN:
|
|
||||||
oled_write_P(PSTR("Stage"), false);
|
|
||||||
break;
|
break;
|
||||||
case _NAV:
|
case _NAV:
|
||||||
oled_write_P(PSTR("Fuel "), false);
|
oled_write_P(PSTR("Nav "), false);
|
||||||
break;
|
break;
|
||||||
case _GAMING_EXT:
|
case _GAMING_EXT:
|
||||||
oled_write_P(PSTR("Ext "), false);
|
oled_write_P(PSTR("Ext "), false);
|
||||||
break;
|
break;
|
||||||
|
case _NUMPAD:
|
||||||
|
oled_write_P(PSTR("Num "), false);
|
||||||
|
break;
|
||||||
case _UTIL:
|
case _UTIL:
|
||||||
oled_write_P(PSTR("Util "), false);
|
oled_write_P(PSTR("Util "), false);
|
||||||
break;
|
break;
|
||||||
@ -201,34 +260,314 @@ void render_status(void) {
|
|||||||
|
|
||||||
uint8_t modifiers = get_mods();
|
uint8_t modifiers = get_mods();
|
||||||
|
|
||||||
oled_write_P( (modifiers & MOD_MASK_CTRL) ? PSTR("PROG ") : PSTR(" "), false);
|
oled_write_P((modifiers & MOD_MASK_SHIFT) ? PSTR("SHIFT") : PSTR("\n"), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_SHIFT) ? PSTR("PULSE") : PSTR(" "), false);
|
oled_write_P((modifiers & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR("\n"), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_ALT) ? PSTR("STBY ") : PSTR(" "), false);
|
oled_write_P((modifiers & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR("\n"), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_GUI) ? PSTR("GYRO ") : PSTR(" "), false);
|
oled_write_P((modifiers & MOD_MASK_GUI) ? PSTR("SUPER") : PSTR("\n"), false);
|
||||||
|
|
||||||
oled_write_P(PSTR("\n"), false);
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
|
||||||
uint8_t led_usb_state = host_keyboard_leds();
|
uint8_t led_usb_state = host_keyboard_leds();
|
||||||
oled_write_P(PSTR("Mode:\n"), false);
|
oled_write_P(PSTR("Mode:"), false);
|
||||||
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR("\n"), false);
|
||||||
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR("\n"), false);
|
||||||
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
|
||||||
|
# ifdef RGB_MATRIX_ENABLE
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
|
||||||
|
if (rgb_matrix_config.enable) {
|
||||||
|
if (user_config.rgb_matrix_idle_anim) {
|
||||||
|
oled_write_P(rgb_matrix_anim_oled_text(user_config.rgb_matrix_active_mode), false);
|
||||||
|
oled_write_P(rgb_matrix_anim_oled_text(user_config.rgb_matrix_idle_mode), false);
|
||||||
|
} else {
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
oled_write_P(rgb_matrix_anim_oled_text(rgb_matrix_get_mode()), false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
}
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void oled_task_user(void) {
|
void oled_task_user(void) {
|
||||||
|
if (timer_elapsed32(oled_timer) > OLED_TIMEOUT) {
|
||||||
|
oled_off();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
oled_on();
|
||||||
|
}
|
||||||
|
|
||||||
if (is_master) {
|
if (is_master) {
|
||||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||||
} else {
|
} else {
|
||||||
render_crkbd_logo();
|
render_crkbd_logo();
|
||||||
// oled_scroll_left(); // Turns on scrolling
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
if (user_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == user_config.rgb_matrix_idle_mode) {
|
||||||
|
oled_scroll_left(); // Turns on scrolling
|
||||||
|
} else {
|
||||||
|
oled_scroll_off();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
|
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t led_type) {
|
||||||
|
HSV hsv = {hue, sat, val};
|
||||||
|
if (hsv.v > rgb_matrix_config.hsv.v) {
|
||||||
|
hsv.v = rgb_matrix_config.hsv.v;
|
||||||
|
}
|
||||||
|
|
||||||
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
|
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
|
if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
|
||||||
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void check_default_layer(uint8_t type) {
|
||||||
|
switch (get_highest_layer(default_layer_state)) {
|
||||||
|
case _COLEMAKDHM:
|
||||||
|
rgb_matrix_layer_helper(THEME_HSV, type);
|
||||||
|
break;
|
||||||
|
case _GAMING:
|
||||||
|
rgb_matrix_layer_helper(HSV_RED, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_indicators_user(void) {
|
||||||
|
if (
|
||||||
|
user_config.rgb_layer_change && !g_suspend_state && rgb_matrix_config.enable &&
|
||||||
|
(!user_config.rgb_matrix_idle_anim || rgb_matrix_get_mode() != user_config.rgb_matrix_idle_mode)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _GAMING_EXT:
|
||||||
|
rgb_matrix_layer_helper(HSV_PURPLE, LED_FLAG_UNDERGLOW);
|
||||||
|
break;
|
||||||
|
case _SYM:
|
||||||
|
rgb_matrix_layer_helper(HSV_GOLDENROD, LED_FLAG_UNDERGLOW);
|
||||||
|
break;
|
||||||
|
case _NAV:
|
||||||
|
rgb_matrix_layer_helper(HSV_SPRINGGREEN, LED_FLAG_UNDERGLOW);
|
||||||
|
break;
|
||||||
|
case _UTIL:
|
||||||
|
rgb_matrix_layer_helper(HSV_PINK, LED_FLAG_UNDERGLOW);
|
||||||
|
break;
|
||||||
|
case _NUMPAD:
|
||||||
|
rgb_matrix_layer_helper(HSV_CORAL, LED_FLAG_UNDERGLOW);
|
||||||
|
break;
|
||||||
|
default: {
|
||||||
|
check_default_layer(LED_FLAG_UNDERGLOW);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_update_current_mode(uint8_t mode, uint8_t speed) {
|
||||||
|
rgb_matrix_config.speed = speed;
|
||||||
|
rgb_matrix_mode_noeeprom(mode);
|
||||||
|
eeconfig_update_user(user_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_update_dynamic_mode(uint8_t mode, uint8_t speed, bool active) {
|
||||||
|
if (active) {
|
||||||
|
user_config.rgb_matrix_active_speed = speed;
|
||||||
|
user_config.rgb_matrix_active_mode = mode;
|
||||||
|
} else {
|
||||||
|
user_config.rgb_matrix_idle_speed = speed;
|
||||||
|
user_config.rgb_matrix_idle_mode = mode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_update_mode(uint8_t mode, uint8_t speed, bool active) {
|
||||||
|
if (user_config.rgb_matrix_idle_anim) {
|
||||||
|
rgb_matrix_update_dynamic_mode(mode, speed, active);
|
||||||
|
}
|
||||||
|
if (active || !user_config.rgb_matrix_idle_anim) {
|
||||||
|
rgb_matrix_update_current_mode(mode, speed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_set_defaults(void) {
|
||||||
|
rgb_matrix_config.enable = 1;
|
||||||
|
rgb_matrix_sethsv_noeeprom(THEME_HSV);
|
||||||
|
|
||||||
|
user_config.rgb_layer_change = false;
|
||||||
|
user_config.rgb_matrix_idle_anim = true;
|
||||||
|
user_config.rgb_matrix_idle_timeout = 60000;
|
||||||
|
|
||||||
|
rgb_matrix_update_dynamic_mode(RGB_MATRIX_CYCLE_ALL, RGB_MATRIX_ANIMATION_SPEED_SLOWER, false);
|
||||||
|
rgb_matrix_update_dynamic_mode(RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS, RGB_MATRIX_ANIMATION_SPEED_DEFAULT, true);
|
||||||
|
|
||||||
|
eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config));
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_rgb(void) {
|
||||||
|
if (user_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == user_config.rgb_matrix_active_mode && timer_elapsed32(hypno_timer) > user_config.rgb_matrix_idle_timeout) {
|
||||||
|
if (user_config.rgb_layer_change) {
|
||||||
|
rgb_matrix_layer_helper(0, 0, 0, LED_FLAG_UNDERGLOW);
|
||||||
|
}
|
||||||
|
rgb_matrix_update_current_mode(user_config.rgb_matrix_idle_mode, user_config.rgb_matrix_idle_speed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
static bool has_ran_yet;
|
||||||
|
if (!has_ran_yet) {
|
||||||
|
has_ran_yet = true;
|
||||||
|
startup_user();
|
||||||
|
}
|
||||||
|
matrix_scan_rgb();
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeconfig_init_user(void) {
|
||||||
|
user_config.raw = 0;
|
||||||
|
rgb_matrix_mode_noeeprom(user_config.rgb_matrix_active_mode);
|
||||||
|
keyboard_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
user_config.raw = eeconfig_read_user();
|
||||||
|
rgb_matrix_set_defaults();
|
||||||
|
rgb_matrix_enable_noeeprom();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void suspend_power_down_keymap(void) {
|
void suspend_power_down_keymap(void) {
|
||||||
|
oled_off();
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspend_wakeup_init_keymap(void) {
|
void suspend_wakeup_init_keymap(void) {
|
||||||
|
oled_on();
|
||||||
rgb_matrix_set_suspend_state(false);
|
rgb_matrix_set_suspend_state(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
static uint8_t saved_mods = 0;
|
||||||
|
uint16_t temp_keycode = keycode;
|
||||||
|
|
||||||
|
oled_timer = timer_read32();
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
if (user_config.rgb_matrix_idle_anim) {
|
||||||
|
hypno_timer = timer_read32();
|
||||||
|
if (rgb_matrix_get_mode() == user_config.rgb_matrix_idle_mode) {
|
||||||
|
rgb_matrix_update_current_mode(user_config.rgb_matrix_active_mode, user_config.rgb_matrix_active_speed);
|
||||||
|
if (!user_config.rgb_layer_change) {
|
||||||
|
rgb_matrix_layer_helper(0, 0, 0, LED_FLAG_UNDERGLOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Filter out the actual keycode from MT and LT keys.
|
||||||
|
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
|
||||||
|
temp_keycode &= 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (temp_keycode) {
|
||||||
|
case BSP_DEL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
saved_mods = get_mods() & MOD_MASK_SHIFT;
|
||||||
|
|
||||||
|
if (saved_mods == MOD_MASK_SHIFT) { // Both shifts pressed
|
||||||
|
register_code(KC_DEL);
|
||||||
|
} else if (saved_mods) { // One shift pressed
|
||||||
|
del_mods(saved_mods); // Remove any Shifts present
|
||||||
|
register_code(KC_DEL);
|
||||||
|
add_mods(saved_mods); // Add shifts again
|
||||||
|
} else {
|
||||||
|
register_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_DEL);
|
||||||
|
unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
user_config.rgb_matrix_idle_timeout = 60000;
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_CYCLE_ALL, RGB_MATRIX_ANIMATION_SPEED_SLOWER, false);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
case GAMING:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!user_config.rgb_layer_change) {
|
||||||
|
user_config.rgb_layer_change = true;
|
||||||
|
}
|
||||||
|
user_config.rgb_matrix_idle_timeout = 10000;
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_RAINBOW_PINWHEELS, RGB_MATRIX_ANIMATION_SPEED_SLOW, false);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
case RGB_RST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_set_defaults();
|
||||||
|
rgb_matrix_enable();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_UND: // Toggle separate underglow status
|
||||||
|
if (record->event.pressed) {
|
||||||
|
user_config.rgb_layer_change ^= 1;
|
||||||
|
eeconfig_update_user(user_config.raw);
|
||||||
|
if (user_config.rgb_layer_change) {
|
||||||
|
layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
|
||||||
|
} else {
|
||||||
|
rgb_matrix_layer_helper(0, 0, 0, LED_FLAG_UNDERGLOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_IDL: // Toggle idle/heatmap animation
|
||||||
|
if (record->event.pressed) {
|
||||||
|
user_config.rgb_matrix_idle_anim ^= 1;
|
||||||
|
if (user_config.rgb_matrix_idle_anim) {
|
||||||
|
rgb_matrix_update_mode(user_config.rgb_matrix_active_mode, user_config.rgb_matrix_active_speed, true);
|
||||||
|
} else {
|
||||||
|
rgb_matrix_update_current_mode(user_config.rgb_matrix_idle_mode, user_config.rgb_matrix_idle_speed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_MAP:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_TYPING_HEATMAP, rgb_matrix_config.speed, true);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_NXS:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS, RGB_MATRIX_ANIMATION_SPEED_DEFAULT, true);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_SOL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_SOLID_COLOR, rgb_matrix_config.speed, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_CYC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_CYCLE_ALL, RGB_MATRIX_ANIMATION_SPEED_SLOWER, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_DUO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_RAINBOW_PINWHEELS, RGB_MATRIX_ANIMATION_SPEED_SLOW, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_SCR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgb_matrix_update_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT, RGB_MATRIX_ANIMATION_SPEED_SLOW, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -10,27 +10,29 @@ Many thanks to foostan for the keyboard, all QMK contributors and drashna specif
|
|||||||
|
|
||||||
### COLEMAKDHM
|
### COLEMAKDHM
|
||||||
|
|
||||||
Main typing layer. I really love having SHIFT available on thumbs. I am a left thumb space bar person, so I put SPACE there and ENTER on right. I use CTRL key combos lot in my text editor and desktop environment. That's why I have two of them. I also found them to be a great position for the square brackets. (`[` and `]`)
|
Main typing layer. I really love having SHIFT available on thumbs. I am a left thumb space bar person, so I put SPACE there and ENTER on right. I use CTRL key combos lot in my text editor and desktop environment. That's why I have two of them. I also found them to be a great position for the square brackets. (`[` and `]`). These become parenthesis (`(` and `)`) on either of the layers.
|
||||||
|
|
||||||
I don't know about you but "lower" and "raise" don't mean that much to me. I named my layers `NUM`, short for numbers and `NAV`, short for navigation. Holding the key will activate the layer for as long as it is held, double tapping it will switch to it. Single tapping it once will switch to main layer again.
|
Holding SHIFT while tapping BACKSPACE will output DEL. Holding both SHIFT keys will output SHIFT+DEL.
|
||||||
|
|
||||||
Everything else is pretty standard I'd say.
|
I don't know about you but "lower" and "raise" don't mean that much to me. I named my layers `SYM`, short for symbols and `NAV`, short for navigation. Holding the key will activate the layer for as long as it is held, double tapping it will switch to it. Single tapping it once will switch to main layer again.
|
||||||
|
|
||||||
### NUM
|
Holding TAB will access `NUM` layer which features a numpad.
|
||||||
|
|
||||||
|
### SYM
|
||||||
|
|
||||||
Includes a number row, the symbols normally on SHIFT and numbers, as well as a numpad under right side homing keys.
|
Includes a number row, the symbols normally on SHIFT and numbers, as well as a numpad under right side homing keys.
|
||||||
|
|
||||||
### NAV
|
### NAV
|
||||||
|
|
||||||
This is where I access arrow keys, page up, down, home, end and mouse control. I also added general tab forward and backward keys. I use these in my browser, terminal and text editor.
|
This is where I access arrow keys, page up, down, home, end and F keys. I also added general tab forward and backward keys. Tab close and window close. I primarily use these in my browser, terminal and text editor.
|
||||||
|
|
||||||
## FN
|
|
||||||
|
|
||||||
Short for function. This gives access to the function keys, as well as rarely used keys on the left side and often used symbols (for me) on the right side. It is accessed by holding TAB.
|
|
||||||
|
|
||||||
### UTIL
|
### UTIL
|
||||||
|
|
||||||
Short for utility. This is accessed by pressing both `NUM` and `NAV` at the same time. It has a software `RESET` key, media keys, RGB control and switches main layer between Colemak and a gaming layer.
|
Short for utility. This is accessed by pressing both `SYM` and `NAV` at the same time. It has a software `RESET` key, media keys, RGB control and switches main layer between Colemak and a gaming layer.
|
||||||
|
|
||||||
|
### NUMPAD
|
||||||
|
|
||||||
|
This gives access to a numpad on the right half with some additional symbols I find useful when using the numpad.
|
||||||
|
|
||||||
### GAMING
|
### GAMING
|
||||||
|
|
||||||
@ -38,20 +40,33 @@ Sometimes I switch to type in Discord, Steam, or in game chat, so I think it's m
|
|||||||
|
|
||||||
I put movement on FRST (would be ESDF on QWERTY), because it lines up more comfortably with the columnar staggered layout of the Corne. It also gives more easy access to all keys on left half.
|
I put movement on FRST (would be ESDF on QWERTY), because it lines up more comfortably with the columnar staggered layout of the Corne. It also gives more easy access to all keys on left half.
|
||||||
|
|
||||||
Most notable here is that there are no tap and hold differences anymore on left hand side besides the new layer key. This is a different layer than `NUM`.
|
Most notable here is that there are no tap and hold differences anymore on left hand side besides the new layer key. This is a different layer than `SYM`.
|
||||||
|
|
||||||
### GAMING_EXT
|
### GAMING_EXT
|
||||||
|
|
||||||
This is the gaming extended layer where movement keys remain the same. This means I can keep moving while accessing second layer keys. All other keys are keys on which I can easily rebind something. Besides that it gives me the function keys and an ENTER key which does not change. This is good when a game requires you to hold ENTER.
|
This is the gaming extended layer where movement keys remain the same. This means I can keep moving while accessing second layer keys. All other keys are keys on which I can easily rebind something. Besides that it gives me an ENTER key which does not switch. This is good when a game requires you to hold ENTER.
|
||||||
|
|
||||||
## Notes
|
## RGB
|
||||||
|
|
||||||
I use MT3 Godspeed caps and thought it would be fun to theme the OLED output towards it. The slave side has the icon and two planets. The left side refers to modifiers by matching the novelty mod legends.
|
I took a big inspiration from Drashna's RGB configuration and tweaked it.
|
||||||
|
|
||||||
|
- `RGB_UND`: Toggles underglow indicators on and off. Each layer has its own color.
|
||||||
|
- `RGB_IDL`: This will enable/disable idle mode. By default, when typing, the `DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` will be used. When the idle timeout has exceeded the secondary animation will be activated, which is `RGB_MATRIX_CYCLE_ALL` by default. When switching to `GAMING` layer the timeout will be reduced and the idle animation changed to `RGB_MATRIX_RAINBOW_PINWHEELS`.
|
||||||
|
When idle mode is enabled, `RGB_MATRIX_TYPING_HEATMAP` and `RGB_MATRIX_MULTISPLASH` will be used for active animation. All others for idle animation. When disabling idle mode, the current idle animation will be activated. Additionally, on idling, the underglow layer indication will be deactivated.
|
||||||
|
- There are no RGB mode cycle keys, but instead several keys to use a specific RGB directly. Each has their own default speed, although this can be changed.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
I am using DFU and have to flash both halves individually.
|
`make crkbd/rev1:rpbaptist:dfu`
|
||||||
|
|
||||||
Left half: `make crkbd/rev1:rpbaptist:dfu-split-left`
|
## Notes
|
||||||
|
|
||||||
Right half: `make crkbd/rev1:rpbaptist:dfu-split-right RGB_MATRIX_SPLIT_RIGHT=yes`
|
I use several OLED slave side images, depending on the keycaps I am using. These also determine the default LED color and underglow.
|
||||||
|
|
||||||
|
`make crkbd/rev1:rpbaptist:dfu THEME=pulse`
|
||||||
|
|
||||||
|
Current supported themes are:
|
||||||
|
|
||||||
|
- godspeed
|
||||||
|
- laser
|
||||||
|
- pulse
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
# This enables Link Time Optimization. This can save a good chunk of space (several KB for me), but the macro and function ... functions cause it to error out.
|
#This enables Link Time Optimization.This can save a good chunk of space(several KB for me), but the macro and function... functions cause it to error out.
|
||||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||||
|
|
||||||
# Build Options
|
#Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
#change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
#the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
# DYNAMIC_MACRO_ENABLE = yes
|
||||||
|
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
@ -22,13 +23,21 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
|||||||
|
|
||||||
RGB_MATRIX_ENABLE = WS2812
|
RGB_MATRIX_ENABLE = WS2812
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
#Do not enable SLEEP_LED_ENABLE.it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
BOOTLOADER = qmk-dfu
|
BOOTLOADER = qmk-dfu
|
||||||
|
|
||||||
OLED_DRIVER_ENABLE = yes
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
|
||||||
# ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
ifeq ($(strip $(THEME)), godspeed)
|
||||||
# RGB_MATRIX_SPLIT_RIGHT=yes
|
OPT_DEFS += -DTHEME_GODSPEED
|
||||||
# endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(THEME)), pulse)
|
||||||
|
OPT_DEFS += -DTHEME_PULSE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(THEME)), laser)
|
||||||
|
OPT_DEFS += -DTHEME_LASER
|
||||||
|
endif
|
||||||
|
@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
@ -37,7 +37,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGBLED_NUM 18
|
#define RGBLED_NUM 18
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
|
|
||||||
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
|
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
|
||||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 60
|
#define MOUSEKEY_WHEEL_TIME_TO_MAX 60
|
||||||
// Timeout settings for leader key
|
|
||||||
#undef LEADER_TIMEOUT
|
|
||||||
#define LEADER_TIMEOUT 350
|
|
||||||
#define LEADER_PER_KEY_TIMING
|
|
||||||
|
|
||||||
#undef DEBOUNCE
|
#undef DEBOUNCE
|
||||||
#define DEBOUNCE 45
|
#define DEBOUNCE 45
|
||||||
|
@ -36,9 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
OSM(MOD_LSFT) ,LT(2,KC_BSPACE) ,OSM(MOD_LGUI) ,
|
OSM(MOD_LSFT) ,LT(2,KC_BSPACE) ,OSM(MOD_LGUI) ,
|
||||||
|
|
||||||
|
|
||||||
TO(1) ,KC_6 ,KC_7 ,KC_8 ,TD_F9 ,LT(3,KC_0) ,KC_DQUO ,
|
TO(1) ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,LT(3,KC_0) ,KC_DQUO ,
|
||||||
KC_UNDS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,RSFT_T(KC_MINUS) ,
|
KC_UNDS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,RSFT_T(KC_MINUS) ,
|
||||||
HYPR_T(KC_H) ,ALT_T(KC_J) ,RCTL_T(KC_K) ,LT(6,KC_L) ,TD_CLN ,GUI_T(KC_QUOTE) ,
|
HYPR_H ,ALT_J ,CTL_K ,LT(6,KC_L) ,TD_CLN ,CMD_QUOT ,
|
||||||
ALT_TAB ,KC_N ,MEH_T(KC_M) ,KC_COMMA ,KC_DOT ,KC_SLASH ,LT(4,KC_KP_ASTERISK),
|
ALT_TAB ,KC_N ,MEH_T(KC_M) ,KC_COMMA ,KC_DOT ,KC_SLASH ,LT(4,KC_KP_ASTERISK),
|
||||||
LT(4,KC_ENTER) ,KC_DOWN ,KC_LBRACKET ,KC_RBRACKET ,OSL(2) ,
|
LT(4,KC_ENTER) ,KC_DOWN ,KC_LBRACKET ,KC_RBRACKET ,OSL(2) ,
|
||||||
KC_AUDIO_MUTE ,KC_ESCAPE ,
|
KC_AUDIO_MUTE ,KC_ESCAPE ,
|
||||||
@ -88,14 +88,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LABK ,KC_RABK ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LABK ,KC_RABK ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,KC_AT ,KC_TRANSPARENT ,KC_EQL ,F_ARROW ,KC_GRAVE ,
|
KC_TRANSPARENT ,KC_AT ,KC_TRANSPARENT ,KC_EQL ,F_ARROW ,KC_GRAVE ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LBRACKET ,KC_RBRACKET ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LBRACKET ,KC_RBRACKET ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,IARROW ,ARROW ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,
|
KC_TRANSPARENT ,
|
||||||
// Right hand
|
// Right hand
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
LALT(LSFT(KC_UP)) ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_KP_ASTERISK ,KC_PERC ,KC_DLR ,
|
LALT(LSFT(KC_UP)) ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_KP_ASTERISK ,KC_PERC ,KC_DLR ,
|
||||||
KC_AMPR ,KC_LPRN ,KC_RPRN ,KC_CIRC ,KC_KP_PLUS ,KC_PIPE ,
|
KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_KP_PLUS ,KC_PIPE ,
|
||||||
LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH ,
|
LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
RESET ,KC_TRANSPARENT ,
|
RESET ,KC_TRANSPARENT ,
|
||||||
@ -316,3 +316,11 @@ void oneshot_mods_changed_user(uint8_t mods) {
|
|||||||
void oneshot_locked_mods_changed_user(uint8_t mods) {
|
void oneshot_locked_mods_changed_user(uint8_t mods) {
|
||||||
oneshot_mods_changed_user(mods);
|
oneshot_mods_changed_user(mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============== alt_tab callbacks
|
||||||
|
void alt_tab_activated(void){
|
||||||
|
layer_on(7); // activate motion layer
|
||||||
|
}
|
||||||
|
void alt_tab_deactivated(void){
|
||||||
|
layer_off(7); // activate motion layer
|
||||||
|
}
|
||||||
|
@ -44,8 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
/* key combination for magic key command */
|
/* key combination for magic key command */
|
||||||
/* defined by default; to change, uncomment and set to the combination you want */
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
@ -43,8 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
/* key combination for magic key command */
|
/* key combination for magic key command */
|
||||||
/* defined by default; to change, uncomment and set to the combination you want */
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
@ -50,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
#define USB_MAX_POWER_CONSUMPTION 100
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
102
keyboards/handwired/prkl30/keymaps/erkhal/keymap.c
Normal file
102
keyboards/handwired/prkl30/keymaps/erkhal/keymap.c
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_nordic.h"
|
||||||
|
enum layers {
|
||||||
|
_DEFAULT,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PRKL = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define FN MO(_FN)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Default
|
||||||
|
* ,-----------------------------------------------------------------------------------.------.
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | ¨^ | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä | Entr |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|------'
|
||||||
|
* | Shift| Z | X | C | V | Space | B | N | M | , | . |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_DEFAULT] = LAYOUT_2u_space(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_QUOT, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, LT(_FN, KC_ENT),
|
||||||
|
KC_LSFT, LGUI_T(KC_Z), KC_X, KC_C, KC_V, LT(_LOWER, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, LT(_RAISE, KC_DOT)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower - Numbers and some symbols
|
||||||
|
* ,------------------------------------------------------------------------------------------.
|
||||||
|
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | DEL |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------|
|
||||||
|
* | | TAB | | | | | | | | | | ' | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------'
|
||||||
|
* | | | | | | | | | | - | |
|
||||||
|
* `------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_2u_space(
|
||||||
|
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_DEL,
|
||||||
|
_______, KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_APOS, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, NO_MINS, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise - AltGred Characters and more symbols
|
||||||
|
* ,------------------------------------------------------------------------------------------.
|
||||||
|
* | ~ | > | @ | £ | $ | % | & | | | [ | ] | ≈ | ? | { |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------|
|
||||||
|
* | | | | UP | | | | | | | | | } |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------'
|
||||||
|
* | | < | LEFT | DOWN | RIGHT| | | | | | |
|
||||||
|
* `------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_2u_space(
|
||||||
|
NO_TILD, NO_SECT, NO_AT, NO_PND, NO_DLR, KC_PERC, NO_AMPR, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_QUES, LSFT(NO_LBRC),
|
||||||
|
_______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, LSFT(NO_RBRC),
|
||||||
|
_______, NO_HALF, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN
|
||||||
|
* ,------------------------------------------------------------------------------------------.
|
||||||
|
* |RESET | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------|
|
||||||
|
* | |RGB_P |RGB_HD|RGB_HI| VOL- | PREV | NEXT | VOL+ | | | | PRKL | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------'
|
||||||
|
* | RGB_M|RGB_VD|RGB_VI|RGB_TG| | PLAY/PAUSE | | | |LCA(DEL)| |
|
||||||
|
* `------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT_2u_space(
|
||||||
|
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,
|
||||||
|
_______, RGB_M_P, RGB_HUD, RGB_HUI, KC_VOLD, KC_MPRV, KC_MNXT, KC_VOLU, _______, _______, _______, PRKL, _______,
|
||||||
|
RGB_MOD, RGB_VAD, RGB_VAI, RGB_TOG, _______, KC_MPLY, _______, _______, _______, LCA(KC_DEL), _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(LCTL(KC_RIGHT));
|
||||||
|
} else {
|
||||||
|
tap_code16(LCTL(KC_LEFT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case PRKL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
//When PRKL is pressed, print out the holy power word of our people
|
||||||
|
SEND_STRING("PERKELE");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
16
keyboards/handwired/prkl30/keymaps/erkhal/readme.md
Normal file
16
keyboards/handwired/prkl30/keymaps/erkhal/readme.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# The default keymap for PRKL30
|
||||||
|
|
||||||
|
Layout geared towards productivity with OSX
|
||||||
|
-----
|
||||||
|
|
||||||
|
Default layer
|
||||||
|

|
||||||
|
|
||||||
|
Lower
|
||||||
|

|
||||||
|
|
||||||
|
Raise
|
||||||
|

|
||||||
|
|
||||||
|
FN
|
||||||
|

|
@ -6,8 +6,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
|
|
||||||
#ifdef USE_I2C
|
|
||||||
|
|
||||||
// Limits the amount of we wait for any one i2c transaction.
|
// Limits the amount of we wait for any one i2c transaction.
|
||||||
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
|
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
|
||||||
// 9 bits, a single transaction will take around 90μs to complete.
|
// 9 bits, a single transaction will take around 90μs to complete.
|
||||||
@ -159,4 +157,3 @@ ISR(TWI_vect) {
|
|||||||
// Reset everything, so we are ready for the next TWI interrupt
|
// Reset everything, so we are ready for the next TWI interrupt
|
||||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define TAPPING_TERM 100
|
#define TAPPING_TERM 100
|
||||||
|
|
||||||
/* Use I2C or Serial */
|
/* Use I2C or Serial */
|
||||||
#define USE_I2C
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
//#define USE_MATRIX_I2C
|
//#define USE_MATRIX_I2C
|
||||||
|
|
||||||
@ -60,6 +59,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
@ -120,6 +120,13 @@ $ make HELIX=no_ani helix/pico/back:default # with backlight without animation
|
|||||||
$ make helix/pico/under:default # with underglow
|
$ make helix/pico/under:default # with underglow
|
||||||
```
|
```
|
||||||
|
|
||||||
|
build (experimental use of split_common)
|
||||||
|
```
|
||||||
|
$ make helix/pico/sc:default
|
||||||
|
$ make helix/pico/sc/back:default
|
||||||
|
$ make helix/pico/sc/under:default
|
||||||
|
```
|
||||||
|
|
||||||
flash to keyboard
|
flash to keyboard
|
||||||
```
|
```
|
||||||
$ make helix/pico:default:flash
|
$ make helix/pico:default:flash
|
||||||
|
@ -10,7 +10,7 @@ define HELIX_CUSTOMISE_MSG
|
|||||||
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
||||||
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
||||||
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
||||||
$(info - LED_ANIMATION = $(LED_ANIMATIONS))
|
$(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
|
||||||
$(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
|
$(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
|
||||||
$(info )
|
$(info )
|
||||||
endef
|
endef
|
||||||
@ -43,12 +43,34 @@ endef
|
|||||||
ifeq ($(findstring ios,$(HELIX)), ios)
|
ifeq ($(findstring ios,$(HELIX)), ios)
|
||||||
IOS_DEVICE_ENABLE = yes
|
IOS_DEVICE_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(findstring scan,$(HELIX)), scan)
|
||||||
|
# use DEBUG_MATRIX_SCAN_RATE
|
||||||
|
# see docs/newbs_testing_debugging.md
|
||||||
|
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
SHOW_VERBOSE_INFO = yes
|
||||||
|
endif
|
||||||
ifeq ($(findstring verbose,$(HELIX)), verbose)
|
ifeq ($(findstring verbose,$(HELIX)), verbose)
|
||||||
SHOW_VERBOSE_INFO = yes
|
SHOW_VERBOSE_INFO = yes
|
||||||
endif
|
endif
|
||||||
SHOW_HELIX_OPTIONS = yes
|
SHOW_HELIX_OPTIONS = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||||
|
SRC += local_drivers/serial.c
|
||||||
|
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||||
|
|
||||||
|
# A workaround until #7089 is merged.
|
||||||
|
# serial.c must not be compiled with the -lto option.
|
||||||
|
# The current LIB_SRC has a side effect with the -fno-lto option, so use it.
|
||||||
|
LIB_SRC += local_drivers/serial.c
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
SRC += pico/matrix.c
|
||||||
|
SRC += pico/split_util.c
|
||||||
|
endif
|
||||||
|
|
||||||
########
|
########
|
||||||
# convert Helix-specific options (that represent combinations of standard options)
|
# convert Helix-specific options (that represent combinations of standard options)
|
||||||
# into QMK standard options.
|
# into QMK standard options.
|
||||||
@ -73,11 +95,13 @@ ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||||
|
SRC += local_drivers/i2c.c
|
||||||
|
SRC += local_drivers/ssd1306.c
|
||||||
|
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||||
OPT_DEFS += -DOLED_ENABLE
|
OPT_DEFS += -DOLED_ENABLE
|
||||||
endif
|
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
||||||
|
|
||||||
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
|
||||||
OPT_DEFS += -DLOCAL_GLCDFONT
|
OPT_DEFS += -DLOCAL_GLCDFONT
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(AUDIO_ENABLE)),yes)
|
ifeq ($(strip $(AUDIO_ENABLE)),yes)
|
||||||
@ -93,6 +117,8 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
|
|||||||
$(eval $(call HELIX_CUSTOMISE_MSG))
|
$(eval $(call HELIX_CUSTOMISE_MSG))
|
||||||
ifneq ($(strip $(SHOW_VERBOSE_INFO)),)
|
ifneq ($(strip $(SHOW_VERBOSE_INFO)),)
|
||||||
$(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
|
$(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
|
||||||
|
$(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE))
|
||||||
|
$(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE))
|
||||||
$(info -- OPT_DEFS = $(OPT_DEFS))
|
$(info -- OPT_DEFS = $(OPT_DEFS))
|
||||||
$(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE))
|
$(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE))
|
||||||
$(info )
|
$(info )
|
||||||
|
@ -46,7 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
static uint8_t debouncing = DEBOUNCE;
|
static uint8_t debouncing = DEBOUNCE;
|
||||||
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
||||||
static uint8_t error_count = 0;
|
static uint8_t error_count = 0;
|
||||||
uint8_t is_master = 0 ;
|
|
||||||
|
|
||||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
@ -94,9 +93,8 @@ uint8_t matrix_cols(void)
|
|||||||
|
|
||||||
void matrix_init(void)
|
void matrix_init(void)
|
||||||
{
|
{
|
||||||
debug_enable = true;
|
split_keyboard_setup();
|
||||||
debug_matrix = true;
|
|
||||||
debug_mouse = true;
|
|
||||||
// initialize row and col
|
// initialize row and col
|
||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
@ -111,8 +109,6 @@ void matrix_init(void)
|
|||||||
matrix_debouncing[i] = 0;
|
matrix_debouncing[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
is_master = has_usb();
|
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +193,7 @@ int serial_transaction(void) {
|
|||||||
|
|
||||||
uint8_t matrix_scan(void)
|
uint8_t matrix_scan(void)
|
||||||
{
|
{
|
||||||
if (is_master) {
|
if (is_helix_master()) {
|
||||||
matrix_master_scan();
|
matrix_master_scan();
|
||||||
}else{
|
}else{
|
||||||
matrix_slave_scan();
|
matrix_slave_scan();
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#include "helix.h"
|
#include "helix.h"
|
||||||
|
|
||||||
|
// Each keymap.c should use is_keyboard_master() instead of 'is_master'.
|
||||||
|
// But keep 'is_master' for a while for backwards compatibility
|
||||||
|
// for the old keymap.c.
|
||||||
|
uint8_t is_master = false;
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
#include "ssd1306.h"
|
#include "ssd1306.h"
|
||||||
@ -15,6 +19,23 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
// Each keymap.c should use is_keyboard_master() instead of is_master.
|
||||||
|
// But keep is_master for a while for backwards compatibility
|
||||||
|
// for the old keymap.c.
|
||||||
|
is_master = is_keyboard_master();
|
||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void keyboard_post_init_kb(void) {
|
||||||
|
#if defined(DEBUG_MATRIX_SCAN_RATE)
|
||||||
|
debug_enable = true;
|
||||||
|
#endif
|
||||||
|
keyboard_post_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(SPLIT_KEYBOARD) && defined(SSD1306OLED)
|
||||||
|
void matrix_slave_scan_user(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -4,18 +4,16 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifndef SPLIT_KEYBOARD
|
||||||
//rgb led driver
|
extern bool is_helix_master(void);
|
||||||
#include "ws2812.h"
|
#define is_keyboard_master() is_helix_master()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_I2C
|
// Each keymap.c should use is_keyboard_master() instead of 'is_master', 'has_usb()'.
|
||||||
#include <stddef.h>
|
// But keep 'is_master' for a while for backwards compatibility
|
||||||
#ifdef __AVR__
|
// for the old keymap.c.
|
||||||
#include <avr/io.h>
|
extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to use 'is_keyboard_master ()' instead.
|
||||||
#include <avr/interrupt.h>
|
#define has_usb() is_keyboard_master()
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FLIP_HALF
|
#ifndef FLIP_HALF
|
||||||
// Standard Keymap
|
// Standard Keymap
|
||||||
|
7
keyboards/helix/pico/post_config.h
Normal file
7
keyboards/helix/pico/post_config.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(SPLIT_KEYBOARD) /* if use split_common */
|
||||||
|
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_SPLIT)
|
||||||
|
# define RGBLIGHT_SPLIT /* helix hardware need this */
|
||||||
|
# endif
|
||||||
|
#endif
|
@ -1,20 +1,5 @@
|
|||||||
KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk
|
KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk
|
||||||
|
|
||||||
SRC += local_drivers/i2c.c
|
|
||||||
SRC += local_drivers/serial.c
|
|
||||||
SRC += local_drivers/ssd1306.c
|
|
||||||
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
|
||||||
|
|
||||||
# A workaround until #7089 is merged.
|
|
||||||
# serial.c must not be compiled with the -lto option.
|
|
||||||
# The current LIB_SRC has a side effect with the -fno-lto option, so use it.
|
|
||||||
LIB_SRC += local_drivers/serial.c
|
|
||||||
|
|
||||||
CUSTOM_MATRIX = yes
|
|
||||||
|
|
||||||
SRC += pico/matrix.c
|
|
||||||
SRC += pico/split_util.c
|
|
||||||
|
|
||||||
# Helix Spacific Build Options default values
|
# Helix Spacific Build Options default values
|
||||||
OLED_ENABLE = no # OLED_ENABLE
|
OLED_ENABLE = no # OLED_ENABLE
|
||||||
LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||||
|
1
keyboards/helix/pico/sc/back/rules.mk
Normal file
1
keyboards/helix/pico/sc/back/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
LED_BACK_ENABLE = yes
|
1
keyboards/helix/pico/sc/rules.mk
Normal file
1
keyboards/helix/pico/sc/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
SPLIT_KEYBOARD = yes
|
1
keyboards/helix/pico/sc/under/rules.mk
Normal file
1
keyboards/helix/pico/sc/under/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
LED_UNDERGLOW_ENABLE = yes
|
@ -7,6 +7,7 @@
|
|||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
#include "wait.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -14,21 +15,65 @@
|
|||||||
# include "serial.h"
|
# include "serial.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef EE_HANDS
|
||||||
|
# include "eeconfig.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SPLIT_USB_TIMEOUT
|
||||||
|
#define SPLIT_USB_TIMEOUT 2500
|
||||||
|
#endif
|
||||||
|
|
||||||
volatile bool isLeftHand = true;
|
volatile bool isLeftHand = true;
|
||||||
|
|
||||||
static void setup_handedness(void) {
|
bool waitForUsb(void) {
|
||||||
#ifdef EE_HANDS
|
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) {
|
||||||
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
// This will return true of a USB connection has been established
|
||||||
#else
|
if (UDADDR & _BV(ADDEN)) {
|
||||||
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
|
return true;
|
||||||
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
}
|
||||||
isLeftHand = !has_usb();
|
wait_ms(100);
|
||||||
#else
|
}
|
||||||
isLeftHand = has_usb();
|
|
||||||
#endif
|
// Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
|
||||||
#endif
|
(USBCON &= ~(_BV(USBE) | _BV(OTGPADE)));
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_keyboard_left(void) {
|
||||||
|
#if defined(SPLIT_HAND_PIN)
|
||||||
|
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
|
||||||
|
setPinInput(SPLIT_HAND_PIN);
|
||||||
|
return readPin(SPLIT_HAND_PIN);
|
||||||
|
#elif defined(EE_HANDS)
|
||||||
|
return eeconfig_read_handedness();
|
||||||
|
#elif defined(MASTER_RIGHT)
|
||||||
|
return !is_helix_master();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return is_helix_master();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_helix_master(void) {
|
||||||
|
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
|
||||||
|
|
||||||
|
// only check once, as this is called often
|
||||||
|
if (usbstate == UNKNOWN) {
|
||||||
|
#if defined(SPLIT_USB_DETECT)
|
||||||
|
usbstate = waitForUsb() ? MASTER : SLAVE;
|
||||||
|
#elif defined(__AVR__)
|
||||||
|
USBCON |= (1 << OTGPADE); // enables VBUS pad
|
||||||
|
wait_us(5);
|
||||||
|
|
||||||
|
usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS
|
||||||
|
#else
|
||||||
|
usbstate = MASTER;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return (usbstate == MASTER);
|
||||||
|
}
|
||||||
|
|
||||||
static void keyboard_master_setup(void) {
|
static void keyboard_master_setup(void) {
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
@ -47,24 +92,13 @@ static void keyboard_slave_setup(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_usb(void) {
|
|
||||||
USBCON |= (1 << OTGPADE); //enables VBUS pad
|
|
||||||
_delay_us(5);
|
|
||||||
return (USBSTA & (1<<VBUS)); //checks state of VBUS
|
|
||||||
}
|
|
||||||
|
|
||||||
void split_keyboard_setup(void) {
|
void split_keyboard_setup(void) {
|
||||||
setup_handedness();
|
isLeftHand = is_keyboard_left();
|
||||||
|
|
||||||
if (has_usb()) {
|
if (is_helix_master()) {
|
||||||
keyboard_master_setup();
|
keyboard_master_setup();
|
||||||
} else {
|
} else {
|
||||||
keyboard_slave_setup();
|
keyboard_slave_setup();
|
||||||
}
|
}
|
||||||
sei();
|
sei();
|
||||||
}
|
}
|
||||||
|
|
||||||
// this code runs before the usb and keyboard is initialized
|
|
||||||
void matrix_setup(void) {
|
|
||||||
split_keyboard_setup();
|
|
||||||
}
|
|
||||||
|
@ -12,7 +12,7 @@ extern volatile bool isLeftHand;
|
|||||||
void matrix_slave_scan(void);
|
void matrix_slave_scan(void);
|
||||||
|
|
||||||
void split_keyboard_setup(void);
|
void split_keyboard_setup(void);
|
||||||
bool has_usb(void);
|
bool is_helix_master(void);
|
||||||
|
|
||||||
void matrix_master_OLED_init (void);
|
void matrix_master_OLED_init (void);
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ Keyboard Maintainer: [Makoto Kurauchi](https://github.com/MakotoKurauchi/) [@plu
|
|||||||
Hardware Supported: Helix PCB Alpha, Beta, Pro Micro
|
Hardware Supported: Helix PCB Alpha, Beta, Pro Micro
|
||||||
Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix)
|
Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
## How to build
|
||||||
|
* [Helix how to Customize and Compile](rev2/keymaps/default/readme.md#customize)
|
||||||
make helix:default
|
* [HelixPico how to Customize and Compile](pico/keymaps/default/readme.md#customize)
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define TAPPING_TERM 100
|
#define TAPPING_TERM 100
|
||||||
|
|
||||||
/* Use I2C or Serial */
|
/* Use I2C or Serial */
|
||||||
#define USE_I2C
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
//#define USE_MATRIX_I2C
|
//#define USE_MATRIX_I2C
|
||||||
|
|
||||||
@ -68,6 +67,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
@ -137,6 +137,16 @@ $ make helix/rev2/oled/back:default # with oled and backlight
|
|||||||
$ make helix/rev2/oled/under:default # with oled and underglow
|
$ make helix/rev2/oled/under:default # with oled and underglow
|
||||||
```
|
```
|
||||||
|
|
||||||
|
build (experimental use of split_common)
|
||||||
|
```
|
||||||
|
$ make helix/rev2/sc:default
|
||||||
|
$ make helix/rev2/sc/back:default
|
||||||
|
$ make helix/rev2/sc/under:default
|
||||||
|
$ make helix/rev2/sc/oled:default
|
||||||
|
$ make helix/rev2/sc/oledback:default
|
||||||
|
$ make helix/rev2/sc/oledunder:default
|
||||||
|
```
|
||||||
|
|
||||||
flash to keyboard
|
flash to keyboard
|
||||||
```
|
```
|
||||||
$ make helix:default:flash
|
$ make helix:default:flash
|
||||||
|
@ -9,3 +9,5 @@ OLED_DRIVER_ENABLE = yes
|
|||||||
OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
|
OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
|
||||||
# Xulkal specific oled define
|
# Xulkal specific oled define
|
||||||
OPT_DEFS += -DOLED_90ROTATION
|
OPT_DEFS += -DOLED_90ROTATION
|
||||||
|
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
|
@ -10,7 +10,7 @@ define HELIX_CUSTOMISE_MSG
|
|||||||
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
||||||
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
||||||
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
||||||
$(info - LED_ANIMATION = $(LED_ANIMATIONS))
|
$(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
|
||||||
$(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
|
$(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
|
||||||
$(info )
|
$(info )
|
||||||
endef
|
endef
|
||||||
@ -43,12 +43,35 @@ endef
|
|||||||
ifeq ($(findstring ios,$(HELIX)), ios)
|
ifeq ($(findstring ios,$(HELIX)), ios)
|
||||||
IOS_DEVICE_ENABLE = yes
|
IOS_DEVICE_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(findstring scan,$(HELIX)), scan)
|
||||||
|
# use DEBUG_MATRIX_SCAN_RATE
|
||||||
|
# see docs/newbs_testing_debugging.md
|
||||||
|
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
SHOW_VERBOSE_INFO = yes
|
||||||
|
endif
|
||||||
ifeq ($(findstring verbose,$(HELIX)), verbose)
|
ifeq ($(findstring verbose,$(HELIX)), verbose)
|
||||||
SHOW_VERBOSE_INFO = yes
|
SHOW_VERBOSE_INFO = yes
|
||||||
endif
|
endif
|
||||||
SHOW_HELIX_OPTIONS = yes
|
SHOW_HELIX_OPTIONS = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||||
|
SRC += local_drivers/serial.c
|
||||||
|
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||||
|
|
||||||
|
# A workaround until #7089 is merged.
|
||||||
|
# serial.c must not be compiled with the -lto option.
|
||||||
|
# The current LIB_SRC has a side effect with the -fno-lto option, so use it.
|
||||||
|
LIB_SRC += local_drivers/serial.c
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
SRC += rev2/matrix.c
|
||||||
|
SRC += rev2/split_util.c
|
||||||
|
SRC += rev2/split_scomm.c
|
||||||
|
endif
|
||||||
|
|
||||||
########
|
########
|
||||||
# convert Helix-specific options (that represent combinations of standard options)
|
# convert Helix-specific options (that represent combinations of standard options)
|
||||||
# into QMK standard options.
|
# into QMK standard options.
|
||||||
@ -80,17 +103,21 @@ ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||||
|
SRC += local_drivers/i2c.c
|
||||||
|
SRC += local_drivers/ssd1306.c
|
||||||
|
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||||
OPT_DEFS += -DOLED_ENABLE
|
OPT_DEFS += -DOLED_ENABLE
|
||||||
endif
|
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
||||||
|
|
||||||
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
|
||||||
OPT_DEFS += -DLOCAL_GLCDFONT
|
OPT_DEFS += -DLOCAL_GLCDFONT
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
|
ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
|
||||||
$(eval $(call HELIX_CUSTOMISE_MSG))
|
$(eval $(call HELIX_CUSTOMISE_MSG))
|
||||||
ifneq ($(strip $(SHOW_VERBOSE_INFO)),)
|
ifneq ($(strip $(SHOW_VERBOSE_INFO)),)
|
||||||
$(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
|
$(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
|
||||||
|
$(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE))
|
||||||
|
$(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE))
|
||||||
$(info -- OPT_DEFS = $(OPT_DEFS))
|
$(info -- OPT_DEFS = $(OPT_DEFS))
|
||||||
$(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE))
|
$(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE))
|
||||||
$(info )
|
$(info )
|
||||||
|
@ -47,7 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
static uint8_t debouncing = DEBOUNCE;
|
static uint8_t debouncing = DEBOUNCE;
|
||||||
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
||||||
static uint8_t error_count = 0;
|
static uint8_t error_count = 0;
|
||||||
uint8_t is_master = 0 ;
|
|
||||||
|
|
||||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
@ -111,8 +110,6 @@ void matrix_init(void)
|
|||||||
matrix_debouncing[i] = 0;
|
matrix_debouncing[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
is_master = has_usb();
|
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +197,7 @@ int serial_transaction(int master_changed) {
|
|||||||
|
|
||||||
uint8_t matrix_scan(void)
|
uint8_t matrix_scan(void)
|
||||||
{
|
{
|
||||||
if (is_master) {
|
if (is_helix_master()) {
|
||||||
matrix_master_scan();
|
matrix_master_scan();
|
||||||
}else{
|
}else{
|
||||||
matrix_slave_scan();
|
matrix_slave_scan();
|
||||||
|
7
keyboards/helix/rev2/post_config.h
Normal file
7
keyboards/helix/rev2/post_config.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(SPLIT_KEYBOARD) /* if use split_common */
|
||||||
|
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_SPLIT)
|
||||||
|
# define RGBLIGHT_SPLIT /* helix hardware need this */
|
||||||
|
# endif
|
||||||
|
#endif
|
@ -1,5 +1,9 @@
|
|||||||
#include "helix.h"
|
#include "helix.h"
|
||||||
|
|
||||||
|
// Each keymap.c should use is_keyboard_master() instead of 'is_master'.
|
||||||
|
// But keep 'is_master' for a while for backwards compatibility
|
||||||
|
// for the old keymap.c.
|
||||||
|
uint8_t is_master = false;
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
#include "ssd1306.h"
|
#include "ssd1306.h"
|
||||||
@ -15,7 +19,23 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
// Each keymap.c should use is_keyboard_master() instead of is_master.
|
||||||
|
// But keep is_master for a while for backwards compatibility
|
||||||
|
// for the old keymap.c.
|
||||||
|
is_master = is_keyboard_master();
|
||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void keyboard_post_init_kb(void) {
|
||||||
|
#if defined(DEBUG_MATRIX_SCAN_RATE)
|
||||||
|
debug_enable = true;
|
||||||
|
#endif
|
||||||
|
keyboard_post_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(SPLIT_KEYBOARD) && defined(SSD1306OLED)
|
||||||
|
void matrix_slave_scan_user(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -4,18 +4,16 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifndef SPLIT_KEYBOARD
|
||||||
//rgb led driver
|
extern bool is_helix_master(void);
|
||||||
#include "ws2812.h"
|
#define is_keyboard_master() is_helix_master()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_I2C
|
// Each keymap.c should use is_keyboard_master() instead of 'is_master', 'has_usb()'.
|
||||||
#include <stddef.h>
|
// But keep 'is_master' for a while for backwards compatibility
|
||||||
#ifdef __AVR__
|
// for the old keymap.c.
|
||||||
#include <avr/io.h>
|
extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to use 'is_keyboard_master ()' instead.
|
||||||
#include <avr/interrupt.h>
|
#define has_usb() is_keyboard_master()
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||||
#ifndef FLIP_HALF
|
#ifndef FLIP_HALF
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk
|
KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk
|
||||||
|
|
||||||
SRC += local_drivers/i2c.c
|
|
||||||
SRC += local_drivers/serial.c
|
|
||||||
SRC += local_drivers/ssd1306.c
|
|
||||||
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
|
||||||
|
|
||||||
# A workaround until #7089 is merged.
|
|
||||||
# serial.c must not be compiled with the -lto option.
|
|
||||||
# The current LIB_SRC has a side effect with the -fno-lto option, so use it.
|
|
||||||
LIB_SRC += local_drivers/serial.c
|
|
||||||
|
|
||||||
CUSTOM_MATRIX = yes
|
|
||||||
|
|
||||||
SRC += rev2/matrix.c
|
|
||||||
SRC += rev2/split_util.c
|
|
||||||
SRC += rev2/split_scomm.c
|
|
||||||
|
|
||||||
# Helix Spacific Build Options default values
|
# Helix Spacific Build Options default values
|
||||||
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||||
OLED_ENABLE = no # OLED_ENABLE
|
OLED_ENABLE = no # OLED_ENABLE
|
||||||
|
1
keyboards/helix/rev2/sc/back/rules.mk
Normal file
1
keyboards/helix/rev2/sc/back/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
LED_BACK_ENABLE = yes
|
1
keyboards/helix/rev2/sc/oled/rules.mk
Normal file
1
keyboards/helix/rev2/sc/oled/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
OLED_ENABLE = yes
|
2
keyboards/helix/rev2/sc/oledback/rules.mk
Normal file
2
keyboards/helix/rev2/sc/oledback/rules.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
OLED_ENABLE = yes
|
||||||
|
LED_BACK_ENABLE = yes
|
2
keyboards/helix/rev2/sc/oledunder/rules.mk
Normal file
2
keyboards/helix/rev2/sc/oledunder/rules.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
OLED_ENABLE = yes
|
||||||
|
LED_UNDERGLOW_ENABLE = yes
|
1
keyboards/helix/rev2/sc/rules.mk
Normal file
1
keyboards/helix/rev2/sc/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
SPLIT_KEYBOARD = yes
|
1
keyboards/helix/rev2/sc/under/rules.mk
Normal file
1
keyboards/helix/rev2/sc/under/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
LED_UNDERGLOW_ENABLE = yes
|
@ -45,7 +45,7 @@ bool waitForUsb(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__attribute__((weak)) bool is_keyboard_left(void) {
|
bool is_keyboard_left(void) {
|
||||||
#if defined(SPLIT_HAND_PIN)
|
#if defined(SPLIT_HAND_PIN)
|
||||||
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
|
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
|
||||||
setPinInput(SPLIT_HAND_PIN);
|
setPinInput(SPLIT_HAND_PIN);
|
||||||
@ -53,13 +53,13 @@ __attribute__((weak)) bool is_keyboard_left(void) {
|
|||||||
#elif defined(EE_HANDS)
|
#elif defined(EE_HANDS)
|
||||||
return eeconfig_read_handedness();
|
return eeconfig_read_handedness();
|
||||||
#elif defined(MASTER_RIGHT)
|
#elif defined(MASTER_RIGHT)
|
||||||
return !has_usb();
|
return !is_helix_master();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return has_usb();
|
return is_helix_master();
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak)) bool has_usb(void) {
|
bool is_helix_master(void) {
|
||||||
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
|
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
|
||||||
|
|
||||||
// only check once, as this is called often
|
// only check once, as this is called often
|
||||||
@ -100,11 +100,10 @@ static void keyboard_slave_setup(void) {
|
|||||||
void split_keyboard_setup(void) {
|
void split_keyboard_setup(void) {
|
||||||
isLeftHand = is_keyboard_left();
|
isLeftHand = is_keyboard_left();
|
||||||
|
|
||||||
if (has_usb()) {
|
if (is_helix_master()) {
|
||||||
keyboard_master_setup();
|
keyboard_master_setup();
|
||||||
} else {
|
} else {
|
||||||
keyboard_slave_setup();
|
keyboard_slave_setup();
|
||||||
}
|
}
|
||||||
sei();
|
sei();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ extern volatile bool isLeftHand;
|
|||||||
void matrix_slave_scan(void);
|
void matrix_slave_scan(void);
|
||||||
|
|
||||||
void split_keyboard_setup(void);
|
void split_keyboard_setup(void);
|
||||||
bool has_usb(void);
|
bool is_helix_master(void);
|
||||||
|
|
||||||
void matrix_master_OLED_init (void);
|
void matrix_master_OLED_init (void);
|
||||||
|
|
||||||
|
17
keyboards/hhkb/keymaps/brett/config.h
Normal file
17
keyboards/hhkb/keymaps/brett/config.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Define mousekey settings
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#define MOUSEKEY_INTERVAL 20
|
||||||
|
#define MOUSEKEY_MAX_SPEED 2
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 5
|
||||||
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
|
|
||||||
|
#define LSPO_KEY KC_9
|
||||||
|
#define RSPC_KEY KC_0
|
||||||
|
#define LSPO_MOD KC_LSHIFT
|
||||||
|
#define RSPC_MOD KC_RSHIFT
|
||||||
|
|
||||||
|
// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when
|
||||||
|
// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
119
keyboards/hhkb/keymaps/brett/keymap.c
Normal file
119
keyboards/hhkb/keymaps/brett/keymap.c
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
/* -*- eval: (turn-on-orgtbl); -*-
|
||||||
|
* Brettm12345 HHKB Layout
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "brett.h"
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
BASE = 0,
|
||||||
|
HHKB = 1,
|
||||||
|
PROG = 2,
|
||||||
|
MOUSE = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tap for tab hold for MOUSE
|
||||||
|
#define TAB_MOUSE LT(MOUSE, KC_TAB)
|
||||||
|
|
||||||
|
// Tap for space hold for PROG
|
||||||
|
#define SPACE_PROG LT(PROG, KC_SPC)
|
||||||
|
|
||||||
|
// Tap for ESC hold for CTRL
|
||||||
|
#define CTL_ESC CTL_T(KC_ESC)
|
||||||
|
|
||||||
|
// Tab for ; hold for PROG
|
||||||
|
#define PROG_SCLN LT(PROG, KC_SCLN)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* BASE Level: Default Layer
|
||||||
|
|---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
|
||||||
|
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||||
|
|---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backspace | * |
|
||||||
|
|---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
|
||||||
|
| Control | A | S | D | F | G | H | J | K | L | ; | ' | Return | ****** | * |
|
||||||
|
|---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
|
||||||
|
| LShift | Z | X | C | V | B | N | M | , | . | / | RShift | HHKB | ****** | * |
|
||||||
|
|---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
|
||||||
|
|
||||||
|
|------+------+----------------------------+------+------|
|
||||||
|
| LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt |
|
||||||
|
|------+------+----------------------------+------+------|
|
||||||
|
*/
|
||||||
|
|
||||||
|
[BASE] = LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
|
||||||
|
TAB_MOUSE, 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,
|
||||||
|
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, PROG_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(HHKB),
|
||||||
|
KC_LALT, KC_LGUI, SPACE_PROG, KC_RGUI, KC_RALT),
|
||||||
|
|
||||||
|
/* HHKB Level: Function Layer
|
||||||
|
|---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
|
||||||
|
| Flash | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||||
|
|---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
|
||||||
|
| Caps | Calc | Mail | Media | Browser | My PC | Browser | u | i | o | Print | [ | ] | Backsp | * |
|
||||||
|
| | | | Player | Refresh | | Favorites | | | | Screen | | | | |
|
||||||
|
|---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
|
||||||
|
| Control | Prev | Next | Find | f | g | Browser | Browser | Browser | Browser | ; | ' | Exec | ****** | * |
|
||||||
|
| | | | | | | Back | Home | Search | Forward | | | | | |
|
||||||
|
|---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
|
||||||
|
| LShift | Vol+ | Vol- | Mute | Select | b | n | m | , | Again | Browser Search | RShift | HHKB | ****** | * |
|
||||||
|
|---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
|
||||||
|
|
||||||
|
|------+------+----------------------+------+------|
|
||||||
|
| Menu | LGUI | ******* Play ******* | RGUI | Menu |
|
||||||
|
|------+------+----------------------+------+------|
|
||||||
|
*/
|
||||||
|
[HHKB] = LAYOUT(
|
||||||
|
FLASH, 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_INS, KC_DEL,
|
||||||
|
KC_CAPS, KC_CALC, KC_MAIL, KC_MSEL, KC_WREF, KC_MYCM, KC_WFAV, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_BSPC,
|
||||||
|
KC_TRNS, KC_MPRV, KC_MNXT, KC_FIND, KC_TRNS, KC_TRNS, KC_WBAK, KC_WHOM, KC_WSCH, KC_WFWD, KC_TRNS, KC_TRNS, KC_EXEC,
|
||||||
|
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_SLCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AGIN, KC_WSCH, KC_TRNS, KC_TRNS,
|
||||||
|
KC_MENU, KC_TRNS, KC_MPLY, KC_TRNS, KC_MENU),
|
||||||
|
|
||||||
|
|
||||||
|
/* Programming Level: Symbols Layer
|
||||||
|
|--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
|
||||||
|
| Esc | TTY 1 | TTY 2 | TTY 3 | TTY 4 | TTY 5 | TTY 6 | TTY 7 | TTY 8 | TTY 9 | TTY 10 | TTY 11 | TTY 12 | \ | ` |
|
||||||
|
|--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
|
||||||
|
| Tab/Mouse | => | @ | >>= | =<< | ‖ | <> | <|> | <*> | <@> | |> | <$ | $> | Backsp | * |
|
||||||
|
|--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
|
||||||
|
| Toggle Mouse | -> | * | <$> | <#> | && | Left | Down | Up | Right | :: | ` | Return | ****** | * |
|
||||||
|
|--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
|
||||||
|
| LShift | z | x | c | v | b | n | m | <- | -> | <> | Shift | HHKB | ****** | * |
|
||||||
|
|--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
|
||||||
|
|
||||||
|
|------+------+----------------------------+------+------|
|
||||||
|
| LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt |
|
||||||
|
|------+------+----------------------------+------+------|
|
||||||
|
*/
|
||||||
|
[PROG] = LAYOUT(
|
||||||
|
KC_GESC, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), LCA(KC_F10), LCA(KC_F11), LCA(KC_F12), KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, FAT_ARROW, KC_AT, BIND, BIND_FLIPPED, OR, CONCAT, ALT, APPLY, FLAP, PIPE, VOID_LEFT, VOID_RIGHT, KC_TRNS,
|
||||||
|
TG(MOUSE), SKINNY_ARROW, KC_ASTR, MAP, MAP_FLIPPED, AND, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, DOUBLE_COLON, KC_GRV, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, REVERSE_ARROW, SKINNY_ARROW, CONCAT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
|
||||||
|
/* Mouse Level: Mouse Layer
|
||||||
|
|--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
|
||||||
|
| Esc | Speed 1 | Speed 2 | Speed 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||||
|
|--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
|
||||||
|
| Mouse(Tab) | Q | Up | Button3 | Button4 | Button5 | Y | U | Button3 | Button4 | Button5 | [ | ] | Backsp | * |
|
||||||
|
|--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
|
||||||
|
| Control(Esc) | Left | Down | Right | Button1 | Button2 | SLeft | SDown | SUp | SRight | Button1 | Button2 | Control(Return) | ****** | * |
|
||||||
|
|--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
|
||||||
|
| LShift(() | Z | X | C | V | B | N | M | Button5 | Button4 | Button3 | RShift()) | HHKB | ****** | * |
|
||||||
|
|--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
|
||||||
|
|
||||||
|
|---------+---------+----------------------------+---------+---------|
|
||||||
|
| LAlt([) | LGUI({) | ******* Space/Prog ******* | RGUI(}) | RAlt(]) |
|
||||||
|
|---------+---------+----------------------------+---------+---------|
|
||||||
|
*/
|
||||||
|
[MOUSE] = LAYOUT(
|
||||||
|
KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_MS_U, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
TG(MOUSE), KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN1, KC_BTN2, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
13
keyboards/hhkb/keymaps/brett/readme.md
Normal file
13
keyboards/hhkb/keymaps/brett/readme.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Generated Keymap Layout
|
||||||
|
|
||||||
|
This layout was generated by the QMK API. You can find the JSON data used to
|
||||||
|
generate this keymap in the file layers.json.
|
||||||
|
|
||||||
|
To make use of this file you will need follow the following steps:
|
||||||
|
|
||||||
|
* Download or Clone QMK Firmware: <https://github.com/qmk/qmk_firmware/>
|
||||||
|
* Extract QMK Firmware to a location on your hard drive
|
||||||
|
* Copy this folder into %s
|
||||||
|
* You are now ready to compile or use your keymap with the source
|
||||||
|
|
||||||
|
More information can be found in the QMK docs: <https://docs.qmk.fm>
|
4
keyboards/hhkb/keymaps/brett/rules.mk
Normal file
4
keyboards/hhkb/keymaps/brett/rules.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
LEADER_ENABLE = no
|
||||||
|
UNICODE_ENABLE = no
|
@ -38,8 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
/* disable these deprecated features by default */
|
/* disable these deprecated features by default */
|
||||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
#define NO_ACTION_MACRO
|
#define NO_ACTION_MACRO
|
||||||
|
@ -42,7 +42,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8
|
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8
|
||||||
|
|
||||||
#define NO_UART 1
|
|
||||||
|
|
||||||
#define NO_ACTION_MACRO
|
#define NO_ACTION_MACRO
|
||||||
#define NO_ACTION_FUNCTION
|
#define NO_ACTION_FUNCTION
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user