mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
Merge 60f6f30808
into 9bea332a21
This commit is contained in:
commit
2cac2d74c7
45
keyboards/draytronics/daisy_v2/config.h
Normal file
45
keyboards/draytronics/daisy_v2/config.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*Copyright 2024 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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/>.
|
||||
|
||||
This code is inspired by and adapted from the code used in the Printed Pad by Noah Beidelman (@noahbei)
|
||||
|
||||
It also references the concept of glitching animations from Aleks (@aleksbrgt)
|
||||
|
||||
The pixel graphics used here are from a combination of sources;
|
||||
|
||||
1. Layer indicators are created by myself and free to use by anyone.
|
||||
2. "Revengeday", "Cyber Cafe", "Cortex Implant" logos are used with kind permission of OBEY THE SYSTEM.
|
||||
A collective of Fediverse instances and creatives. https://git.cyberwa.re/obey-the-system.
|
||||
They are licenced as Non-Commercial and for use by members of the network, with attribution.
|
||||
3. Key press indicator graphics were commissioned for this project and were designed by the
|
||||
amazing https://corteximplant.com/@jadedtwin / https://www.jadedtwin.com/
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// Config for the STM32F072 to configure the OLED display via I2C.
|
||||
#define I2C_DRIVER I2CD1
|
||||
#define I2C1_SCL_PIN B8
|
||||
#define I2C1_SDA_PIN B9
|
||||
#define I2C1_SCL_PAL_MODE 1
|
||||
#define I2C1_SDA_PAL_MODE 1
|
||||
#define I2C1_TIMINGR_PRESC 0x00U
|
||||
#define I2C1_TIMINGR_SCLDEL 0x03U
|
||||
#define I2C1_TIMINGR_SDADEL 0x01U
|
||||
#define I2C1_TIMINGR_SCLH 0x03U
|
||||
#define I2C1_TIMINGR_SCLL 0x09U
|
||||
|
||||
#define OLED_TIMEOUT 300000
|
35
keyboards/draytronics/daisy_v2/daisy_v2.c
Normal file
35
keyboards/draytronics/daisy_v2/daisy_v2.c
Normal file
@ -0,0 +1,35 @@
|
||||
/*Copyright 2024 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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/>.
|
||||
|
||||
This code is inspired by and adapted from the code used in the Printed Pad by Noah Beidelman (@noahbei)
|
||||
|
||||
It also references the concept of glitching animations from Aleks (@aleksbrgt)
|
||||
|
||||
The pixel graphics used here are from a combination of sources;
|
||||
|
||||
1. Layer indicators are created by myself and free to use by anyone.
|
||||
2. "Revengeday", "Cyber Cafe", "Cortex Implant" logos are used with kind permission of OBEY THE SYSTEM.
|
||||
A collective of Fediverse instances and creatives. https://git.cyberwa.re/obey-the-system.
|
||||
They are licenced as Non-Commercial and for use by members of the network, with attribution.
|
||||
3. Key press indicator graphics were commissioned for this project and were designed by the
|
||||
amazing https://corteximplant.com/@jadedtwin / https://www.jadedtwin.com/
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
void board_init(void) {
|
||||
SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
|
||||
}
|
35
keyboards/draytronics/daisy_v2/halconf.h
Normal file
35
keyboards/draytronics/daisy_v2/halconf.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*Copyright 2024 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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/>.
|
||||
|
||||
This code is inspired by and adapted from the code used in the Printed Pad by Noah Beidelman (@noahbei)
|
||||
|
||||
It also references the concept of glitching animations from Aleks (@aleksbrgt)
|
||||
|
||||
The pixel graphics used here are from a combination of sources;
|
||||
|
||||
1. Layer indicators are created by myself and free to use by anyone.
|
||||
2. "Revengeday", "Cyber Cafe", "Cortex Implant" logos are used with kind permission of OBEY THE SYSTEM.
|
||||
A collective of Fediverse instances and creatives. https://git.cyberwa.re/obey-the-system.
|
||||
They are licenced as Non-Commercial and for use by members of the network, with attribution.
|
||||
3. Key press indicator graphics were commissioned for this project and were designed by the
|
||||
amazing https://corteximplant.com/@jadedtwin / https://www.jadedtwin.com/
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next <halconf.h>
|
67
keyboards/draytronics/daisy_v2/keyboard.json
Normal file
67
keyboards/draytronics/daisy_v2/keyboard.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"manufacturer": "Draytronics",
|
||||
"keyboard_name": "DAISY",
|
||||
"maintainer": "ghostseven",
|
||||
"bootloader": "stm32-dfu",
|
||||
"diode_direction": "COL2ROW",
|
||||
"encoder": {
|
||||
"enabled": true,
|
||||
"rotary": [
|
||||
{"pin_a": "A14", "pin_b": "A15"}
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"encoder": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"oled": true,
|
||||
"rgblight": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["B11", "B10", "B2", "B1"],
|
||||
"rows": ["A2", "A1", "A0"]
|
||||
},
|
||||
"processor": "STM32F072",
|
||||
"qmk": {
|
||||
"tap_keycode_delay": 10
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 4,
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"url": "https://www.draytronics.co.uk/daisy",
|
||||
"usb": {
|
||||
"device_version": "2.0.0",
|
||||
"pid": "0x4441",
|
||||
"vid": "0x4454"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B12"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
118
keyboards/draytronics/daisy_v2/keymaps/default/keymap.c
Normal file
118
keyboards/draytronics/daisy_v2/keymaps/default/keymap.c
Normal file
@ -0,0 +1,118 @@
|
||||
/*Copyright 2024 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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/>.
|
||||
|
||||
This code is inspired by and adapted from the code used in the Printed Pad by Noah Beidelman (@noahbei)
|
||||
|
||||
It also references the concept of glitching animations from Aleks (@aleksbrgt)
|
||||
|
||||
The pixel graphics used here are from a combination of sources;
|
||||
|
||||
1. Layer indicators are created by myself and free to use by anyone.
|
||||
2. "Revengeday", "Cyber Cafe", "Cortex Implant" logos are used with kind permission of OBEY THE SYSTEM.
|
||||
A collective of Fediverse instances and creatives. https://git.cyberwa.re/obey-the-system.
|
||||
They are licenced as Non-Commercial and for use by members of the network, with attribution.
|
||||
3. Key press indicator graphics were commissioned for this project and were designed by the
|
||||
amazing https://corteximplant.com/@jadedtwin / https://www.jadedtwin.com/
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_BASE,
|
||||
_CODE
|
||||
};
|
||||
|
||||
enum my_keycodes {
|
||||
ENCODER_PRESS = QK_USER,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* ┌────────────┐
|
||||
* │* See Note *│
|
||||
* ├────────────┼────────────┬────────────┬─────────────┐
|
||||
* │ Code Layer │ Media Next │ Media Prev │ Media Pause │
|
||||
* ├────────────┼────────────┼────────────┼─────────────┤
|
||||
* │ Prev Desk │ Miss Ctrl │ App Window │ Next Desk │
|
||||
* └────────────┴────────────┴────────────┴─────────────┘
|
||||
*/
|
||||
[_BASE] = LAYOUT(
|
||||
LT(0, ENCODER_PRESS),
|
||||
MO(_CODE), KC_MPRV, KC_MNXT, KC_MPLY,
|
||||
C(KC_LEFT), C(KC_UP), C(KC_DOWN), C(KC_RIGHT)
|
||||
),
|
||||
/*
|
||||
* ┌────────────┐
|
||||
* │* See Note *│
|
||||
* ├────────────┼────────────┬────────────┬─────────────┐
|
||||
* │ │ RGB Mode │ RBG Hue │ RGB Toggle │
|
||||
* ├────────────┼────────────┼────────────┼─────────────┤
|
||||
* │ Scrn Shot │ Force Quit │ GUI + F │ DFU Mode │
|
||||
* └────────────┴────────────┴────────────┴─────────────┘
|
||||
*/
|
||||
[_CODE] = LAYOUT(
|
||||
LT(0, ENCODER_PRESS),
|
||||
_______, RGB_MOD, RGB_HUI, RGB_TOG,
|
||||
G(S(KC_5)), G(A(KC_ESC)), G(KC_F), QK_BOOT
|
||||
)
|
||||
|
||||
/*
|
||||
* See Note *
|
||||
* Tapping on the rotary encoder switch will mute or unmute the volume.
|
||||
* Pressing and holding will cycle through the OLED modes, they are as follows;
|
||||
* 1. Layer indicator
|
||||
* 2. Revengeday glitch logo
|
||||
* 3. Cyber Cafe glitch logo
|
||||
* 4. Cortex Implant glitch logo
|
||||
* 5. Key press animation.
|
||||
*
|
||||
* By default the rotary encoder itself will adjust the volume but it can be adjusted by changing the encoder_update_user function.
|
||||
*/
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_CODE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
};
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case LT(0, ENCODER_PRESS):
|
||||
if (record->event.pressed) {
|
||||
// on tap
|
||||
if (record->tap.count) {
|
||||
tap_code(KC_MUTE);
|
||||
}
|
||||
#ifdef OLED_ENABLE
|
||||
// on hold
|
||||
else {
|
||||
void oled_display_mode_step(void);
|
||||
oled_display_mode_step();
|
||||
// hidden = false;
|
||||
// current_display_mode = (current_display_mode + 1) % 5;
|
||||
// // When mode changes update EEPROM.
|
||||
// kb_config.oled_mode = current_display_mode;
|
||||
// eeconfig_update_kb(kb_config.raw);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
1
keyboards/draytronics/daisy_v2/keymaps/default/rules.mk
Normal file
1
keyboards/draytronics/daisy_v2/keymaps/default/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
ENCODER_MAP_ENABLE = yes
|
36
keyboards/draytronics/daisy_v2/mcuconf.h
Normal file
36
keyboards/draytronics/daisy_v2/mcuconf.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*Copyright 2024 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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/>.
|
||||
|
||||
This code is inspired by and adapted from the code used in the Printed Pad by Noah Beidelman (@noahbei)
|
||||
|
||||
It also references the concept of glitching animations from Aleks (@aleksbrgt)
|
||||
|
||||
The pixel graphics used here are from a combination of sources;
|
||||
|
||||
1. Layer indicators are created by myself and free to use by anyone.
|
||||
2. "Revengeday", "Cyber Cafe", "Cortex Implant" logos are used with kind permission of OBEY THE SYSTEM.
|
||||
A collective of Fediverse instances and creatives. https://git.cyberwa.re/obey-the-system.
|
||||
They are licenced as Non-Commercial and for use by members of the network, with attribution.
|
||||
3. Key press indicator graphics were commissioned for this project and were designed by the
|
||||
amazing https://corteximplant.com/@jadedtwin / https://www.jadedtwin.com/
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
2417
keyboards/draytronics/daisy_v2/oled.c
Normal file
2417
keyboards/draytronics/daisy_v2/oled.c
Normal file
File diff suppressed because it is too large
Load Diff
26
keyboards/draytronics/daisy_v2/readme.md
Normal file
26
keyboards/draytronics/daisy_v2/readme.md
Normal file
@ -0,0 +1,26 @@
|
||||
# DAISY V2
|
||||
![daisy](https://i.imgur.com/42p02KD.png)
|
||||
|
||||
An open source macro pad with a rotary encoder and OLED panel, this is an alternative version to the original through hole Daisy kit. More info / PCB designs available at [draytronics.co.uk/daisyV2](https://www.draytronics.co.uk/daisyV2)
|
||||
|
||||
* Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven)
|
||||
* Hardware Supported: DAISY PCB V2 / STM32F072
|
||||
* Hardware Availability: [draytronics.co.uk](https://draytronics.co.uk)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make draytronics/daisy_v2:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make draytronics/daisy_v2:default:flash
|
||||
|
||||
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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the rotary encoder button and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
1
keyboards/draytronics/daisy_v2/rules.mk
Normal file
1
keyboards/draytronics/daisy_v2/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
SRC += oled.c
|
Loading…
Reference in New Issue
Block a user