Compare commits
16 Commits
refactor_p
...
0.8.13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53ac4d214f | ||
|
|
bff56aa46c | ||
|
|
ce30cd2a01 | ||
|
|
552f8d81b9 | ||
|
|
abd36de5ad | ||
|
|
b72a1aa3fe | ||
|
|
78069d4826 | ||
|
|
c543ccf07c | ||
|
|
88356c85c4 | ||
|
|
3dc061ac78 | ||
|
|
95124bf933 | ||
|
|
e7fb873ee2 | ||
|
|
629950e51b | ||
|
|
1ec8a7205f | ||
|
|
ce604e1629 | ||
|
|
c9e3fa6f70 |
@@ -1,6 +1,14 @@
|
||||
# ISP Flashing Guide
|
||||
|
||||
If you're having trouble flashing/erasing your board, and running into cryptic error messages like any of the following:
|
||||
ISP flashing (also known as ICSP flashing) is the process of programming a microcontroller directly. This allows you to replace the bootloader, or change the "fuses" on the controller, which control a number of hardware- and software-related functions, such as the speed of the controller, how it boots, and other options.
|
||||
|
||||
The main use of ISP flashing for QMK is flashing or replacing the bootloader on your AVR-based controller (Pro Micros, or V-USB chips).
|
||||
|
||||
?> This is only for programming AVR based boards, such as the Pro Micro or other ATmega controllers. It is not for Arm controllers, such as the Proton C.
|
||||
|
||||
## Dealing with Corrupted Bootloaders
|
||||
|
||||
If you're having trouble flashing/erasing your board, and running into cryptic error messages like any of the following for a DFU based controller:
|
||||
|
||||
libusb: warning [darwin_transfer_status] transfer error: timed out
|
||||
dfu.c:844: -ETIMEDOUT: Transfer timed out, NAK 0xffffffc4 (-60)
|
||||
@@ -19,16 +27,60 @@ If you're having trouble flashing/erasing your board, and running into cryptic e
|
||||
Memory write error, use debug for more info.
|
||||
commands.c:360: Error writing memory data. (err -4)
|
||||
|
||||
You're likely going to need to ISP flash your board/device to get it working again. Luckily, this process is pretty straight-forward, provided you have any extra programmable keyboard, Pro Micro, or Teensy 2.0/Teensy 2.0++. There are also dedicated ISP flashers available for this, but most cost >$15, and it's assumed that if you are googling this error, this is the first you've heard about ISP flashing, and don't have one readily available (whereas you might have some other AVR board). __We'll be using a Teensy 2.0 or Pro Micro with Windows 10 in this guide__ - if you are comfortable doing this on another system, please consider editing this guide and contributing those instructions!
|
||||
Or, if you see this sort of message for a Pro Micro based controller:
|
||||
|
||||
avrdude: butterfly_recv(): programmer is not responding
|
||||
avrdude: butterfly_recv(): programmer is not responding
|
||||
avrdude: verification error, first mismatch at byte 0x002a
|
||||
0x2b != 0x75
|
||||
avrdude: verification error; content mismatch
|
||||
avrdude: verification error; content mismatch
|
||||
|
||||
|
||||
You're likely going to need to ISP flash your board/device to get it working again.
|
||||
|
||||
## Hardware Needed
|
||||
|
||||
You'll need one of the following to actually perform the ISP flashing (followed by the protocol they use):
|
||||
|
||||
* [SparkFun PocketAVR](https://www.sparkfun.com/products/9825) - (USB Tiny)
|
||||
* [USBtinyISP AVR Programmer Kit](https://www.adafruit.com/product/46) - (USB Tiny)
|
||||
* [Teensy 2.0](https://www.pjrc.com/store/teensy.html) - (avrisp)
|
||||
* [Pro Micro](https://www.sparkfun.com/products/12640) - (avrisp)
|
||||
* [Bus Pirate](https://www.adafruit.com/product/237) - (buspirate)
|
||||
|
||||
There are other devices that can be used to ISP flash, but these are the main ones. Also, all product links are to the official versions. You can source them elsewhere.
|
||||
|
||||
You'll also need something to wire your "ISP Programmer" to the device that you're programming. Some PCBs may have ISP headers that you can use directly, but this often isn't the case, so you'll likely need to solder to the controller itself or to different switches or other components.
|
||||
|
||||
### The ISP Firmware
|
||||
|
||||
The Teensy and Pro Micro controllers will need you to flash the ISP firmware to the controllers before you can use them as an ISP programmer. The rest of the hardware should come preprogrammed. So, for these controllers, download the correct hex file, and flash it first.
|
||||
|
||||
* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`)
|
||||
* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`10/B6`)
|
||||
|
||||
Once you've flashed your controller, you won't need this hex file anymore.
|
||||
|
||||
## Software Needed
|
||||
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (if using a Teensy)
|
||||
* QMK Toolbox (flash as usual - be sure to select the correct MCU) or `avrdude` via [WinAVR](http://www.ladyada.net/learn/avr/setup-win.html) (for Teensy & Pro Micro)
|
||||
The QMK Toolbox can be used for most (all) of this.
|
||||
|
||||
However, you can grab the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to flash your Teensy 2.0 board, if you are using that. Or you can use `avrdude` (installed as part of `qmk_install.sh`), or [AVRDUDESS](https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/) (for Windows) to flash the Pro Micro, and the ISP flashing.
|
||||
|
||||
|
||||
## Wiring
|
||||
|
||||
This is pretty straight-forward - we'll be connecting like-things to like-things in the following manner:
|
||||
This is pretty straight-forward - we'll be connecting like-things to like-things in the following manner.
|
||||
|
||||
### SparkFun Pocket AVR
|
||||
|
||||
PocketAVR RST <-> Keyboard RESET
|
||||
PocketAVR SCLK <-> Keyboard B1 (SCLK)
|
||||
PocketAVR MOSI <-> Keyboard B2 (MOSI)
|
||||
PocketAVR MISO <-> Keyboard B3 (MISO)
|
||||
PocketAVR VCC <-> Keyboard VCC
|
||||
PocketAVR GND <-> Keyboard GND
|
||||
|
||||
### Teensy 2.0
|
||||
|
||||
@@ -39,6 +91,8 @@ This is pretty straight-forward - we'll be connecting like-things to like-things
|
||||
Teensy VCC <-> Keyboard VCC
|
||||
Teensy GND <-> Keyboard GND
|
||||
|
||||
!> Note that the B0 pin on the Teensy is wired to the RESET/RST pin on the keyboard's controller. ***DO NOT*** wire the RESET pin on the Teensy to the RESET on the keyboard.
|
||||
|
||||
### Pro Micro
|
||||
|
||||
Pro Micro 10 (B6) <-> Keyboard RESET
|
||||
@@ -48,45 +102,61 @@ This is pretty straight-forward - we'll be connecting like-things to like-things
|
||||
Pro Micro VCC <-> Keyboard VCC
|
||||
Pro Micro GND <-> Keyboard GND
|
||||
|
||||
## The ISP Firmware (now pre-compiled)
|
||||
!> Note that the 10/B6 pin on the Pro Micro is wired to the RESET/RST pin on the keyboard's controller. ***DO NOT*** wire the RESET pin on the Pro Micro to the RESET on the keyboard.
|
||||
|
||||
The only difference between the .hex files below is which pin is connected to RESET. You can use them on other boards as well, as long as you're aware of the pins being used. If for some reason neither of these pins are available, [create an issue](https://github.com/qmk/qmk_firmware/issues/new), and we can generate one for you!
|
||||
|
||||
* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`)
|
||||
* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`B6/10`)
|
||||
## Flashing Your Keyboard
|
||||
|
||||
**Flash your Teenys/Pro Micro with one of these and continue - you won't need the file after flashing your ISP device.**
|
||||
After you have your ISP programmer set up, and wired to your keyboard, it's time to flash your keyboard.
|
||||
|
||||
## Just the Bootloader File
|
||||
### The Bootloader File
|
||||
|
||||
If you just want to get things back to normal, you can flash only a bootloader from [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util), and use your normal process to flash the firmware afterwards. Be sure to flash the correct bootloader for your chip:
|
||||
The simplest and quickest way to get things back to normal is to flash only a bootloader to the keyboard. Once this is done, you can connect the keyboard normally and flash the keyboard like you normally would.
|
||||
|
||||
You can find the stock bootloaders in the [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util). Be sure to flash the correct bootloader for your chip:
|
||||
|
||||
* [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2
|
||||
* [`Pro Micro`](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex) - The default bootloader for Pro Micro controllers
|
||||
* [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1
|
||||
* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40
|
||||
* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40, and other V-USB/ps2avrGB keyboards
|
||||
|
||||
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board.
|
||||
|
||||
### Advanced/Production Techniques
|
||||
### Production Techniques
|
||||
|
||||
If you'd like to flash both the bootloader **and** the regular firmware at the same time, you need to combine the files.
|
||||
If you'd like to flash both the bootloader **and** the regular firmware at the same time, there are two options to do so. Manually, or with the `:production` target when compiling.
|
||||
|
||||
To do this manually:
|
||||
|
||||
1. Open the original firmware .hex file in a text editor
|
||||
2. Remove the last line (which should be `:00000001FF` - this is an EOF message)
|
||||
3. Copy the entire bootloader's contents onto a new line (with no empty lines between) and paste it at the end of the original file
|
||||
4. Save it as a new file by naming it `<keyboard>_<keymap>_production.hex`
|
||||
|
||||
It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to use ISP again to write new firmware to your keyboard.
|
||||
?> It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to use ISP again to write new firmware to your keyboard.
|
||||
|
||||
To do this the easy way, you can flash the board using the `:production` target when compiling. This compiles the firmware, then compiles the QMK DFU bootloader, and then creates a combined image. Once this is done, you'll see three files:
|
||||
* `<keyboard>_<keymap>.hex`
|
||||
* `<keyboard>_<keymap>_bootloader.hex`
|
||||
* `<keyboard>_<keymap>_production.hex`
|
||||
|
||||
The QMK DFU bootloader has only really been tested on `atmega32u4` controllers (such as the AVR based Planck boards, and the Pro Micro), and hasn't been tested on other controllers. However, it will definitely not work on V-USB controllers, such as the `atmega32a` or `atmega328p`.
|
||||
|
||||
You can flash either the bootloader or the production firmware file. The production firmware file will take a lot longer to flash, since it's flashing a lot more data.
|
||||
|
||||
?> Note: You should stay with the same bootloader. If you're using DFU already, switching to QMK DFU is fine. But flashing QMK DFU onto a Pro Micro, for instance, has additional steps needed.
|
||||
|
||||
## Flashing Your Bootloader/Production File
|
||||
|
||||
Make sure your keyboard is unplugged from any device, and plug in your Teensy.
|
||||
Make sure your keyboard is unplugged from any device, and plug in your ISP Programmer.
|
||||
|
||||
If you want to change bootloader types, You'll need to use the command line.
|
||||
|
||||
### QMK Toolbox
|
||||
|
||||
1. `AVRISP device connected` will show up in yellow
|
||||
1. `AVRISP device connected` or `USB Tiny device connected` will show up in yellow
|
||||
2. Select the correct bootloader/production .hex file with the `Open` dialog (spaces can't be in the path)
|
||||
3. Be sure the correct `Microcontroller` option is selected
|
||||
3. Be sure the correct `Microcontroller` option for the keyboard you're flashing (not the ISP programmer) is selected
|
||||
4. Hit `Flash`
|
||||
5. Wait, as nothing will output for a while, especially with production files
|
||||
|
||||
@@ -94,7 +164,7 @@ If the verification and fuse checks are ok, you're done! Your board may restart
|
||||
|
||||
### Command Line
|
||||
|
||||
Open `cmd` and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with:
|
||||
Open a terminal (`cmd` on Windows, for instance) and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4
|
||||
|
||||
@@ -129,4 +199,47 @@ You should see a couple of progress bars, then you should see:
|
||||
|
||||
Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works.
|
||||
|
||||
If you're using a SparkFun PocketAVR Programmer, or another USB Tiny based ISP programmer, you will want to use something like this:
|
||||
|
||||
avrdude -c usbtiny -P usb -p atmega32u4
|
||||
|
||||
#### Advanced: Changing Fuses
|
||||
|
||||
If you're switching bootloaders, such as flashing QMK DFU on a Pro Micro, you will need to change the fuses, in additional to flashing the bootloader hex file. This is because `caterina` (the Pro Micro bootloader) and `dfu` handle the startup routines differently, and that behavior is controlled by the fuses.
|
||||
|
||||
!> This is one area that it is very important to be careful, as changing fuses is one of the ways that you can permanently brick your controller.
|
||||
|
||||
For this, we are assuming the 5V 16MHz versions of the `atmega32u4` (such as the 5V Pro Micro).
|
||||
|
||||
For DFU on the `atmega32u4`, these are the fuse settings that you want:
|
||||
|
||||
| Fuse | Setting |
|
||||
|----------|------------------|
|
||||
| Low | `0x5E` |
|
||||
| High | `0xD9` or `0x99` |
|
||||
| Extended | `0xC3` |
|
||||
|
||||
The High fuse can be 0xD9 or 0x99. The difference is that 0xD9 disables JTAG, which QMK Firmware disables via software as well, while 0x99 doesn't disable JTAG.
|
||||
|
||||
To set this add `-U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m` to your command. So the final command should look something like:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m
|
||||
|
||||
For Caterina on the `atmega32u4`, these are the fuse settings that you want:
|
||||
|
||||
| Fuse | Setting|
|
||||
|----------|--------|
|
||||
| Low | `0xFF` |
|
||||
| High | `0xD9` |
|
||||
| Extended | `0xC3` |
|
||||
|
||||
To set this add `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xC3:m` to your command. So the final command should look something like:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xC3:m
|
||||
|
||||
|
||||
If you are using a different controller or want different configuration, you can use [this AVR Fuse Calculator](http://www.engbedded.com/fusecalc/) to find a better value for you.
|
||||
|
||||
## Help
|
||||
|
||||
If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -31,4 +21,3 @@ static const unsigned char font[] PROGMEM = {
|
||||
0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta
|
||||
0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Helidox 8x6 font with QMK Firmware Logo
|
||||
// Online editor: http://teripom.x0.com/
|
||||
|
||||
@@ -22,15 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if defined(__AVR__)
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else // defined(ESP8266)
|
||||
# define PROGMEM
|
||||
#include "progmem.h"
|
||||
#ifndef __AVR__
|
||||
# define memcpy_P(des, src, len) memcpy(des, src, len)
|
||||
#endif // defined(__AVR__)
|
||||
#endif
|
||||
|
||||
// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
|
||||
// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xA22A
|
||||
#define PRODUCT_ID 0x6600
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER AT-AT
|
||||
#define PRODUCT 660M
|
||||
#define DESCRIPTION 660M Keyboard
|
||||
|
||||
@@ -36,13 +36,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic
|
||||
#define MATRIX_COLS 18 // ColA - ColR in the schematic
|
||||
#define MATRIX_ROWS 18 // ColA - ColR in the schematic
|
||||
#define MATRIX_COLS 8 // Row0 - Row7 in the schematic
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*/
|
||||
#define UNUSED_PINS { B0, C4, D3 }
|
||||
#define UNUSED_PINS { C0, C1, C2, C3, C4, D2, D7 }
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
@@ -1,63 +1,24 @@
|
||||
#include "frosty_flake.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
void keyboard_pre_init_kb() {
|
||||
setPinOutput(B7); // num lock
|
||||
writePinHigh(B7);
|
||||
setPinOutput(C5); // caps lock
|
||||
writePinHigh(C7);
|
||||
setPinOutput(C6); // scroll lock
|
||||
writePinHigh(C6);
|
||||
|
||||
matrix_init_user();
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
bool led_update_kb(led_t usb_led) {
|
||||
// user requests no further processing
|
||||
if (!led_update_user(usb_led))
|
||||
return true;
|
||||
|
||||
matrix_scan_user();
|
||||
writePin(C5, !usb_led.caps_lock);
|
||||
writePin(B7, !usb_led.num_lock);
|
||||
writePin(C6, !usb_led.scroll_lock);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
DDRB |= (1<<7);
|
||||
DDRC |= (1<<5) | (1<<6);
|
||||
|
||||
print_dec(usb_led);
|
||||
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||
PORTC &= ~(1<<5);
|
||||
else
|
||||
PORTC |= (1<<5);
|
||||
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||
PORTB &= ~(1<<7);
|
||||
else
|
||||
PORTB |= (1<<7);
|
||||
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||
PORTC &= ~(1<<6);
|
||||
else
|
||||
PORTC |= (1<<6);
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
}
|
||||
@@ -34,16 +34,25 @@
|
||||
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
|
||||
) \
|
||||
{ \
|
||||
/* Columns and rows need to be swapped in the below definition */ \
|
||||
/* A B C D E F G H I J K L M N O P Q R */ \
|
||||
/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \
|
||||
/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \
|
||||
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \
|
||||
/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \
|
||||
/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
|
||||
/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \
|
||||
/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \
|
||||
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
|
||||
/* 0 1 2 3 4 5 6 7 */ \
|
||||
/* A */ { KC_NO, KA1, KC_NO, KC_NO, KA4, KA5, KC_NO, KA7, }, \
|
||||
/* B */ { KB0, KB1, KB2, KB3, KB4, KC_NO, KB6, KB7, }, \
|
||||
/* C */ { KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC5, KC6, KC7, }, \
|
||||
/* D */ { KD0, KD1, KD2, KD3, KD4, KD5, KC_NO, KD7, }, \
|
||||
/* E */ { KC_NO, KE1, KE2, KE3, KE4, KE5, KE6, KE7, }, \
|
||||
/* F */ { KF0, KF1, KF2, KF3, KF4, KF5, KF6, KF7, }, \
|
||||
/* G */ { KG0, KG1, KG2, KG3, KG4, KG5, KG6, KG7, }, \
|
||||
/* H */ { KC_NO, KH1, KH2, KH3, KH4, KH5, KH6, KH7, }, \
|
||||
/* I */ { KC_NO, KI1, KI2, KI3, KI4, KI5, KI6, KI7, }, \
|
||||
/* J */ { KC_NO, KJ1, KJ2, KJ3, KJ4, KJ5, KJ6, KJ7, }, \
|
||||
/* K */ { KK0, KK1, KK2, KK3, KK4, KK5, KK6, KC_NO, }, \
|
||||
/* L */ { KL0, KL1, KL2, KL3, KL4, KL5, KL6, KC_NO, }, \
|
||||
/* M */ { KC_NO, KC_NO, KC_NO, KM3, KC_NO, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* N */ { KC_NO, KC_NO, KN2, KN3, KC_NO, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* O */ { KO0, KC_NO, KC_NO, KO3, KO4, KO5, KO6, KO7, }, \
|
||||
/* P */ { KC_NO, KC_NO, KP2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* Q */ { KQ0, KQ1, KQ2, KQ3, KQ4, KQ5, KQ6, KQ7, }, \
|
||||
/* R */ { KR0, KC_NO, KR2, KR3, KR4, KR5, KR6, KR7, }, \
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -74,16 +83,25 @@
|
||||
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||
) \
|
||||
{ \
|
||||
/* Columns and rows need to be swapped in the below definition */ \
|
||||
/* A B C D E F G H I J K L M N O P Q R */ \
|
||||
/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KC_NO, KR0 }, \
|
||||
/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KC_NO, KC_NO, KC_NO, KN2, KC_NO, KP2, KC_NO, KR2 }, \
|
||||
/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KC_NO, KC_NO, KM3, KN3, KC_NO, KC_NO, KC_NO, KR3 }, \
|
||||
/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
|
||||
/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KR5 }, \
|
||||
/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KC_NO, KC_NO, KC_NO, KO6, KC_NO, KC_NO, KR6 }, \
|
||||
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
|
||||
/* 0 1 2 3 4 5 6 7 */ \
|
||||
/* A */ { KC_NO, KA1, KC_NO, KC_NO, KA4, KA5, KC_NO, KA7, }, \
|
||||
/* B */ { KB0, KB1, KB2, KB3, KB4, KC_NO, KB6, KB7, }, \
|
||||
/* C */ { KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC5, KC6, KC7, }, \
|
||||
/* D */ { KD0, KD1, KD2, KD3, KD4, KD5, KC_NO, KD7, }, \
|
||||
/* E */ { KC_NO, KE1, KE2, KE3, KE4, KE5, KE6, KE7, }, \
|
||||
/* F */ { KF0, KF1, KF2, KF3, KF4, KF5, KF6, KF7, }, \
|
||||
/* G */ { KG0, KG1, KG2, KG3, KG4, KG5, KG6, KG7, }, \
|
||||
/* H */ { KC_NO, KH1, KH2, KH3, KH4, KH5, KH6, KH7, }, \
|
||||
/* I */ { KC_NO, KI1, KI2, KI3, KI4, KI5, KI6, KI7, }, \
|
||||
/* J */ { KC_NO, KJ1, KJ2, KJ3, KJ4, KJ5, KJ6, KJ7, }, \
|
||||
/* K */ { KK0, KC_NO, KC_NO, KC_NO, KK4, KC_NO, KK6, KC_NO, }, \
|
||||
/* L */ { KL0, KC_NO, KC_NO, KC_NO, KL4, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* M */ { KC_NO, KC_NO, KC_NO, KM3, KC_NO, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* N */ { KC_NO, KC_NO, KN2, KN3, KC_NO, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* O */ { KO0, KC_NO, KC_NO, KC_NO, KO4, KC_NO, KO6, KO7, }, \
|
||||
/* P */ { KC_NO, KC_NO, KP2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, \
|
||||
/* Q */ { KC_NO, KC_NO, KC_NO, KC_NO, KQ4, KC_NO, KC_NO, KQ7, }, \
|
||||
/* R */ { KR0, KC_NO, KR2, KR3, KR4, KR5, KR6, KR7, }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_tkl_ansi( \
|
||||
|
||||
@@ -15,42 +15,15 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
#endif
|
||||
static uint8_t debouncing = DEBOUNCE;
|
||||
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
static matrix_row_t scan_col(void) {
|
||||
// Each of the 8 columns is read off pins as below
|
||||
// 7 6 5 4 3 2 1 0
|
||||
// ,--,--,--,--,--,--,--,--,
|
||||
// |B0|B3|B2|B1|B6|B4|B5|C7|
|
||||
// `--`--`--`--`--`--`--`--`
|
||||
return (
|
||||
(PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) |
|
||||
(PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) |
|
||||
@@ -63,8 +36,8 @@ static matrix_row_t scan_col(void) {
|
||||
);
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col) {
|
||||
switch (col) {
|
||||
static void select_row(uint8_t row) {
|
||||
switch (row) {
|
||||
case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break;
|
||||
case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break;
|
||||
case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break;
|
||||
@@ -86,7 +59,7 @@ static void select_col(uint8_t col) {
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
void matrix_init_custom(void) {
|
||||
/* Row output pins */
|
||||
DDRD |= 0b01111011;
|
||||
/* Column input pins */
|
||||
@@ -94,62 +67,19 @@ void matrix_init(void) {
|
||||
DDRB &= ~0b01111111;
|
||||
PORTC |= 0b10000000;
|
||||
PORTB |= 0b01111111;
|
||||
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++)
|
||||
matrix[i] = matrix_debouncing[i] = 0;
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void) {
|
||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||
select_col(col);
|
||||
_delay_us(3);
|
||||
matrix_row_t col_scan = scan_col();
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||
bool curr_bit = col_scan & (1<<row);
|
||||
if (prev_bit != curr_bit) {
|
||||
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||
debouncing = DEBOUNCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing) {
|
||||
if (--debouncing)
|
||||
_delay_ms(1);
|
||||
else
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++)
|
||||
matrix[i] = matrix_debouncing[i];
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void) {
|
||||
#ifndef NO_PRINT
|
||||
print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
|
||||
// matrix is 18 uint8_t.
|
||||
// we select the row (one of 18), then read the column
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
bool has_changed = false;
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix_row_t matrix_row = matrix_get_row(row);
|
||||
xprintf("%02X: ", row);
|
||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||
bool curr_bit = matrix_row & (1<<col);
|
||||
xprintf("%c", curr_bit ? '*' : '.');
|
||||
}
|
||||
print("\n");
|
||||
matrix_row_t orig = current_matrix[row];
|
||||
select_row(row);
|
||||
_delay_us(3);
|
||||
current_matrix[row] = scan_col();
|
||||
has_changed |= (orig != current_matrix[row]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void) {
|
||||
uint8_t count = 0;
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++)
|
||||
count += bitpop32(matrix[row]);
|
||||
return count;
|
||||
return has_changed;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
CUSTOM_MATRIX = lite
|
||||
SRC += matrix.c
|
||||
|
||||
LAYOUTS = tkl_ansi
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0xA00C
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT AN-C
|
||||
#define DESCRIPTION AN-C Keyboard
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0xC024
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Chimera65
|
||||
#define DESCRIPTION Chimera65 Keyboard
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x1600
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Instant60
|
||||
#define DESCRIPTION Instant 60 Keyboard
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0x5A12
|
||||
#define PRODUCT_ID 0x5165
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER SmithAndRune
|
||||
#define PRODUCT Iron165
|
||||
#define DESCRIPTION Iron165 Keyboard
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x0248
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER QMK
|
||||
#define PRODUCT Ortho48
|
||||
#define DESCRIPTION Ortho48
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6464
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER QMK
|
||||
#define PRODUCT Ortho60
|
||||
#define DESCRIPTION Ortho60
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6464
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Ortho75
|
||||
#define DESCRIPTION Ortho75
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6464
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER QMK
|
||||
#define PRODUCT Practice 60
|
||||
#define DESCRIPTION Practice 60
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x6565
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Practice 65
|
||||
#define DESCRIPTION Practice 65
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x57F5
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Satisfaction75
|
||||
#define DESCRIPTION Satisfaction 75 Keyboard
|
||||
@@ -35,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define ENCODERS_PAD_A { B8 }
|
||||
#define ENCODERS_PAD_B { B9 }
|
||||
#define ENCODERS_PAD_A { B9 }
|
||||
#define ENCODERS_PAD_B { B8 }
|
||||
|
||||
#define ENCODER_RESOLUTION 2
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x5A65
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Savage65
|
||||
#define DESCRIPTION Savage65 Keyboard
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# rules.mk overrides to enable VIA
|
||||
|
||||
RAW_ENABLE = yes
|
||||
DYNAMIC_KEYMAP_ENABLE = yes
|
||||
VIA_ENABLE = yes
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x70F2
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT TMOv2
|
||||
#define DESCRIPTION TMOv2 Keyboard
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# rules.mk overrides to enable VIA
|
||||
|
||||
RAW_ENABLE = yes
|
||||
DYNAMIC_KEYMAP_ENABLE = yes
|
||||
VIA_ENABLE = yes
|
||||
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -145,4 +135,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
#define NUM_USB_HID_KEYCODES 255
|
||||
#define LEN_KEYCODE_STR 4
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Corne 8x6 font with QMK Firmware Logo
|
||||
// Online editor: https://helixfonteditor.netlify.com/
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Helidox 8x6 font with QMK Firmware Logo
|
||||
// Online editor: http://teripom.x0.com/
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Corne 8x6 font with QMK Firmware Logo
|
||||
// Online editor: https://helixfonteditor.netlify.com/
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// 'loveLain', 128x32px
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
@@ -4,14 +4,10 @@
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6464
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c works */
|
||||
|
||||
// Modified by Xydane
|
||||
#define MANUFACTURER "QMK"
|
||||
#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00'
|
||||
#define PRODUCT "BluePill70"
|
||||
#define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00'
|
||||
#define DESCRIPTION "QMK keyboard firmware with ChibiOS"
|
||||
|
||||
/* key matrix size */
|
||||
@@ -22,4 +18,4 @@
|
||||
|
||||
// Iso fix for Space Cadet, comment for ANSI layouts
|
||||
#define LSPO_KEY KC_8
|
||||
#define RSPC_KEY KC_9
|
||||
#define RSPC_KEY KC_9
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6464
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER QMK
|
||||
#define PRODUCT CK4x4
|
||||
#define DESCRIPTION Cannon Keys 4x4 MacroPad
|
||||
|
||||
5
keyboards/handwired/onekey/keymaps/reset/keymap.c
Normal file
5
keyboards/handwired/onekey/keymaps/reset/keymap.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT( RESET )
|
||||
};
|
||||
@@ -1,13 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Helidox 8x6 font with QMK Firmware Logo
|
||||
// Online editor: http://teripom.x0.com/
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -241,4 +231,3 @@ static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -241,4 +233,3 @@ static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
#define PRODUCT_ID 0xB919
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER "bpiphany"
|
||||
#define USBSTR_MANUFACTURER 'b', '\x00', 'p', '\x00', 'i', '\x00', 'p', '\x00', 'h', '\x00', 'a', '\x00', 'n', '\x00', 'y', '\x00'
|
||||
#define PRODUCT "HIDLiberation"
|
||||
#define USBSTR_PRODUCT 'H', '\x00', 'I', '\x00', 'D', '\x00', ' ', '\x00', 'L', '\x00', 'i', '\x00', 'b', '\x00', 'e', '\x00', 'r', '\x00', 'a', '\x00', 't', '\x00', 'i', '\x00', 'o', '\x00', 'n', '\x00'
|
||||
#define DESCRIPTION "HID Liberation powered by QMK"
|
||||
|
||||
/* key matrix size */
|
||||
|
||||
@@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6464
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER JMWS
|
||||
#define PRODUCT JM60 RGB Keyboard(QMK)
|
||||
#define DESCRIPTION QMK keyboard firmware for JM60 RGB Keyboard
|
||||
|
||||
@@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0x1c11
|
||||
#define PRODUCT_ID 0xb04d
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER Input Club
|
||||
#define PRODUCT K-Type/QMK
|
||||
/* key matrix size */
|
||||
|
||||
@@ -68,6 +68,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "iris.h"
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
#ifdef USE_I2C
|
||||
#include <stddef.h>
|
||||
#ifdef __AVR__
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -273,4 +263,3 @@ static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0x0159
|
||||
#define PRODUCT_ID 0xA71C
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER ProjectKB
|
||||
#define PRODUCT Alice
|
||||
#define DESCRIPTION ProjectKB Alice
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Helidox 8x6 font with RGBKB SOL Logo
|
||||
// Online editor: http://teripom.x0.com/
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
// This is the SOL 6x8 font
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -241,4 +231,3 @@ static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
@@ -241,4 +231,3 @@ static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xB16B
|
||||
#define PRODUCT_ID 0x00B5
|
||||
#define DEVICE_VER 0x0012
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER Ramon Imbao
|
||||
#define PRODUCT Wete
|
||||
#define DESCRIPTION Southpaw Full-sized Keyboard
|
||||
|
||||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0B91
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER Xiaomi
|
||||
#define PRODUCT MK02
|
||||
#define DESCRIPTION Yuemi Pro MK02
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -272,4 +262,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0xF0, 0xF8, 0xF8, 0xFC, 0xFE, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#include "backlight.h"
|
||||
#include "debug.h"
|
||||
|
||||
#if defined(BACKLIGHT_ENABLE) && (defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS))
|
||||
#if !defined(BACKLIGHT_PIN) && !defined(BACKLIGHT_PINS)
|
||||
# error "Backlight pin/pins not defined. Please configure."
|
||||
#endif
|
||||
|
||||
// This logic is a bit complex, we support 3 setups:
|
||||
//
|
||||
@@ -12,262 +14,223 @@
|
||||
// depends on the Audio setup (Audio wins over Backlight).
|
||||
// 3. Full software PWM, driven by the matrix scan, if both timers are used by Audio.
|
||||
|
||||
# if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK1
|
||||
# define TOIEx TOIE1
|
||||
#if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK1
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# if BACKLIGHT_PIN == B5
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# elif BACKLIGHT_PIN == B6
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# elif BACKLIGHT_PIN == B7
|
||||
# define COMxx0 COM1C0
|
||||
# define COMxx1 COM1C1
|
||||
# define OCRxx OCR1C
|
||||
# endif
|
||||
# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR3
|
||||
# define TCCRxA TCCR3A
|
||||
# define TCCRxB TCCR3B
|
||||
# define TIMERx_OVF_vect TIMER3_OVF_vect
|
||||
# define TIMSKx TIMSK3
|
||||
# define TOIEx TOIE3
|
||||
# if BACKLIGHT_PIN == B5
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# elif BACKLIGHT_PIN == B6
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# elif BACKLIGHT_PIN == B7
|
||||
# define COMxx0 COM1C0
|
||||
# define COMxx1 COM1C1
|
||||
# define OCRxx OCR1C
|
||||
# endif
|
||||
#elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR3
|
||||
# define TCCRxA TCCR3A
|
||||
# define TCCRxB TCCR3B
|
||||
# define TIMERx_OVF_vect TIMER3_OVF_vect
|
||||
# define TIMSKx TIMSK3
|
||||
# define TOIEx TOIE3
|
||||
|
||||
# if BACKLIGHT_PIN == C4
|
||||
# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error This MCU has no C4 pin!
|
||||
# else
|
||||
# define COMxx0 COM3C0
|
||||
# define COMxx1 COM3C1
|
||||
# define OCRxx OCR3C
|
||||
# endif
|
||||
# elif BACKLIGHT_PIN == C5
|
||||
# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error This MCU has no C5 pin!
|
||||
# else
|
||||
# define COMxx0 COM3B0
|
||||
# define COMxx1 COM3B1
|
||||
# define OCRxx OCR3B
|
||||
# endif
|
||||
# elif BACKLIGHT_PIN == C6
|
||||
# define COMxx0 COM3A0
|
||||
# define COMxx1 COM3A1
|
||||
# define OCRxx OCR3A
|
||||
# endif
|
||||
# elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK1
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# if BACKLIGHT_PIN == B7
|
||||
# define COMxx0 COM1C0
|
||||
# define COMxx1 COM1C1
|
||||
# define OCRxx OCR1C
|
||||
# elif BACKLIGHT_PIN == C5
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# elif BACKLIGHT_PIN == C6
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# endif
|
||||
# elif defined(__AVR_ATmega32A__) && (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# if BACKLIGHT_PIN == D4
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# elif BACKLIGHT_PIN == D5
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# endif
|
||||
# elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK1
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# if BACKLIGHT_PIN == B1
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# elif BACKLIGHT_PIN == B2
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# endif
|
||||
# else
|
||||
# if !defined(BACKLIGHT_CUSTOM_DRIVER)
|
||||
# if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO)
|
||||
// Timer 1 is not in use by Audio feature, Backlight can use it
|
||||
# pragma message "Using hardware timer 1 with software PWM"
|
||||
# define HARDWARE_PWM
|
||||
# define BACKLIGHT_PWM_TIMER
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_COMPA_vect TIMER1_COMPA_vect
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register
|
||||
# define TIMSKx TIMSK
|
||||
# else
|
||||
# define TIMSKx TIMSK1
|
||||
# endif
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# define OCIExA OCIE1A
|
||||
# define OCRxx OCR1A
|
||||
# elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO)
|
||||
# pragma message "Using hardware timer 3 with software PWM"
|
||||
// Timer 3 is not in use by Audio feature, Backlight can use it
|
||||
# define HARDWARE_PWM
|
||||
# define BACKLIGHT_PWM_TIMER
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR3A
|
||||
# define TCCRxB TCCR3B
|
||||
# define TIMERx_COMPA_vect TIMER3_COMPA_vect
|
||||
# define TIMERx_OVF_vect TIMER3_OVF_vect
|
||||
# define TIMSKx TIMSK3
|
||||
# define TOIEx TOIE3
|
||||
|
||||
# define OCIExA OCIE3A
|
||||
# define OCRxx OCR3A
|
||||
# else
|
||||
# pragma message "Audio in use - using pure software PWM"
|
||||
# define NO_HARDWARE_PWM
|
||||
# endif
|
||||
# if BACKLIGHT_PIN == C4
|
||||
# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error This MCU has no C4 pin!
|
||||
# else
|
||||
# pragma message "Custom driver defined - using pure software PWM"
|
||||
# define NO_HARDWARE_PWM
|
||||
# define COMxx0 COM3C0
|
||||
# define COMxx1 COM3C1
|
||||
# define OCRxx OCR3C
|
||||
# endif
|
||||
# elif BACKLIGHT_PIN == C5
|
||||
# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error This MCU has no C5 pin!
|
||||
# else
|
||||
# define COMxx0 COM3B0
|
||||
# define COMxx1 COM3B1
|
||||
# define OCRxx OCR3B
|
||||
# endif
|
||||
# elif BACKLIGHT_PIN == C6
|
||||
# define COMxx0 COM3A0
|
||||
# define COMxx1 COM3A1
|
||||
# define OCRxx OCR3A
|
||||
# endif
|
||||
#elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK1
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# ifndef BACKLIGHT_ON_STATE
|
||||
# define BACKLIGHT_ON_STATE 1
|
||||
# if BACKLIGHT_PIN == B7
|
||||
# define COMxx0 COM1C0
|
||||
# define COMxx1 COM1C1
|
||||
# define OCRxx OCR1C
|
||||
# elif BACKLIGHT_PIN == C5
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# elif BACKLIGHT_PIN == C6
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# endif
|
||||
#elif defined(__AVR_ATmega32A__) && (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# if BACKLIGHT_PIN == D4
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# elif BACKLIGHT_PIN == D5
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# endif
|
||||
#elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2)
|
||||
# define HARDWARE_PWM
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# define TIMSKx TIMSK1
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# if BACKLIGHT_PIN == B1
|
||||
# define COMxx0 COM1A0
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# elif BACKLIGHT_PIN == B2
|
||||
# define COMxx0 COM1B0
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# endif
|
||||
#elif !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO)
|
||||
// Timer 1 is not in use by Audio feature, Backlight can use it
|
||||
# pragma message "Using hardware timer 1 with software PWM"
|
||||
# define HARDWARE_PWM
|
||||
# define BACKLIGHT_PWM_TIMER
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define TIMERx_COMPA_vect TIMER1_COMPA_vect
|
||||
# define TIMERx_OVF_vect TIMER1_OVF_vect
|
||||
# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register
|
||||
# define TIMSKx TIMSK
|
||||
# else
|
||||
# define TIMSKx TIMSK1
|
||||
# endif
|
||||
# define TOIEx TOIE1
|
||||
|
||||
# define OCIExA OCIE1A
|
||||
# define OCRxx OCR1A
|
||||
#elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO)
|
||||
# pragma message "Using hardware timer 3 with software PWM"
|
||||
// Timer 3 is not in use by Audio feature, Backlight can use it
|
||||
# define HARDWARE_PWM
|
||||
# define BACKLIGHT_PWM_TIMER
|
||||
# define ICRx ICR1
|
||||
# define TCCRxA TCCR3A
|
||||
# define TCCRxB TCCR3B
|
||||
# define TIMERx_COMPA_vect TIMER3_COMPA_vect
|
||||
# define TIMERx_OVF_vect TIMER3_OVF_vect
|
||||
# define TIMSKx TIMSK3
|
||||
# define TOIEx TOIE3
|
||||
|
||||
# define OCIExA OCIE3A
|
||||
# define OCRxx OCR3A
|
||||
#elif defined(BACKLIGHT_CUSTOM_DRIVER)
|
||||
error("Please set 'BACKLIGHT_DRIVER = custom' within rules.mk")
|
||||
#else
|
||||
error("Please set 'BACKLIGHT_DRIVER = software' within rules.mk")
|
||||
#endif
|
||||
|
||||
#ifndef BACKLIGHT_ON_STATE
|
||||
# define BACKLIGHT_ON_STATE 1
|
||||
#endif
|
||||
|
||||
void backlight_on(pin_t backlight_pin) {
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
#if BACKLIGHT_ON_STATE == 1
|
||||
writePinHigh(backlight_pin);
|
||||
# else
|
||||
#else
|
||||
writePinLow(backlight_pin);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void backlight_off(pin_t backlight_pin) {
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
#if BACKLIGHT_ON_STATE == 1
|
||||
writePinLow(backlight_pin);
|
||||
# else
|
||||
#else
|
||||
writePinHigh(backlight_pin);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
# if defined(NO_HARDWARE_PWM) || defined(BACKLIGHT_PWM_TIMER) // pwm through software
|
||||
#ifdef BACKLIGHT_PWM_TIMER // pwm through software
|
||||
|
||||
// we support multiple backlight pins
|
||||
# ifndef BACKLIGHT_LED_COUNT
|
||||
# define BACKLIGHT_LED_COUNT 1
|
||||
# endif
|
||||
# ifndef BACKLIGHT_LED_COUNT
|
||||
# define BACKLIGHT_LED_COUNT 1
|
||||
# endif
|
||||
|
||||
# if BACKLIGHT_LED_COUNT == 1
|
||||
# define BACKLIGHT_PIN_INIT \
|
||||
{ BACKLIGHT_PIN }
|
||||
# else
|
||||
# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS
|
||||
# endif
|
||||
# if BACKLIGHT_LED_COUNT == 1
|
||||
# define BACKLIGHT_PIN_INIT \
|
||||
{ BACKLIGHT_PIN }
|
||||
# else
|
||||
# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS
|
||||
# endif
|
||||
|
||||
# define FOR_EACH_LED(x) \
|
||||
for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \
|
||||
pin_t backlight_pin = backlight_pins[i]; \
|
||||
{ x } \
|
||||
}
|
||||
# define FOR_EACH_LED(x) \
|
||||
for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \
|
||||
pin_t backlight_pin = backlight_pins[i]; \
|
||||
{ x } \
|
||||
}
|
||||
|
||||
static const pin_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT;
|
||||
|
||||
# else // full hardware PWM
|
||||
#else // full hardware PWM
|
||||
|
||||
static inline void enable_pwm(void) {
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
TCCRxA |= _BV(COMxx1);
|
||||
# else
|
||||
# else
|
||||
TCCRxA |= _BV(COMxx1) | _BV(COMxx0);
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
static inline void disable_pwm(void) {
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
TCCRxA &= ~(_BV(COMxx1));
|
||||
# else
|
||||
# else
|
||||
TCCRxA &= ~(_BV(COMxx1) | _BV(COMxx0));
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
// we support only one backlight pin
|
||||
static const pin_t backlight_pin = BACKLIGHT_PIN;
|
||||
# define FOR_EACH_LED(x) x
|
||||
# define FOR_EACH_LED(x) x
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef NO_HARDWARE_PWM
|
||||
void backlight_init_ports(void) {
|
||||
// Setup backlight pin as output and output to on state.
|
||||
FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);)
|
||||
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
if (is_backlight_breathing()) {
|
||||
breathing_enable();
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
uint8_t backlight_tick = 0;
|
||||
|
||||
# ifndef BACKLIGHT_CUSTOM_DRIVER
|
||||
void backlight_task(void) {
|
||||
if ((0xFFFF >> ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) {
|
||||
FOR_EACH_LED(backlight_on(backlight_pin);)
|
||||
} else {
|
||||
FOR_EACH_LED(backlight_off(backlight_pin);)
|
||||
}
|
||||
backlight_tick = (backlight_tick + 1) % 16;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
# ifndef BACKLIGHT_CUSTOM_DRIVER
|
||||
# error "Backlight breathing only available with hardware PWM. Please disable."
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# else // hardware pwm through timer
|
||||
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
#ifdef BACKLIGHT_PWM_TIMER
|
||||
|
||||
// The idea of software PWM assisted by hardware timers is the following
|
||||
// we use the hardware timer in fast PWM mode like for hardware PWM, but
|
||||
@@ -288,11 +251,11 @@ ISR(TIMERx_COMPA_vect) { FOR_EACH_LED(backlight_off(backlight_pin);) }
|
||||
// Triggered when the counter reaches the TOP value
|
||||
// this one triggers at F_CPU/65536 =~ 244 Hz
|
||||
ISR(TIMERx_OVF_vect) {
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
if (is_breathing()) {
|
||||
breathing_task();
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
// for very small values of OCRxx (or backlight level)
|
||||
// we can't guarantee this whole code won't execute
|
||||
// at the same time as the compare match interrupt
|
||||
@@ -306,9 +269,9 @@ ISR(TIMERx_OVF_vect) {
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define TIMER_TOP 0xFFFFU
|
||||
#define TIMER_TOP 0xFFFFU
|
||||
|
||||
// See http://jared.geek.nz/2013/feb/linear-led-pwm
|
||||
static uint16_t cie_lightness(uint16_t v) {
|
||||
@@ -329,88 +292,86 @@ static uint16_t cie_lightness(uint16_t v) {
|
||||
// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val.
|
||||
static inline void set_pwm(uint16_t val) { OCRxx = val; }
|
||||
|
||||
# ifndef BACKLIGHT_CUSTOM_DRIVER
|
||||
void backlight_set(uint8_t level) {
|
||||
if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS;
|
||||
|
||||
if (level == 0) {
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
#ifdef BACKLIGHT_PWM_TIMER
|
||||
if (OCRxx) {
|
||||
TIMSKx &= ~(_BV(OCIExA));
|
||||
TIMSKx &= ~(_BV(TOIEx));
|
||||
}
|
||||
# else
|
||||
#else
|
||||
// Turn off PWM control on backlight pin
|
||||
disable_pwm();
|
||||
# endif
|
||||
#endif
|
||||
FOR_EACH_LED(backlight_off(backlight_pin);)
|
||||
} else {
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
#ifdef BACKLIGHT_PWM_TIMER
|
||||
if (!OCRxx) {
|
||||
TIMSKx |= _BV(OCIExA);
|
||||
TIMSKx |= _BV(TOIEx);
|
||||
}
|
||||
# else
|
||||
#else
|
||||
// Turn on PWM control of backlight pin
|
||||
enable_pwm();
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
// Set the brightness
|
||||
set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS));
|
||||
}
|
||||
|
||||
void backlight_task(void) {}
|
||||
# endif // BACKLIGHT_CUSTOM_DRIVER
|
||||
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
|
||||
# define BREATHING_NO_HALT 0
|
||||
# define BREATHING_HALT_OFF 1
|
||||
# define BREATHING_HALT_ON 2
|
||||
# define BREATHING_STEPS 128
|
||||
# define BREATHING_NO_HALT 0
|
||||
# define BREATHING_HALT_OFF 1
|
||||
# define BREATHING_HALT_ON 2
|
||||
# define BREATHING_STEPS 128
|
||||
|
||||
static uint8_t breathing_halt = BREATHING_NO_HALT;
|
||||
static uint8_t breathing_halt = BREATHING_NO_HALT;
|
||||
static uint16_t breathing_counter = 0;
|
||||
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
static bool breathing = false;
|
||||
|
||||
bool is_breathing(void) { return breathing; }
|
||||
|
||||
# define breathing_interrupt_enable() \
|
||||
do { \
|
||||
breathing = true; \
|
||||
} while (0)
|
||||
# define breathing_interrupt_disable() \
|
||||
do { \
|
||||
breathing = false; \
|
||||
} while (0)
|
||||
# else
|
||||
# define breathing_interrupt_enable() \
|
||||
do { \
|
||||
breathing = true; \
|
||||
} while (0)
|
||||
# define breathing_interrupt_disable() \
|
||||
do { \
|
||||
breathing = false; \
|
||||
} while (0)
|
||||
# else
|
||||
|
||||
bool is_breathing(void) { return !!(TIMSKx & _BV(TOIEx)); }
|
||||
|
||||
# define breathing_interrupt_enable() \
|
||||
do { \
|
||||
TIMSKx |= _BV(TOIEx); \
|
||||
} while (0)
|
||||
# define breathing_interrupt_disable() \
|
||||
do { \
|
||||
TIMSKx &= ~_BV(TOIEx); \
|
||||
} while (0)
|
||||
# endif
|
||||
# define breathing_interrupt_enable() \
|
||||
do { \
|
||||
TIMSKx |= _BV(TOIEx); \
|
||||
} while (0)
|
||||
# define breathing_interrupt_disable() \
|
||||
do { \
|
||||
TIMSKx &= ~_BV(TOIEx); \
|
||||
} while (0)
|
||||
# endif
|
||||
|
||||
# define breathing_min() \
|
||||
do { \
|
||||
breathing_counter = 0; \
|
||||
} while (0)
|
||||
# define breathing_max() \
|
||||
do { \
|
||||
breathing_counter = get_breathing_period() * 244 / 2; \
|
||||
} while (0)
|
||||
# define breathing_min() \
|
||||
do { \
|
||||
breathing_counter = 0; \
|
||||
} while (0)
|
||||
# define breathing_max() \
|
||||
do { \
|
||||
breathing_counter = get_breathing_period() * 244 / 2; \
|
||||
} while (0)
|
||||
|
||||
void breathing_enable(void) {
|
||||
breathing_counter = 0;
|
||||
breathing_halt = BREATHING_NO_HALT;
|
||||
breathing_halt = BREATHING_NO_HALT;
|
||||
breathing_interrupt_enable();
|
||||
}
|
||||
|
||||
@@ -451,20 +412,20 @@ static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0,
|
||||
// Use this before the cie_lightness function.
|
||||
static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS * get_backlight_level(); }
|
||||
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
void breathing_task(void)
|
||||
# else
|
||||
# else
|
||||
/* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run
|
||||
* about 244 times per second.
|
||||
*/
|
||||
ISR(TIMERx_OVF_vect)
|
||||
# endif
|
||||
# endif
|
||||
{
|
||||
uint8_t breathing_period = get_breathing_period();
|
||||
uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS;
|
||||
uint8_t breathing_period = get_breathing_period();
|
||||
uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS;
|
||||
// resetting after one period to prevent ugly reset at overflow.
|
||||
breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
|
||||
uint8_t index = breathing_counter / interval % BREATHING_STEPS;
|
||||
uint8_t index = breathing_counter / interval % BREATHING_STEPS;
|
||||
|
||||
if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) {
|
||||
breathing_interrupt_disable();
|
||||
@@ -473,7 +434,7 @@ ISR(TIMERx_OVF_vect)
|
||||
set_pwm(cie_lightness(scale_backlight((uint16_t)pgm_read_byte(&breathing_table[index]) * 0x0101U)));
|
||||
}
|
||||
|
||||
# endif // BACKLIGHT_BREATHING
|
||||
#endif // BACKLIGHT_BREATHING
|
||||
|
||||
void backlight_init_ports(void) {
|
||||
// Setup backlight pin as output and output to on state.
|
||||
@@ -483,12 +444,12 @@ void backlight_init_ports(void) {
|
||||
// Go read the ATmega32u4 datasheet.
|
||||
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
|
||||
|
||||
# ifdef BACKLIGHT_PWM_TIMER
|
||||
#ifdef BACKLIGHT_PWM_TIMER
|
||||
// TimerX setup, Fast PWM mode count to TOP set in ICRx
|
||||
TCCRxA = _BV(WGM11); // = 0b00000010;
|
||||
// clock select clk/1
|
||||
TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
# else // hardware PWM
|
||||
#else // hardware PWM
|
||||
// Pin PB7 = OCR1C (Timer 1, Channel C)
|
||||
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
|
||||
// (i.e. start high, go low when counter matches.)
|
||||
@@ -500,25 +461,21 @@ void backlight_init_ports(void) {
|
||||
"In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]."
|
||||
"In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)."
|
||||
*/
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
# if BACKLIGHT_ON_STATE == 1
|
||||
TCCRxA = _BV(COMxx1) | _BV(WGM11);
|
||||
# else
|
||||
# else
|
||||
TCCRxA = _BV(COMxx1) | _BV(COMxx0) | _BV(WGM11);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10);
|
||||
# endif
|
||||
#endif
|
||||
// Use full 16-bit resolution. Counter counts to ICR1 before reset to 0.
|
||||
ICRx = TIMER_TOP;
|
||||
|
||||
backlight_init();
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
if (is_backlight_breathing()) {
|
||||
breathing_enable();
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
# endif // hardware backlight
|
||||
|
||||
#endif // backlight
|
||||
|
||||
@@ -14,123 +14,177 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KEYMAP_HUNGARIAN
|
||||
#define KEYMAP_HUNGARIAN
|
||||
#pragma once
|
||||
|
||||
#include "keymap.h"
|
||||
|
||||
// basic letters
|
||||
#define HU_Z KC_Y
|
||||
#define HU_Y KC_Z
|
||||
// clang-format off
|
||||
|
||||
#define HU_A KC_A
|
||||
#define HU_B KC_B
|
||||
#define HU_C KC_C
|
||||
#define HU_D KC_D
|
||||
#define HU_E KC_E
|
||||
#define HU_F KC_F
|
||||
#define HU_G KC_G
|
||||
#define HU_H KC_H
|
||||
#define HU_I KC_I
|
||||
#define HU_J KC_J
|
||||
#define HU_K KC_K
|
||||
#define HU_L KC_L
|
||||
#define HU_M KC_M
|
||||
#define HU_N KC_N
|
||||
#define HU_O KC_O
|
||||
#define HU_P KC_P
|
||||
#define HU_Q KC_Q
|
||||
#define HU_R KC_R
|
||||
#define HU_S KC_S
|
||||
#define HU_T KC_T
|
||||
#define HU_U KC_U
|
||||
#define HU_V KC_V
|
||||
#define HU_W KC_W
|
||||
#define HU_X KC_X
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ Ö │ Ü │ Ó │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ő │ Ú │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ É │ Á │ Ű │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ Í │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
// Row 1
|
||||
#define HU_0 KC_GRV // 0
|
||||
#define HU_1 KC_1 // 1
|
||||
#define HU_2 KC_2 // 2
|
||||
#define HU_3 KC_3 // 3
|
||||
#define HU_4 KC_4 // 4
|
||||
#define HU_5 KC_5 // 5
|
||||
#define HU_6 KC_6 // 6
|
||||
#define HU_7 KC_7 // 7
|
||||
#define HU_8 KC_8 // 8
|
||||
#define HU_9 KC_9 // 9
|
||||
#define HU_ODIA KC_0 // Ö
|
||||
#define HU_UDIA KC_MINS // Ü
|
||||
#define HU_OACU KC_EQL // Ó
|
||||
// Row 2
|
||||
#define HU_Q KC_Q // Q
|
||||
#define HU_W KC_W // W
|
||||
#define HU_E KC_E // E
|
||||
#define HU_R KC_R // R
|
||||
#define HU_T KC_T // T
|
||||
#define HU_Z KC_Y // Z
|
||||
#define HU_U KC_U // U
|
||||
#define HU_I KC_I // I
|
||||
#define HU_O KC_O // O
|
||||
#define HU_P KC_P // P
|
||||
#define HU_ODAC KC_LBRC // Ő
|
||||
#define HU_UACU KC_RBRC // Ú
|
||||
// Row 3
|
||||
#define HU_A KC_A // A
|
||||
#define HU_S KC_S // S
|
||||
#define HU_D KC_D // D
|
||||
#define HU_F KC_F // F
|
||||
#define HU_G KC_G // G
|
||||
#define HU_H KC_H // H
|
||||
#define HU_J KC_J // J
|
||||
#define HU_K KC_K // K
|
||||
#define HU_L KC_L // L
|
||||
#define HU_EACU KC_SCLN // É
|
||||
#define HU_AACU KC_QUOT // Á
|
||||
#define HU_UDAC KC_NUHS // Ű
|
||||
// Row 4
|
||||
#define HU_IACU KC_NUBS // Í
|
||||
#define HU_Y KC_Z // Y
|
||||
#define HU_X KC_X // X
|
||||
#define HU_C KC_C // C
|
||||
#define HU_V KC_V // V
|
||||
#define HU_B KC_B // B
|
||||
#define HU_N KC_N // N
|
||||
#define HU_M KC_M // M
|
||||
#define HU_COMM KC_COMM // ,
|
||||
#define HU_DOT KC_DOT // .
|
||||
#define HU_MINS KC_SLSH // -
|
||||
|
||||
// num row
|
||||
#define HU_0 KC_GRV
|
||||
#define HU_1 KC_1
|
||||
#define HU_2 KC_2
|
||||
#define HU_3 KC_3
|
||||
#define HU_4 KC_4
|
||||
#define HU_5 KC_5
|
||||
#define HU_6 KC_6
|
||||
#define HU_7 KC_7
|
||||
#define HU_8 KC_8
|
||||
#define HU_9 KC_9
|
||||
#define HU_OE KC_0
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ § │ ' │ " │ + │ ! │ % │ / │ = │ ( │ ) │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ ? │ : │ _ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
// Row 1
|
||||
#define HU_SECT S(HU_0) // §
|
||||
#define HU_QUOT S(HU_1) // '
|
||||
#define HU_DQUO S(HU_2) // "
|
||||
#define HU_PLUS S(HU_3) // +
|
||||
#define HU_EXLM S(HU_4) // !
|
||||
#define HU_PERC S(HU_5) // %
|
||||
#define HU_SLSH S(HU_6) // /
|
||||
#define HU_EQL S(HU_7) // =
|
||||
#define HU_LPRN S(HU_8) // (
|
||||
#define HU_RPRN S(HU_9) // )
|
||||
// Row 4
|
||||
#define HU_QUES S(HU_COMM) // ?
|
||||
#define HU_COLN S(HU_DOT) // :
|
||||
#define HU_UNDS S(HU_MINS) // _
|
||||
|
||||
#define HU_UE KC_MINS
|
||||
#define HU_OO KC_EQL
|
||||
/* AltGr symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ │ ~ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ ¨ │ ¸ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ \ │ | │ Ä │ │ │ │ € │ │ │ │ ÷ │ × │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ ä │ đ │ Đ │ [ │ ] │ │ │ ł │ Ł │ $ │ ß │ ¤ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ < │ > │ # │ & │ @ │ { │ } │ │ ; │ │ * │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
// Row 1
|
||||
#define HU_TILD ALGR(HU_1) // ~
|
||||
#define HU_CARN ALGR(HU_2) // ˇ (dead)
|
||||
#define HU_CIRC ALGR(HU_3) // ^ (dead)
|
||||
#define HU_BREV ALGR(HU_4) // ˘ (dead)
|
||||
#define HU_RNGA ALGR(HU_5) // ° (dead)
|
||||
#define HU_OGON ALGR(HU_6) // ˛ (dead)
|
||||
#define HU_GRV ALGR(HU_7) // `
|
||||
#define HU_DOTA ALGR(HU_8) // ˙ (dead)
|
||||
#define HU_ACUT ALGR(HU_9) // ´ (dead)
|
||||
#define HU_DACU ALGR(HU_ODIA) // ˝ (dead)
|
||||
#define HU_DIAE ALGR(HU_UDIA) // ¨ (dead)
|
||||
#define HU_CEDL ALGR(HU_OACU) // ¸ (dead)
|
||||
// Row 2
|
||||
#define HU_BSLS ALGR(HU_Q) // (backslash)
|
||||
#define HU_PIPE ALGR(HU_W) // |
|
||||
#define HU_CADI ALGR(HU_E) // Ä
|
||||
#define HU_EURO ALGR(HU_U) // €
|
||||
#define HU_DIV ALGR(HU_ODAC) // ÷
|
||||
#define HU_MUL ALGR(HU_UACU) // ×
|
||||
// Row 3
|
||||
#define HU_LADI ALGR(HU_A) // ä
|
||||
#define HU_LDST ALGR(HU_S) // đ
|
||||
#define HU_CDST ALGR(HU_D) // Đ
|
||||
#define HU_LBRC ALGR(HU_F) // [
|
||||
#define HU_RBRC ALGR(HU_G) // ]
|
||||
#define HU_LLST ALGR(HU_K) // ł
|
||||
#define HU_CLST ALGR(HU_L) // Ł
|
||||
#define HU_DLR ALGR(HU_EACU) // $
|
||||
#define HU_SS ALGR(HU_AACU) // ß
|
||||
#define HU_CURR ALGR(HU_UDAC) // ¤
|
||||
// Row 4
|
||||
#define HU_LABK ALGR(HU_IACU) // <
|
||||
#define HU_RABK ALGR(HU_Y) // >
|
||||
#define HU_HASH ALGR(HU_X) // #
|
||||
#define HU_AMPR ALGR(HU_C) // &
|
||||
#define HU_AT ALGR(HU_V) // @
|
||||
#define HU_LCBR ALGR(HU_B) // {
|
||||
#define HU_RCBR ALGR(HU_N) // }
|
||||
#define HU_SCLN ALGR(HU_COMM) // ;
|
||||
#define HU_ASTR ALGR(HU_MINS) // *
|
||||
|
||||
// q row
|
||||
#define HU_OEE KC_LBRC
|
||||
#define HU_UU KC_RBRC
|
||||
|
||||
// a row
|
||||
#define HU_EE KC_SCLN
|
||||
#define HU_AA KC_QUOT
|
||||
#define HU_UEE KC_NUHS
|
||||
|
||||
#define HU_MINS KC_SLSH // -
|
||||
|
||||
#define HU_DOT KC_DOT
|
||||
#define HU_COMM KC_COMM
|
||||
|
||||
// shifted characters
|
||||
// num row
|
||||
#define HU_PARA LSFT(HU_0) // §
|
||||
#define HU_QUOT LSFT(HU_1) // '
|
||||
#define HU_DQOT LSFT(HU_2) // "
|
||||
#define HU_PLUS LSFT(HU_3) // +
|
||||
#define HU_EXLM LSFT(HU_4) // !
|
||||
#define HU_PERC LSFT(HU_5) // %
|
||||
#define HU_SLSH LSFT(HU_6) // /
|
||||
#define HU_EQL LSFT(HU_7) // =
|
||||
#define HU_LPRN LSFT(HU_8) // (
|
||||
#define HU_RPRN LSFT(HU_9) // )
|
||||
|
||||
// í,y row
|
||||
#define HU_II KC_NUBS
|
||||
#define HU_QST LSFT(HU_COMM) // ?
|
||||
#define HU_COLN LSFT(HU_DOT) // :
|
||||
#define HU_UNDS LSFT(HU_MINS) // _
|
||||
|
||||
// Alt Gr'd characters
|
||||
// num row
|
||||
#define HU_TILD ALGR(HU_1) // ~
|
||||
//#define HU_?? ALGR(HU_2) // ˇ (proper name?)
|
||||
#define HU_CIRC ALGR(HU_3) // ^
|
||||
#define HU_BRV ALGR(HU_4) // ˘
|
||||
#define HU_RING ALGR(HU_5) // °
|
||||
//#define HU_?? ALGR(HU_6) // ˛ (proper name?)
|
||||
#define HU_GRV ALGR(HU_7) // `
|
||||
//#define HU_?? ALGR(HU_8) // ˙ (proper name?)
|
||||
#define HU_ACUT ALGR(HU_9) // ´
|
||||
|
||||
// q row
|
||||
#define HU_BSLS ALGR(HU_Q) // \ backslash
|
||||
#define HU_PIPE ALGR(HU_W) // |
|
||||
#define HU_DIV ALGR(HU_OEE) // ÷
|
||||
#define HU_CRSS ALGR(HU_UU) // ×
|
||||
#define HU_EURO ALGR(HU_U) // €
|
||||
|
||||
// a row
|
||||
#define HU_LBRC ALGR(HU_F) // [
|
||||
#define HU_RBRC ALGR(HU_G) // ]
|
||||
#define HU_DLR ALGR(HU_EE) // $
|
||||
#define HU_SS ALGR(HU_AA) // ß
|
||||
|
||||
// í,y row
|
||||
#define HU_LESS ALGR(KC_NUBS) // <
|
||||
#define HU_MORE ALGR(HU_Y) // >
|
||||
#define HU_HASH ALGR(HU_X) // #
|
||||
#define HU_AMPR ALGR(HU_C) // &
|
||||
#define HU_AT ALGR(HU_V) // @
|
||||
#define HU_LCBR ALGR(HU_B) // {
|
||||
#define HU_RCBR ALGR(HU_N) // }
|
||||
#define HU_SCLN ALGR(HU_COMM) // ;
|
||||
#define HU_ASTR ALGR(HU_MINS) // *
|
||||
|
||||
#endif
|
||||
// DEPRECATED
|
||||
#define HU_OE HU_ODIA
|
||||
#define HU_UE HU_UDIA
|
||||
#define HU_OO HU_OACU
|
||||
#define HU_OEE HU_ODAC
|
||||
#define HU_UU HU_UACU
|
||||
#define HU_EE HU_EACU
|
||||
#define HU_AA HU_AACU
|
||||
#define HU_UEE HU_UDAC
|
||||
#define HU_II HU_IACU
|
||||
#define HU_PARA HU_SECT
|
||||
#define HU_DQOT HU_DQUO
|
||||
#define HU_QST HU_QUES
|
||||
#define HU_BRV HU_BREV
|
||||
#define HU_RING HU_RNGA
|
||||
#define HU_CRSS HU_MUL
|
||||
#define HU_LESS HU_LABK
|
||||
#define HU_MORE HU_RABK
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_belgian.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 1, 1, 0, 0, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 0, 0, 0, 0, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 1, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 1, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 0, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_bepo.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 0, 0, 0, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 1, 0, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 1, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 1, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_danish.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 1, 1, 0, 1, 1, 0,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 1, 1,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 0, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_french.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 0, 1, 0, 0, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 0, 0, 0, 0, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 1, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 0, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_german.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 1, 0, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
100
quantum/keymap_extras/sendstring_hungarian.h
Normal file
100
quantum/keymap_extras/sendstring_hungarian.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
// Sendstring lookup tables for Hungarian layouts
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "keymap_hungarian.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
KCLUT_ENTRY(0, 1, 1, 0, 0, 1, 0, 1),
|
||||
KCLUT_ENTRY(1, 1, 0, 1, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 0, 0, 1, 0, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 1, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 1, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// BS TAB LF VT FF CR SO SI
|
||||
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// CAN EM SUB ESC FS GS RS US
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// ! " # $ % & '
|
||||
KC_SPC, HU_4, HU_2, HU_X, HU_EACU, HU_5, HU_C, HU_1,
|
||||
// ( ) * + , - . /
|
||||
HU_8, HU_9, HU_MINS, HU_3, HU_COMM, HU_MINS, HU_DOT, HU_6,
|
||||
// 0 1 2 3 4 5 6 7
|
||||
HU_0, HU_1, HU_2, HU_3, HU_4, HU_5, HU_6, HU_7,
|
||||
// 8 9 : ; < = > ?
|
||||
HU_8, HU_9, HU_DOT, HU_COMM, HU_M, HU_7, HU_DOT, HU_COMM,
|
||||
// @ A B C D E F G
|
||||
HU_V, HU_A, HU_B, HU_C, HU_D, HU_E, HU_F, HU_G,
|
||||
// H I J K L M N O
|
||||
HU_H, HU_I, HU_J, HU_K, HU_L, HU_M, HU_N, HU_O,
|
||||
// P Q R S T U V W
|
||||
HU_P, HU_Q, HU_R, HU_S, HU_T, HU_U, HU_V, HU_W,
|
||||
// X Y Z [ \ ] ^ _
|
||||
HU_X, HU_Y, HU_Z, HU_F, HU_Q, HU_G, HU_3, HU_MINS,
|
||||
// ` a b c d e f g
|
||||
HU_7, HU_A, HU_B, HU_C, HU_D, HU_E, HU_F, HU_G,
|
||||
// h i j k l m n o
|
||||
HU_H, HU_I, HU_J, HU_K, HU_L, HU_M, HU_N, HU_O,
|
||||
// p q r s t u v w
|
||||
HU_P, HU_Q, HU_R, HU_S, HU_T, HU_U, HU_V, HU_W,
|
||||
// x y z { | } ~ DEL
|
||||
HU_X, HU_Y, HU_Z, HU_B, HU_W, HU_N, HU_1, KC_DEL
|
||||
};
|
||||
@@ -19,27 +19,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_jp.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 1, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_spanish.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 1, 0, 1, 1, 1, 0,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 1, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_turkish_f.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 1, 0, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 1, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,47 +19,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_turkish_q.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 0, 0, 0, 1, 1, 1,
|
||||
1, 1, 0, 1, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 1,
|
||||
0, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 1, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
KCLUT_ENTRY(0, 1, 0, 0, 0, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 0, 1, 0, 0, 0, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 0, 0, 1, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 0, 0,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0),
|
||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -19,27 +19,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "keymap_uk.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
0, 1, 1, 0, 1, 1, 1, 0,
|
||||
1, 1, 1, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 1, 0, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 1, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 0, 1, 0, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
|
||||
@@ -314,11 +314,6 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
case OUT_BT:
|
||||
set_output(OUTPUT_BLUETOOTH);
|
||||
return false;
|
||||
#endif
|
||||
#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING)
|
||||
case BL_BRTG:
|
||||
backlight_toggle_breathing();
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -326,50 +321,97 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
return process_action_kb(record);
|
||||
}
|
||||
|
||||
__attribute__((weak)) const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0};
|
||||
|
||||
__attribute__((weak)) const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
// clang-format off
|
||||
__attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// BS TAB LF VT FF CR SO SI
|
||||
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// CAN EM SUB ESC FS GS RS US
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// ! " # $ % & '
|
||||
KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT,
|
||||
// ( ) * + , - . /
|
||||
KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH,
|
||||
// 0 1 2 3 4 5 6 7
|
||||
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
|
||||
// 8 9 : ; < = > ?
|
||||
KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH,
|
||||
// @ A B C D E F G
|
||||
KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||
// H I J K L M N O
|
||||
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||
// P Q R S T U V W
|
||||
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||
// X Y Z [ \ ] ^ _
|
||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS,
|
||||
// ` a b c d e f g
|
||||
KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||
// h i j k l m n o
|
||||
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||
// p q r s t u v w
|
||||
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||
// x y z { | } ~ DEL
|
||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL};
|
||||
/* Bit-Packed look-up table to convert an ASCII character to whether
|
||||
* [Shift] needs to be sent with the keycode.
|
||||
*/
|
||||
__attribute__((weak)) const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 0),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 1, 0, 1, 0, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||
};
|
||||
|
||||
/* Bit-Packed look-up table to convert an ASCII character to whether
|
||||
* [AltGr] needs to be sent with the keycode.
|
||||
*/
|
||||
__attribute__((weak)) const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
/* Look-up table to convert an ASCII character to a keycode.
|
||||
*/
|
||||
__attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// BS TAB LF VT FF CR SO SI
|
||||
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// CAN EM SUB ESC FS GS RS US
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
// ! " # $ % & '
|
||||
KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT,
|
||||
// ( ) * + , - . /
|
||||
KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH,
|
||||
// 0 1 2 3 4 5 6 7
|
||||
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
|
||||
// 8 9 : ; < = > ?
|
||||
KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH,
|
||||
// @ A B C D E F G
|
||||
KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||
// H I J K L M N O
|
||||
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||
// P Q R S T U V W
|
||||
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||
// X Y Z [ \ ] ^ _
|
||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS,
|
||||
// ` a b c d e f g
|
||||
KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||
// h i j k l m n o
|
||||
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||
// p q r s t u v w
|
||||
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||
// x y z { | } ~ DEL
|
||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
// Note: we bit-pack in "reverse" order to optimize loading
|
||||
#define PGM_LOADBIT(mem, pos) ((pgm_read_byte(&((mem)[(pos) / 8])) >> ((pos) % 8)) & 0x01)
|
||||
|
||||
void send_string(const char *str) { send_string_with_delay(str, 0); }
|
||||
|
||||
void send_string_P(const char *str) { send_string_with_delay_P(str, 0); }
|
||||
@@ -467,8 +509,8 @@ void send_char(char ascii_code) {
|
||||
#endif
|
||||
|
||||
uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
|
||||
bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]);
|
||||
bool is_altgred = pgm_read_byte(&ascii_to_altgr_lut[(uint8_t)ascii_code]);
|
||||
bool is_shifted = PGM_LOADBIT(ascii_to_shift_lut, (uint8_t)ascii_code);
|
||||
bool is_altgred = PGM_LOADBIT(ascii_to_altgr_lut, (uint8_t)ascii_code);
|
||||
|
||||
if (is_shifted) {
|
||||
register_code(KC_LSFT);
|
||||
@@ -647,7 +689,7 @@ void matrix_scan_quantum() {
|
||||
// Functions for spitting out values
|
||||
//
|
||||
|
||||
void send_dword(uint32_t number) { // this might not actually work
|
||||
void send_dword(uint32_t number) {
|
||||
uint16_t word = (number >> 16);
|
||||
send_word(word);
|
||||
send_word(number & 0xFFFFUL);
|
||||
|
||||
@@ -211,9 +211,21 @@ typedef ioline_t pin_t;
|
||||
#define SEND_STRING(string) send_string_P(PSTR(string))
|
||||
#define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval)
|
||||
|
||||
extern const bool ascii_to_shift_lut[128];
|
||||
extern const bool ascii_to_altgr_lut[128];
|
||||
// Look-Up Tables (LUTs) to convert ASCII character to keycode sequence.
|
||||
extern const uint8_t ascii_to_keycode_lut[128];
|
||||
extern const uint8_t ascii_to_shift_lut[16];
|
||||
extern const uint8_t ascii_to_altgr_lut[16];
|
||||
// clang-format off
|
||||
#define KCLUT_ENTRY(a, b, c, d, e, f, g, h) \
|
||||
( ((a) ? 1 : 0) << 0 \
|
||||
| ((b) ? 1 : 0) << 1 \
|
||||
| ((c) ? 1 : 0) << 2 \
|
||||
| ((d) ? 1 : 0) << 3 \
|
||||
| ((e) ? 1 : 0) << 4 \
|
||||
| ((f) ? 1 : 0) << 5 \
|
||||
| ((g) ? 1 : 0) << 6 \
|
||||
| ((h) ? 1 : 0) << 7 )
|
||||
// clang-format on
|
||||
|
||||
void send_string(const char *str);
|
||||
void send_string_with_delay(const char *str, uint8_t interval);
|
||||
|
||||
@@ -96,10 +96,10 @@ static int a2d(char ch) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
static char a2i(char ch, char** src, int base, int* nump) {
|
||||
char* p = *src;
|
||||
int num = 0;
|
||||
int digit;
|
||||
static char a2i(char ch, const char** src, int base, int* nump) {
|
||||
const char* p = *src;
|
||||
int num = 0;
|
||||
int digit;
|
||||
while ((digit = a2d(ch)) >= 0) {
|
||||
if (digit > base) break;
|
||||
num = num * base + digit;
|
||||
@@ -119,7 +119,7 @@ static void putchw(void* putp, putcf putf, int n, char z, char* bf) {
|
||||
while ((ch = *bf++)) putf(putp, ch);
|
||||
}
|
||||
|
||||
void tfp_format(void* putp, putcf putf, char* fmt, va_list va) {
|
||||
void tfp_format(void* putp, putcf putf, const char* fmt, va_list va) {
|
||||
// This used to handle max of 12, but binary support jumps this to at least 32
|
||||
char bf[36];
|
||||
|
||||
@@ -211,19 +211,23 @@ void init_printf(void* putp, void (*putf)(void*, char)) {
|
||||
stdout_putp = putp;
|
||||
}
|
||||
|
||||
void tfp_printf(char* fmt, ...) {
|
||||
int tfp_printf(const char* fmt, ...) {
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
tfp_format(stdout_putp, stdout_putf, fmt, va);
|
||||
va_end(va);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void putcp(void* p, char c) { *(*((char**)p))++ = c; }
|
||||
|
||||
void tfp_sprintf(char* s, char* fmt, ...) {
|
||||
int tfp_sprintf(char* s, const char* fmt, ...) {
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
tfp_format(&s, putcp, fmt, va);
|
||||
putcp(&s, 0);
|
||||
va_end(va);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ regs Kusti, 23.10.2004
|
||||
|
||||
void init_printf(void* putp, void (*putf)(void*, char));
|
||||
|
||||
void tfp_printf(char* fmt, ...);
|
||||
void tfp_sprintf(char* s, char* fmt, ...);
|
||||
int tfp_printf(const char* fmt, ...);
|
||||
int tfp_sprintf(char* s, const char* fmt, ...);
|
||||
|
||||
void tfp_format(void* putp, void (*putf)(void*, char), char* fmt, va_list va);
|
||||
void tfp_format(void* putp, void (*putf)(void*, char), const char* fmt, va_list va);
|
||||
|
||||
#define printf tfp_printf
|
||||
#define sprintf tfp_sprintf
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef PROGMEM_H
|
||||
#define PROGMEM_H 1
|
||||
#pragma once
|
||||
|
||||
#if defined(__AVR__)
|
||||
# include <avr/pgmspace.h>
|
||||
@@ -9,5 +8,3 @@
|
||||
# define pgm_read_word(p) *((uint16_t*)(p))
|
||||
# define pgm_read_dword(p) *((uint32_t*)(p))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Corne 8x6 font with QMK Firmware Logo
|
||||
// Online editor: https://helixfonteditor.netlify.com/
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
# include <avr/io.h>
|
||||
# include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
# include <pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Corne 8x6 font with QMK Firmware Logo
|
||||
// Online editor: https://helixfonteditor.netlify.com/
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
@@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif // FONT5X7_H
|
||||
|
||||
Reference in New Issue
Block a user