summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired/onekey/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/onekey/keymaps')
-rw-r--r--keyboards/handwired/onekey/keymaps/adc/keymap.c34
-rw-r--r--keyboards/handwired/onekey/keymaps/adc/rules.mk3
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/config.h5
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/keymap.c14
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/rules.mk2
-rw-r--r--keyboards/handwired/onekey/keymaps/backlight/config.h3
-rw-r--r--keyboards/handwired/onekey/keymaps/backlight/keymap.c39
-rw-r--r--keyboards/handwired/onekey/keymaps/backlight/rules.mk2
-rw-r--r--keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h12
-rw-r--r--keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c47
-rw-r--r--keyboards/handwired/onekey/keymaps/console/keymap.c20
-rw-r--r--keyboards/handwired/onekey/keymaps/default/keymap.c5
-rw-r--r--keyboards/handwired/onekey/keymaps/digitizer/keymap.c38
-rw-r--r--keyboards/handwired/onekey/keymaps/digitizer/rules.mk1
-rw-r--r--keyboards/handwired/onekey/keymaps/eep_rst/keymap.c5
-rw-r--r--keyboards/handwired/onekey/keymaps/haptic/keymap.c11
-rw-r--r--keyboards/handwired/onekey/keymaps/haptic/rules.mk2
-rw-r--r--keyboards/handwired/onekey/keymaps/hardware_id/keymap.c28
-rw-r--r--keyboards/handwired/onekey/keymaps/i2c_scanner/config.h6
-rw-r--r--keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c66
-rw-r--r--keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md36
-rw-r--r--keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk3
-rw-r--r--keyboards/handwired/onekey/keymaps/joystick/config.h4
-rw-r--r--keyboards/handwired/onekey/keymaps/joystick/keymap.c24
-rw-r--r--keyboards/handwired/onekey/keymaps/joystick/rules.mk1
-rw-r--r--keyboards/handwired/onekey/keymaps/oled/keymap.c459
-rw-r--r--keyboards/handwired/onekey/keymaps/oled/readme.md23
-rw-r--r--keyboards/handwired/onekey/keymaps/oled/rules.mk3
-rw-r--r--keyboards/handwired/onekey/keymaps/quine/keymap.c60
-rw-r--r--keyboards/handwired/onekey/keymaps/reboot/keymap.c5
-rw-r--r--keyboards/handwired/onekey/keymaps/reset/keymap.c5
-rw-r--r--keyboards/handwired/onekey/keymaps/rgb/config.h4
-rw-r--r--keyboards/handwired/onekey/keymaps/rgb/keymap.c11
-rw-r--r--keyboards/handwired/onekey/keymaps/rgb/rules.mk1
34 files changed, 0 insertions, 982 deletions
diff --git a/keyboards/handwired/onekey/keymaps/adc/keymap.c b/keyboards/handwired/onekey/keymaps/adc/keymap.c
deleted file mode 100644
index f9302a42b2..0000000000
--- a/keyboards/handwired/onekey/keymaps/adc/keymap.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "analog.h"
-#include <stdio.h>
-
-enum custom_keycodes {
- ADC_SAMPLE = SAFE_RANGE,
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(ADC_SAMPLE)
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case ADC_SAMPLE:
- if (record->event.pressed) {
- int16_t val = analogReadPin(ADC_PIN);
-
- char buffer[50];
- sprintf(buffer, "ADC:%u\n", val);
-#ifdef CONSOLE_ENABLE
- printf(buffer);
-#else
- send_string(buffer);
-#endif
- }
- break;
- }
- return false;
-};
-
-// adc_mux pinToMux(pin_t pin) {
-// return TO_MUX(ADC_CHANNEL_IN1, 0);
-// };
diff --git a/keyboards/handwired/onekey/keymaps/adc/rules.mk b/keyboards/handwired/onekey/keymaps/adc/rules.mk
deleted file mode 100644
index a691d5488f..0000000000
--- a/keyboards/handwired/onekey/keymaps/adc/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-SRC += analog.c
-
-CONSOLE_ENABLE = yes
diff --git a/keyboards/handwired/onekey/keymaps/apa102/config.h b/keyboards/handwired/onekey/keymaps/apa102/config.h
deleted file mode 100644
index aeb22a261b..0000000000
--- a/keyboards/handwired/onekey/keymaps/apa102/config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-#define RGBLED_NUM 40
-#define APA102_DEFAULT_BRIGHTNESS 5
-#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/handwired/onekey/keymaps/apa102/keymap.c b/keyboards/handwired/onekey/keymaps/apa102/keymap.c
deleted file mode 100644
index 700755a452..0000000000
--- a/keyboards/handwired/onekey/keymaps/apa102/keymap.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "apa102.h" // Only needed if you want to use the global brightness function
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(RGB_MOD)
-};
-
-void keyboard_post_init_user(void) {
- apa102_set_brightness(5);
-
- rgblight_enable_noeeprom();
- rgblight_sethsv_noeeprom_cyan();
- rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
-}
diff --git a/keyboards/handwired/onekey/keymaps/apa102/rules.mk b/keyboards/handwired/onekey/keymaps/apa102/rules.mk
deleted file mode 100644
index 70932cb751..0000000000
--- a/keyboards/handwired/onekey/keymaps/apa102/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = yes
-RGBLIGHT_DRIVER = APA102
diff --git a/keyboards/handwired/onekey/keymaps/backlight/config.h b/keyboards/handwired/onekey/keymaps/backlight/config.h
deleted file mode 100644
index af01528b43..0000000000
--- a/keyboards/handwired/onekey/keymaps/backlight/config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#define BACKLIGHT_BREATHING
diff --git a/keyboards/handwired/onekey/keymaps/backlight/keymap.c b/keyboards/handwired/onekey/keymaps/backlight/keymap.c
deleted file mode 100644
index 1fbbc632da..0000000000
--- a/keyboards/handwired/onekey/keymaps/backlight/keymap.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include QMK_KEYBOARD_H
-
-//Tap Dance Declarations
-enum {
- TD_BL = 0
-};
-
-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;
-#ifdef BACKLIGHT_BREATHING
- case 2:
- // double tap - toggle breathing
- breathing_toggle();
- break;
- case 3:
- // triple tap - do some pulse stuff
- breathing_pulse();
- break;
-#endif
- default:
- break;
- }
-}
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset)
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(TD(TD_BL))
-};
diff --git a/keyboards/handwired/onekey/keymaps/backlight/rules.mk b/keyboards/handwired/onekey/keymaps/backlight/rules.mk
deleted file mode 100644
index 176e099770..0000000000
--- a/keyboards/handwired/onekey/keymaps/backlight/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-BACKLIGHT_ENABLE = yes
-TAP_DANCE_ENABLE = yes
diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h
deleted file mode 100644
index 0c75fa3044..0000000000
--- a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2022 Stefan Kerkmann
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#if !defined(QMK_WAITING_TEST_BUSY_PIN)
-# define QMK_WAITING_TEST_BUSY_PIN A8
-#endif
-
-#if !defined(QMK_WAITING_TEST_YIELD_PIN)
-# define QMK_WAITING_TEST_YIELD_PIN A9
-#endif
diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
deleted file mode 100644
index ecf67d3b3c..0000000000
--- a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2022 Stefan Kerkmann
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(KC_A)};
-
-#if defined(__AVR__)
-# pragma message "AVR uses polled waiting by default, running theses tests will not show any difference"
-static inline void chThdSleepMicroseconds(uint32_t us) {
- wait_us(us);
-}
-#endif
-
-void keyboard_post_init_user(void) {
- setPinOutput(QMK_WAITING_TEST_BUSY_PIN);
- setPinOutput(QMK_WAITING_TEST_YIELD_PIN);
-}
-
-static inline void wait_us_polling_with_strobe(uint32_t us) {
- writePinHigh(QMK_WAITING_TEST_BUSY_PIN);
- wait_us(us);
- writePinLow(QMK_WAITING_TEST_BUSY_PIN);
-}
-
-static inline void wait_us_yield_with_strobe(uint32_t us) {
- writePinHigh(QMK_WAITING_TEST_YIELD_PIN);
- chThdSleepMicroseconds(us);
- writePinLow(QMK_WAITING_TEST_YIELD_PIN);
-}
-
-static const uint32_t waiting_values[] = {0, 1, 5, 10, 25, 50, 100, 150, 200, 500, 1000};
-
-void housekeeping_task_user(void) {
- static uint32_t last_bench = 0;
- if (timer_elapsed32(last_bench) > 500) {
- for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) {
- wait_us_polling_with_strobe(waiting_values[i]);
- wait_us(10);
- }
- for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) {
- wait_us_yield_with_strobe(waiting_values[i]);
- wait_us(10);
- }
- last_bench = timer_read32();
- }
-}
diff --git a/keyboards/handwired/onekey/keymaps/console/keymap.c b/keyboards/handwired/onekey/keymaps/console/keymap.c
deleted file mode 100644
index b47fb59d17..0000000000
--- a/keyboards/handwired/onekey/keymaps/console/keymap.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include QMK_KEYBOARD_H
-
-enum custom_keycodes {
- KC_HELLO = SAFE_RANGE,
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(KC_HELLO)
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case KC_HELLO:
- if (record->event.pressed) {
- println("Hello world!");
- }
- return false;
- }
- return true;
-}
diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c
deleted file mode 100644
index a5782f7a13..0000000000
--- a/keyboards/handwired/onekey/keymaps/default/keymap.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(KC_A)
-};
diff --git a/keyboards/handwired/onekey/keymaps/digitizer/keymap.c b/keyboards/handwired/onekey/keymaps/digitizer/keymap.c
deleted file mode 100644
index 6b304e86fe..0000000000
--- a/keyboards/handwired/onekey/keymaps/digitizer/keymap.c
+++ /dev/null
@@ -1,38 +0,0 @@
- /* Copyright 2021 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include QMK_KEYBOARD_H
-
-#include "digitizer.h"
-
-#include "math.h"
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(KC_A)};
-
-uint32_t timer = 0;
-
-void matrix_scan_user() {
- if (timer_elapsed32(timer) < 200) {
- return;
- }
-
- timer = timer_read32();
- digitizer_t digitizer;
- digitizer.x = 0.5 - 0.2 * cos(timer_read() / 250. / 6.28);
- digitizer.y = 0.5 - 0.2 * sin(timer_read() / 250. / 6.28);
- digitizer.tipswitch = 0;
- digitizer.inrange = 1;
- digitizer_set_report(digitizer);
-}
diff --git a/keyboards/handwired/onekey/keymaps/digitizer/rules.mk b/keyboards/handwired/onekey/keymaps/digitizer/rules.mk
deleted file mode 100644
index ea9f9bd9ac..0000000000
--- a/keyboards/handwired/onekey/keymaps/digitizer/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DIGITIZER_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c b/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c
deleted file mode 100644
index 3f7a6b8502..0000000000
--- a/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(EEP_RST)
-};
diff --git a/keyboards/handwired/onekey/keymaps/haptic/keymap.c b/keyboards/handwired/onekey/keymaps/haptic/keymap.c
deleted file mode 100644
index e3b0093c18..0000000000
--- a/keyboards/handwired/onekey/keymaps/haptic/keymap.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(KC_A)
-};
-
-void haptic_enable(void);
-
-void keyboard_post_init_user(void) {
- haptic_enable();
-}
diff --git a/keyboards/handwired/onekey/keymaps/haptic/rules.mk b/keyboards/handwired/onekey/keymaps/haptic/rules.mk
deleted file mode 100644
index 802f7e5dde..0000000000
--- a/keyboards/handwired/onekey/keymaps/haptic/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-HAPTIC_ENABLE = yes
-HAPTIC_DRIVER = SOLENOID
diff --git a/keyboards/handwired/onekey/keymaps/hardware_id/keymap.c b/keyboards/handwired/onekey/keymaps/hardware_id/keymap.c
deleted file mode 100644
index bcec8b3ca1..0000000000
--- a/keyboards/handwired/onekey/keymaps/hardware_id/keymap.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "hardware_id.h"
-#include <stdio.h>
-enum custom_keycodes {
- DUMP_ID = SAFE_RANGE,
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(DUMP_ID)
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case DUMP_ID:
- if (record->event.pressed) {
- hardware_id_t id = get_hardware_id();
- char buffer[100];
- sprintf(buffer, "ID:%lu:%lu:%lu:%lu\n", id.data[0], id.data[1], id.data[2], id.data[3]);
-#ifdef CONSOLE_ENABLE
- printf(buffer);
-#else
- send_string(buffer);
-#endif
- }
- break;
- }
- return false;
-};
diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/config.h b/keyboards/handwired/onekey/keymaps/i2c_scanner/config.h
deleted file mode 100644
index 42ab08e36e..0000000000
--- a/keyboards/handwired/onekey/keymaps/i2c_scanner/config.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-// AVR: can change to other supported values
-#define F_SCL 100000UL
-
-// TODO: add some default ARM configs for i2cv1 and i2cv2
diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c
deleted file mode 100644
index ea8443709d..0000000000
--- a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#include "i2c_master.h"
-#include "debug.h"
-
-#define TIMEOUT 50
-
-// TODO: remove patch
-#ifdef PROTOCOL_CHIBIOS
-# pragma message("ChibiOS is currently 'best effort' and might not report accurate results")
-
-i2c_status_t i2c_start_bodge(uint8_t address, uint16_t timeout) {
- i2c_start(address);
-
- // except on ChibiOS where the only way is do do "something"
- uint8_t data = 0;
- return i2c_readReg(address, 0, &data, sizeof(data), TIMEOUT);
-}
-
-# define i2c_start i2c_start_bodge
-#endif
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(KC_A)
-};
-
-void do_scan(void) {
- uint8_t nDevices = 0;
-
- dprintf("Scanning...\n");
-
- for (uint8_t address = 1; address < 127; address++) {
- // The i2c_scanner uses the return value of
- // i2c_start to see if a device did acknowledge to the address.
- i2c_status_t error = i2c_start(address << 1, TIMEOUT);
- if (error == I2C_STATUS_SUCCESS) {
- i2c_stop();
- dprintf(" I2C device found at address 0x%02X\n", address);
- nDevices++;
- } else {
- // dprintf(" Unknown error (%u) at address 0x%02X\n", error, address);
- }
- }
-
- if (nDevices == 0)
- dprintf("No I2C devices found\n");
- else
- dprintf("done\n");
-}
-
-uint16_t scan_timer = 0;
-
-void matrix_scan_user(void) {
- if (timer_elapsed(scan_timer) > 5000) {
- do_scan();
- scan_timer = timer_read();
- }
-}
-
-void keyboard_post_init_user(void) {
- debug_enable = true;
- debug_matrix = true;
-
- i2c_init();
- scan_timer = timer_read();
-}
diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md b/keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md
deleted file mode 100644
index ce6357a9c2..0000000000
--- a/keyboards/handwired/onekey/keymaps/i2c_scanner/readme.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# i2c_scanner
-
-Aiming to provide a more qmk friendly version of <https://playground.arduino.cc/Main/I2cScanner/>
-
-> This very simple ~~sketch~~ keymap scans the I2C-bus for devices. If a device is found, it is reported to the ~~Arduino serial monitor~~ console.
-
-
-## Flashing
-
-Pick a target that is aligned to the MCU you want to test:
-
-```console
-make handwired/onekey/elite_c:i2c_scanner:flash # also 32u4 + dfu bootloader
-make handwired/onekey/promicro:i2c_scanner:flash
-make handwired/onekey/teensy_2:i2c_scanner:flash
-
-# ChibiOS is currently 'best effort' and might not report accurate results
-make handwired/onekey/proton_c:i2c_scanner:flash
-```
-
-others might work with additional configuration.
-
-## Usage
-
-Output is viewable through a compatible tool <https://docs.qmk.fm/#/newbs_testing_debugging?id=debugging-tools>.
-
-You can change the wires, and plug-in I2C devices while the i2c_scanner is running.
-
-The output of the console will look like this:
-
-```
-Listening:
-Scanning...
- I2C device found at address 0x20
-done
-```
diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk b/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk
deleted file mode 100644
index 04498a8831..0000000000
--- a/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-CONSOLE_ENABLE = yes
-
-QUANTUM_LIB_SRC += i2c_master.c
diff --git a/keyboards/handwired/onekey/keymaps/joystick/config.h b/keyboards/handwired/onekey/keymaps/joystick/config.h
deleted file mode 100644
index a3b5858ad2..0000000000
--- a/keyboards/handwired/onekey/keymaps/joystick/config.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-#define JOYSTICK_AXES_COUNT 2
-#define JOYSTICK_BUTTON_COUNT 1
diff --git a/keyboards/handwired/onekey/keymaps/joystick/keymap.c b/keyboards/handwired/onekey/keymaps/joystick/keymap.c
deleted file mode 100644
index 7a2f138b28..0000000000
--- a/keyboards/handwired/onekey/keymaps/joystick/keymap.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#ifndef ADC_PIN
-# define ADC_PIN F6
-#endif
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(JS_BUTTON0)
-};
-
-void matrix_scan_user() {
- int16_t val = (((uint32_t)timer_read() % 5000 - 2500) * 255) / 5000;
-
- if (val != joystick_status.axes[1]) {
- joystick_status.axes[1] = val;
- joystick_status.status |= JS_UPDATED;
- }
-}
-
-// Joystick config
-joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
- [0] = JOYSTICK_AXIS_IN(ADC_PIN, 0, 512, 1023),
- [1] = JOYSTICK_AXIS_VIRTUAL
-};
diff --git a/keyboards/handwired/onekey/keymaps/joystick/rules.mk b/keyboards/handwired/onekey/keymaps/joystick/rules.mk
deleted file mode 100644
index 9e44c470f2..0000000000
--- a/keyboards/handwired/onekey/keymaps/joystick/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-JOYSTICK_ENABLE = yes
diff --git a/keyboards/handwired/onekey/keymaps/oled/keymap.c b/keyboards/handwired/onekey/keymaps/oled/keymap.c
deleted file mode 100644
index 244dc4facb..0000000000
--- a/keyboards/handwired/onekey/keymaps/oled/keymap.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/* Copyright 2020 Sergey Vlasov <sigprof@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include QMK_KEYBOARD_H
-
-enum tap_dances {
- TD_OLED,
-};
-
-enum oled_test_modes {
- // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress.
- TEST_FIRST,
- TEST_LOGO = TEST_FIRST,
- TEST_CHARACTERS,
- TEST_SLOW_UPDATE,
- TEST_ALL_ON,
- TEST_FRAME,
- TEST_ALL_OFF,
- TEST_FILL_HORZ_0,
- TEST_FILL_HORZ_1,
- TEST_FILL_VERT_0,
- TEST_FILL_VERT_1,
- TEST_FILL_CHECKERBOARD_1,
- TEST_FILL_CHECKERBOARD_2,
- TEST_FILL_CHECKERBOARD_4,
- TEST_LAST = TEST_FILL_CHECKERBOARD_4,
-
- // Special modes which are not reachable normally.
- TEST_DRAW_ALWAYS_ON,
- TEST_DRAW_ALWAYS_OFF,
-};
-
-static enum oled_test_modes test_mode = TEST_FIRST;
-
-static oled_rotation_t rotation = OLED_ROTATION_0;
-
-static bool scrolling;
-static uint8_t scrolling_speed;
-static bool need_update = true;
-static bool draw_always;
-static bool update_speed_test;
-static uint32_t update_speed_start_timer;
-static uint16_t update_speed_count;
-static bool restart_test;
-
-static void stop_scrolling(void) {
- if (scrolling) {
- oled_scroll_off();
- scrolling = false;
- }
-}
-
-static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) {
- switch (state->count) {
- case 1:
- if (state->pressed) {
- // single hold - step through rotations
- switch (rotation) {
- case OLED_ROTATION_0:
- rotation = OLED_ROTATION_90;
- break;
- case OLED_ROTATION_90:
- rotation = OLED_ROTATION_180;
- break;
- case OLED_ROTATION_180:
- rotation = OLED_ROTATION_270;
- break;
- default:
- rotation = OLED_ROTATION_0;
- break;
- }
- stop_scrolling();
- oled_init(rotation);
- } else {
- // single tap - step through test modes
- if (test_mode < TEST_LAST) {
- ++test_mode;
- } else {
- test_mode = TEST_FIRST;
- }
- stop_scrolling();
- oled_clear();
- }
- restart_test = true;
- need_update = true;
- break;
-
- case 2:
- if (state->pressed) {
- // tap + hold - change scrolling speed
- scrolling_speed = (scrolling_speed + 1) % 8;
- stop_scrolling();
- oled_scroll_set_speed(scrolling_speed);
- // Cannot reactivate scrolling here, because oled_scroll_off()
- // marks the whole display as dirty, and oled_scroll_left()
- // silently does nothing if either the display is dirty or
- // scrolling is already active.
- } else {
- // double tap - toggle scrolling
- if (!scrolling) {
- scrolling = true;
- oled_scroll_left();
- } else {
- scrolling = false;
- oled_scroll_off();
- }
- }
- need_update = true;
- break;
-
- case 3:
- if (state->pressed) {
- // double tap + hold - toggle `draw_always`
- draw_always = !draw_always;
- if (draw_always) {
- test_mode = TEST_DRAW_ALWAYS_ON;
- } else {
- test_mode = TEST_DRAW_ALWAYS_OFF;
- }
- stop_scrolling();
- oled_clear();
- restart_test = true;
- need_update = true;
- } else {
- // triple tap - toggle update speed test
- update_speed_test = !update_speed_test;
- if (update_speed_test) {
- stop_scrolling();
- update_speed_start_timer = timer_read32();
- update_speed_count = 0;
- }
- }
- break;
- case 4:
- if (!state->pressed) {
- // quadruple tap - step through brightness levels
- oled_set_brightness(oled_get_brightness() + 0x10);
- }
- break;
- default:
- break;
- }
-}
-
-qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))};
-
-// `bool oled_is_dirty(void)` does not exist at the moment
-extern OLED_BLOCK_TYPE oled_dirty;
-
-static inline uint8_t pixel_width(void) {
- if (!(rotation & OLED_ROTATION_90)) {
- return OLED_DISPLAY_WIDTH;
- }
- return OLED_DISPLAY_HEIGHT;
-}