Compare commits

..

9 Commits

Author SHA1 Message Date
fauxpark
c27aa60c50 Make the CLI Ψ capital (#6637) 2019-08-30 10:23:36 -07:00
Drashna Jaelre
931e9bdbe4 Decrement EECONFIG magic number
This will manually wipe the EEPROM. This is a hacky solution for when new ranges are added or moved around. 

A better (more complicated) solution would be to zero out everything, not just known ranges.  But for now, this is a hacky solution that will work.
2019-08-27 20:32:36 -07:00
Yan-Fa Li
5ef7367e6c Wonderland: README (#6613)
* Wonderland README

breaks

* Wonderland info.json

* Update keyboards/maartenwut/wonderland/readme.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-08-27 16:22:20 -07:00
Jorde Vorstenbosch
5c6c556933 [Keymap] default keymap fix for questionmark (redox, redox_w) (#6574)
* default keymap fix for questionmark

Added /? to the default position for a qwerty keyboard. Moved |\ to the left ctrl with the same behaviour as before.

* Small PR adjustments and Keypad optimization

* Update keymap.c

* Update keymap.c
2019-08-27 14:20:25 -07:00
Yan-Fa Li
d2ce12d15d pegasushoof Specify the bootloader to use :flash (#6614)
A support for newer :flash command to pegasus hoof
2019-08-26 11:08:18 -07:00
Drashna Jaelre
bc86eb2233 Fix Typo in :flash target for missing bootloader (#6615) 2019-08-26 10:16:46 -07:00
MechMerlin
f2d9f912b1 Mars80 Bug: Physical/Electrical Matrix Mismatch (#6612) 2019-08-26 13:46:35 +01:00
Gabes Mak
0b89809ac4 [Keymap] Redox_w Use layer_state_set_user instead of matrix_scan_user (#6608)
* use layer_state_set_user

* fix
2019-08-25 12:50:29 -07:00
XScorpion2
957070a6b5 Added OLED Display autoscroll during periods of OLED data inactivity (#6546)
* Added OLED Display autoscroll during periods of OLED data inactivity.

* Fixing compile errors

* Feedback from review
2019-08-25 12:37:55 -07:00
21 changed files with 193 additions and 87 deletions

View File

@@ -47,7 +47,7 @@ else:
# Setup the CLI
import milc
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}ψ{style_reset_all}'
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
# This means we can't accept arguments to the qmk script itself.

View File

@@ -96,17 +96,19 @@ void oled_task_user(void) {
## Basic Configuration
| Define | Default | Description |
|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
| `OLED_FONT_WIDTH` | `6` | The font width |
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. |
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
| Define | Default | Description |
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
| `OLED_FONT_WIDTH` | `6` | The font width |
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
| `OLED_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. |
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
## 128x64 & Custom sized OLED Displays

View File

@@ -114,8 +114,11 @@ bool oled_active = false;
bool oled_scrolling = false;
uint8_t oled_rotation = 0;
uint8_t oled_rotation_width = 0;
#if !defined(OLED_DISABLE_TIMEOUT)
uint16_t oled_last_activity;
#if OLED_TIMEOUT > 0
uint32_t oled_timeout;
#endif
#if OLED_SCROLL_TIMEOUT > 0
uint32_t oled_scroll_timeout;
#endif
// Internal variables to reduce math instructions
@@ -209,6 +212,13 @@ bool oled_init(uint8_t rotation) {
return false;
}
#if OLED_TIMEOUT > 0
oled_timeout = timer_read32() + OLED_TIMEOUT;
#endif
#if OLED_SCROLL_TIMEOUT > 0
oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT;
#endif
oled_clear();
oled_initialized = true;
oled_active = true;
@@ -457,8 +467,8 @@ void oled_write_ln_P(const char *data, bool invert) {
#endif // defined(__AVR__)
bool oled_on(void) {
#if !defined(OLED_DISABLE_TIMEOUT)
oled_last_activity = timer_read();
#if OLED_TIMEOUT > 0
oled_timeout = timer_read32() + OLED_TIMEOUT;
#endif
static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON };
@@ -522,6 +532,7 @@ bool oled_scroll_off(void) {
return oled_scrolling;
}
oled_scrolling = false;
oled_dirty = -1;
}
return !oled_scrolling;
}
@@ -549,15 +560,32 @@ void oled_task(void) {
oled_task_user();
#if OLED_SCROLL_TIMEOUT > 0
if (oled_dirty && oled_scrolling) {
oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT;
oled_scroll_off();
}
#endif
// Smart render system, no need to check for dirty
oled_render();
// Display timeout check
#if !defined(OLED_DISABLE_TIMEOUT)
if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) {
#if OLED_TIMEOUT > 0
if (oled_active && timer_expired32(timer_read32(), oled_timeout)) {
oled_off();
}
#endif
#if OLED_SCROLL_TIMEOUT > 0
if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) {
#ifdef OLED_SCROLL_TIMEOUT_RIGHT
oled_scroll_right();
#else
oled_scroll_left();
#endif
}
#endif
}
__attribute__((weak))

View File

@@ -138,6 +138,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define OLED_FONT_HEIGHT 8
#endif
#if !defined(OLED_TIMEOUT)
#if defined(OLED_DISABLE_TIMEOUT)
#define OLED_TIMEOUT 0
#else
#define OLED_TIMEOUT 60000
#endif
#endif
// OLED Rotation enum values are flags
typedef enum {
OLED_ROTATION_0 = 0,

View File

@@ -36,15 +36,7 @@ F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
BOOTLOADER=atmel-dfu
# Build Options
# change yes to no to disable

View File

@@ -37,7 +37,7 @@
{ \
{ k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \
{ KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \
@@ -55,7 +55,7 @@
{ \
{ k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \
{ KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \

View File

@@ -0,0 +1,80 @@
{
"keyboard_name": "Maartenwut Wonderland",
"url": "",
"maintainer": "Maartenwut",
"width": 18.25,
"height": 5,
"layouts": {
"LAYOUT": {
"key_count": 66,
"layout": [
{"label":"k10", "x":0, "y":0},
{"label":"k00", "x":1.25, "y":0},
{"label":"k01", "x":2.25, "y":0},
{"label":"k02", "x":3.25, "y":0},
{"label":"k03", "x":4.25, "y":0},
{"label":"k04", "x":5.25, "y":0},
{"label":"k05", "x":6.25, "y":0},
{"label":"k06", "x":7.25, "y":0},
{"label":"k07", "x":10.25, "y":0},
{"label":"k08", "x":11.25, "y":0},
{"label":"k09", "x":12.25, "y":0},
{"label":"k0a", "x":13.25, "y":0},
{"label":"k0b", "x":14.25, "y":0},
{"label":"k0c", "x":15.25, "y":0},
{"label":"k0d", "x":16.25, "y":0},
{"label":"k0e", "x":17.25, "y":0},
{"label":"k20", "x":0, "y":1},
{"label":"k11", "x":1.25, "y":1, "w":1.5},
{"label":"k12", "x":2.75, "y":1},
{"label":"k13", "x":3.75, "y":1},
{"label":"k14", "x":4.75, "y":1},
{"label":"k15", "x":5.75, "y":1},
{"label":"k16", "x":6.75, "y":1},
{"label":"k17", "x":9.75, "y":1},
{"label":"k18", "x":10.75, "y":1},
{"label":"k19", "x":11.75, "y":1},
{"label":"k1a", "x":12.75, "y":1},
{"label":"k1b", "x":13.75, "y":1},
{"label":"k1c", "x":14.75, "y":1},
{"label":"k1d", "x":15.75, "y":1},
{"label":"k1e", "x":16.75, "y":1, "w":1.5},
{"label":"k30", "x":0, "y":2},
{"label":"k21", "x":1.25, "y":2, "w":1.75},
{"label":"k22", "x":3, "y":2},
{"label":"k23", "x":4, "y":2},
{"label":"k24", "x":5, "y":2},
{"label":"k25", "x":6, "y":2},
{"label":"k26", "x":7, "y":2},
{"label":"k27", "x":10, "y":2},
{"label":"k28", "x":11, "y":2},
{"label":"k29", "x":12, "y":2},
{"label":"k2a", "x":13, "y":2},
{"label":"k2b", "x":14, "y":2},
{"label":"k2c", "x":15, "y":2},
{"label":"k2e", "x":16, "y":2, "w":2.25},
{"label":"k31", "x":1.25, "y":3, "w":2.25},
{"label":"k32", "x":3.5, "y":3},
{"label":"k33", "x":4.5, "y":3},
{"label":"k34", "x":5.5, "y":3},
{"label":"k35", "x":6.5, "y":3},
{"label":"k36", "x":7.5, "y":3},
{"label":"k37", "x":9.5, "y":3},
{"label":"k38", "x":10.5, "y":3},
{"label":"k39", "x":11.5, "y":3},
{"label":"k3a", "x":12.5, "y":3},
{"label":"k3b", "x":13.5, "y":3},
{"label":"k3c", "x":14.5, "y":3},
{"label":"k3d", "x":15.5, "y":3, "w":1.75},
{"label":"k3e", "x":17.25, "y":3},
{"label":"k41", "x":1.25, "y":4, "w":1.5},
{"label":"k43", "x":4.25, "y":4, "w":1.5},
{"label":"k45", "x":5.75, "y":4, "w":2},
{"label":"k46", "x":7.75, "y":4, "w":1.25},
{"label":"k48", "x":9.5, "y":4, "w":2.75},
{"label":"k4a", "x":12.25, "y":4, "w":1.5},
{"label":"k4e", "x":16.75, "y":4, "w":1.5}
]
}
}
}

View File

@@ -0,0 +1,14 @@
Wonderland USB-c and USB-mini
======
Only the USB-mini part is compatible with the original Alice case. The USB-c version was created for the Lubrigante, a case designed by Zambumon and a GB run by homerowco.
Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut)<br>
Hardware Supported: Wonderland-C and Wonderland-Mini<br>
Hardware Availability: https://maartenwut.com/product/wonderland-mini-usb-only/<br>
Make example for this keyboard (after setting up your build environment):
make maartenwut/wonderland:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@@ -1,7 +1,5 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -19,11 +17,10 @@ enum custom_keycodes {
};
// Shortcut to make keymap more readable
#define KC_BKSL KC_BSLASH
#define SYM_L MO(_SYMB)
#define KC_ALAS LALT_T(KC_PAST)
#define KC_CTPL LCTL_T(KC_PSLS)
#define KC_CTPL LCTL_T(KC_BSLS)
#define KC_NAGR LT(_NAV, KC_GRV)
#define KC_NAMI LT(_NAV, KC_MINS)
@@ -41,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_BKSL ,KC_RSFT ,
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
@@ -51,13 +48,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX ,
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
@@ -88,5 +85,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
)
};

View File

@@ -1,7 +1,5 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -19,11 +17,10 @@ enum custom_keycodes {
};
// Shortcut to make keymap more readable
#define KC_BKSL KC_BSLASH
#define SYM_L MO(_SYMB)
#define KC_ALAS LALT_T(KC_PAST)
#define KC_CTPL LCTL_T(KC_PSLS)
#define KC_CTPL LCTL_T(KC_BSLS)
#define KC_NAGR LT(_NAV, KC_GRV)
#define KC_NAMI LT(_NAV, KC_MINS)
@@ -41,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_BKSL ,KC_RSFT ,
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
@@ -51,13 +48,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX ,
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
@@ -71,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
@@ -85,16 +82,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
)
};
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
switch (layer) {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _QWERTY:
set_led_off;
break;
@@ -110,6 +105,7 @@ void matrix_scan_user(void) {
default:
break;
}
};
return state;
}

View File

@@ -347,5 +347,5 @@ else ifeq ($(strip $(BOOTLOADER)), USBasp)
else ifeq ($(strip $(BOOTLOADER)), bootloadHID)
$(call EXEC_BOOTLOADHID)
else
$(PRINT_OK); $(SILENT) || printf "&(MSG_FLASH_BOOTLOADER)"
$(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)"
endif

View File

@@ -22,7 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEED
#ifndef EECONFIG_MAGIC_NUMBER
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEC
#endif
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
/* EEPROM parameter address */

View File

@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TIMER_H 1
#include <stdint.h>
#include <stdbool.h>
#if defined(__AVR__)
#include "avr/timer_avr.h"
@@ -46,6 +47,16 @@ uint32_t timer_read32(void);
uint16_t timer_elapsed(uint16_t last);
uint32_t timer_elapsed32(uint32_t last);
// Utility functions to check if a future time has expired & autmatically handle time wrapping if checked / reset frequently (half of max value)
inline bool timer_expired(uint16_t current, uint16_t last)
{
return current - last < 0x8000;
}
inline bool timer_expired32(uint32_t current, uint32_t future) {
return current - future < 0x80000000;
}
#ifdef __cplusplus
}
#endif

View File

@@ -4,14 +4,13 @@
#define __DELAY_BACKWARD_COMPATIBLE__
#include <util/delay.h>
#include "common/timer.h"
#include "Arduino.h"
unsigned long millis()
unsigned long millis(void)
{
return timer_read32();
}
unsigned long micros()
unsigned long micros(void)
{
return timer_read32() * 1000UL;
}
@@ -23,7 +22,7 @@ void delayMicroseconds(unsigned int us)
{
_delay_us(us);
}
void init()
void init(void)
{
timer_init();
}

View File

@@ -1,6 +1,5 @@
#include "custom_tap_dance.h"
#include "custom_keycodes.h"
#include "timer_utils.h"
#ifdef TAP_DANCE_ENABLE

View File

@@ -18,7 +18,7 @@
#define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
#define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G
#define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC
#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC
#define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC
#define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS

View File

@@ -1,6 +1,5 @@
#include "process_records.h"
#include "custom_keycodes.h"
#include "timer_utils.h"
#ifdef RGB_ENABLE
#include "custom_rgb.h"
@@ -34,7 +33,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
if (record->event.pressed)
reset_timer = timer_read() + 500;
else if (timer_expired(reset_timer))
else if (timer_expired(timer_read(), reset_timer))
reset_keyboard();
}
return false;

View File

@@ -1,7 +1,6 @@
SRC += xulkal.c \
process_records.c \
custom_tap_dance.c \
timer_utils.c
custom_tap_dance.c
# Some usual defaults
MOUSEKEY_ENABLE = no # Mouse keys (+4700)

View File

@@ -1,12 +0,0 @@
#include "timer_utils.h"
bool timer_expired(uint16_t last)
{
return timer_read() - last < 0x8000;
}
bool timer_expired32(uint32_t last)
{
return timer_read32() - last < 0x80000000;
}

View File

@@ -1,6 +0,0 @@
#pragma once
#include "timer.h"
#include <stdbool.h>
bool timer_expired(uint16_t last);
bool timer_expired32(uint32_t last);

View File

@@ -2,6 +2,5 @@
#include "process_records.h"
#include "layouts.h"
#include "timer_utils.h"
#include "custom_keycodes.h"
#include "custom_tap_dance.h"