[Keyboard] Fix error_log complaint about handwired/onekey layout macro (#9263)

This commit is contained in:
Ryan 2020-06-08 15:49:18 +10:00 committed by GitHub
parent d7523c1260
commit 407d6a2b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 44 additions and 50 deletions

View file

@ -7,7 +7,7 @@ enum custom_keycodes {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(ADC_SAMPLE) //
LAYOUT_ortho_1x1(ADC_SAMPLE)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@ -16,7 +16,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
int16_t val = analogReadPin(ADC_PIN);
char buffer [50];
char buffer[50];
sprintf(buffer, "ADC:%u\n", val);
#ifdef CONSOLE_ENABLE
printf(buffer);
@ -30,5 +30,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
// adc_mux pinToMux(pin_t pin) {
// return TO_MUX( ADC_CHANNEL_IN1, 0 );
// return TO_MUX(ADC_CHANNEL_IN1, 0);
// };

View file

@ -2,39 +2,38 @@
//Tap Dance Declarations
enum {
TD_BL = 0
TD_BL = 0
};
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
// noop
void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) {
// noop
}
void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
// single tap - step through backlight
backlight_step();
break;
void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
// single tap - step through backlight
backlight_step();
break;
#ifdef BACKLIGHT_BREATHING
case 2:
// double tap - toggle breathing
breathing_toggle();
break;
case 3:
//tripple tap - do some pulse stuff
breathing_pulse();
break;
case 2:
// double tap - toggle breathing
breathing_toggle();
break;
case 3:
// triple tap - do some pulse stuff
breathing_pulse();
break;
#endif
default:
// more - nothing
break;
}
default:
break;
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
[TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset)
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( TD(TD_BL) )
LAYOUT_ortho_1x1(TD(TD_BL))
};

View file

@ -1,5 +1,5 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( KC_A )
LAYOUT_ortho_1x1(KC_A)
};

View file

@ -1,9 +1,9 @@
{
"keyboard":"handwired/onekey/pytest",
"keymap":"default_json",
"layout":"LAYOUT",
"layers":[["KC_A"]],
"author":"qmk",
"notes":"This file is a keymap.json file for handwired/onekey/pytest",
"version":1
"keyboard": "handwired/onekey/pytest",
"keymap": "default_json",
"layout": "LAYOUT_ortho_1x1",
"layers": [["KC_A"]],
"author": "qmk",
"notes": "This file is a keymap.json file for handwired/onekey/pytest",
"version": 1
}

View file

@ -1,5 +1,5 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( EEP_RST )
LAYOUT_ortho_1x1(EEP_RST)
};

View file

@ -21,7 +21,7 @@ i2c_status_t i2c_start_bodge(uint8_t address, uint16_t timeout) {
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(KC_A) //
LAYOUT_ortho_1x1(KC_A)
};
void do_scan(void) {

View file

@ -1,5 +1,5 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( RESET )
LAYOUT_ortho_1x1(RESET)
};

View file

@ -1,11 +1,11 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( RGB_MOD )
LAYOUT_ortho_1x1(RGB_MOD)
};
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
}

View file

@ -18,8 +18,8 @@
#include "quantum.h"
#define LAYOUT( \
#define LAYOUT_ortho_1x1( \
k00 \
) { \
{ k00 } \
) { \
{ k00 } \
}

View file

@ -2,11 +2,6 @@
/* This keyboard/layout is used to test community layout discovery/compilation. */
#define _DEFAULT 0
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT (
KC_B
),
LAYOUT_ortho_1x1(KC_B)
};