[Keyboard] Add micromod stuff
[Keyboard] Fix warning at compile time for Onekey Micromod
This commit is contained in:
parent
b181287787
commit
4d9d834a98
28
keyboards/handwired/onekey/micromod/rp2040/config.h
Normal file
28
keyboards/handwired/onekey/micromod/rp2040/config.h
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2022 Stefan Kerkmann
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define QMK_WAITING_TEST_BUSY_PIN GP25
|
||||
// #define QMK_WAITING_TEST_YIELD_PIN GP9
|
||||
|
||||
#define I2C_DRIVER I2CD0
|
||||
#define I2C1_SDA_PIN GP4
|
||||
#define I2C1_SCL_PIN GP5
|
||||
#define I2C1_CLOCK_SPEED 400000
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD4
|
||||
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A
|
||||
|
||||
#define AUDIO_PIN GP13
|
||||
#define AUDIO_PWM_DRIVER PWMD6
|
||||
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B
|
||||
#define AUDIO_SHUTDOWN_PIN GP26
|
||||
#define AUDIO_INIT_DELAY
|
||||
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 750U
|
||||
|
||||
#define ENCODERS_PAD_A { GP6 }
|
||||
#define ENCODERS_PAD_B { GP7 }
|
10
keyboards/handwired/onekey/micromod/rp2040/halconf.h
Normal file
10
keyboards/handwired/onekey/micromod/rp2040/halconf.h
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2022 Stefan Kerkmann
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_ADC TRUE
|
||||
|
||||
#include_next <halconf.h>
|
15
keyboards/handwired/onekey/micromod/rp2040/info.json
Normal file
15
keyboards/handwired/onekey/micromod/rp2040/info.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "ATP MicroMod RP2040",
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"matrix_pins": {
|
||||
"cols": ["GP18"],
|
||||
"rows": ["GP20"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "GP24"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "GP24"
|
||||
}
|
||||
}
|
17
keyboards/handwired/onekey/micromod/rp2040/mcuconf.h
Normal file
17
keyboards/handwired/onekey/micromod/rp2040/mcuconf.h
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2022 Stefan Kerkmann
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_PWM_USE_PWM4
|
||||
#define RP_PWM_USE_PWM4 TRUE
|
||||
|
||||
#undef RP_PWM_USE_PWM6
|
||||
#define RP_PWM_USE_PWM6 TRUE
|
||||
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#define RP_I2C_USE_I2C0 TRUE
|
||||
|
||||
#define RP_IRQ_RTC_PRIORITY 3
|
12
keyboards/handwired/onekey/micromod/rp2040/readme.md
Normal file
12
keyboards/handwired/onekey/micromod/rp2040/readme.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Raspberry Pi 2040 onekey
|
||||
|
||||
To trigger keypress, short together pins *GP4* and *GP5*.
|
||||
|
||||
Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk.
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
* Raspberry Pi Pico
|
||||
* SparkFun Pro Micro - RP2040
|
||||
* Adafruit KB2040 - RP2040 Kee Boar
|
||||
* ...and many more RP2040 based development boards
|
8
keyboards/handwired/onekey/micromod/rp2040/rp2040.c
Normal file
8
keyboards/handwired/onekey/micromod/rp2040/rp2040.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "quantum.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(GP25);
|
||||
writePinLow(GP25);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
2
keyboards/handwired/onekey/micromod/rp2040/rules.mk
Normal file
2
keyboards/handwired/onekey/micromod/rp2040/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
AUDIO_ENABLE = yes
|
||||
AUDIO_DRIVER = pwm_hardware
|
28
keyboards/handwired/onekey/micromod/stm32f405/config.h
Normal file
28
keyboards/handwired/onekey/micromod/stm32f405/config.h
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2022 Stefan Kerkmann
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define QMK_WAITING_TEST_BUSY_PIN A15
|
||||
// #define QMK_WAITING_TEST_YIELD_PIN GP9
|
||||
|
||||
#define I2C_DRIVER I2CD2
|
||||
#define I2C1_SDA_PIN B11
|
||||
#define I2C1_SCL_PIN B10
|
||||
|
||||
#define I2C1_CLOCK_SPEED 400000
|
||||
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD8
|
||||
#define BACKLIGHT_PWM_CHANNEL 2
|
||||
|
||||
#define AUDIO_PIN C6
|
||||
|
||||
#define AUDIO_PWM_DRIVER PWMD8
|
||||
#define AUDIO_PWM_CHANNEL 1
|
||||
#define AUDIO_PWM_PAL_MODE 3
|
||||
#define AUDIO_SHUTDOWN_PIN C5
|
||||
#define AUDIO_INIT_DELAY
|
||||
|
||||
#define ENCODERS_PAD_A { C0 }
|
||||
#define ENCODERS_PAD_B { C1 }
|
30
keyboards/handwired/onekey/micromod/stm32f405/halconf.h
Normal file
30
keyboards/handwired/onekey/micromod/stm32f405/halconf.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_ADC TRUE
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#define HAL_USE_GPT TRUE
|
||||
#define HAL_USE_DAC TRUE
|
||||
|
||||
#include_next <halconf.h>
|
15
keyboards/handwired/onekey/micromod/stm32f405/info.json
Normal file
15
keyboards/handwired/onekey/micromod/stm32f405/info.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "ATP MicroMod STM32F405",
|
||||
"processor": "STM32F405",
|
||||
"bootloader": "stm32-dfu",
|
||||
"matrix_pins": {
|
||||
"cols": ["A0"],
|
||||
"rows": ["C9"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "C7"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "C7"
|
||||
}
|
||||
}
|
42
keyboards/handwired/onekey/micromod/stm32f405/mcuconf.h
Normal file
42
keyboards/handwired/onekey/micromod/stm32f405/mcuconf.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
||||
#undef STM32_I2C_USE_I2C2
|
||||
#define STM32_I2C_USE_I2C2 TRUE
|
||||
|
||||
#undef STM32_SPI_USE_SPI1
|
||||
#define STM32_SPI_USE_SPI1 TRUE
|
||||
|
||||
#undef STM32_PWM_USE_TIM3
|
||||
#define STM32_PWM_USE_TIM3 TRUE
|
||||
|
||||
#undef STM32_PWM_USE_TIM8
|
||||
#define STM32_PWM_USE_TIM8 TRUE
|
||||
|
||||
#undef STM32_DAC_USE_DAC1_CH1
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#undef STM32_DAC_USE_DAC1_CH2
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
|
||||
#undef STM32_GPT_USE_TIM6
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
7
keyboards/handwired/onekey/micromod/stm32f405/readme.md
Normal file
7
keyboards/handwired/onekey/micromod/stm32f405/readme.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Adafruit Feather STM32F405 Express onekey
|
||||
|
||||
* Supported Hardware: [Adafruit Feather STM32F405 Express](https://www.adafruit.com/product/4382)
|
||||
|
||||
To trigger keypress, short together pins *GPIO 12 / PC2* and *GPIO 11 / PC3*.
|
||||
|
||||
https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details#enabling-dfu-bootloader-mode-3045622-2
|
1
keyboards/handwired/onekey/micromod/stm32f405/rules.mk
Normal file
1
keyboards/handwired/onekey/micromod/stm32f405/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
AUDIO_DRIVER = pwm_hardware
|
@ -0,0 +1,8 @@
|
||||
#include "quantum.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A15);
|
||||
writePinLow(A15);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
Loading…
Reference in New Issue
Block a user