mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 04:41:28 +00:00
Allow LVGL onekey keymap to be able compile for other board (#25005)
This commit is contained in:
parent
5a57d2115b
commit
02525f683e
@ -4,11 +4,25 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
/* ADC pin */
|
||||||
#define ADC_PIN A0
|
#define ADC_PIN A0
|
||||||
|
|
||||||
|
/* Backlight configs */
|
||||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||||
#define BACKLIGHT_PWM_CHANNEL 1
|
#define BACKLIGHT_PWM_CHANNEL 1
|
||||||
|
|
||||||
|
/* LCD configs */
|
||||||
|
#define LCD_RST_PIN A2
|
||||||
|
#define LCD_DC_PIN A3
|
||||||
|
#define LCD_CS_PIN A4
|
||||||
|
|
||||||
|
/* SPI pins */
|
||||||
|
#define SPI_DRIVER SPID1
|
||||||
|
#define SPI_SCK_PIN A5
|
||||||
|
#define SPI_MOSI_PIN A7
|
||||||
|
#define SPI_MISO_PIN A6
|
||||||
|
|
||||||
|
/* Haptic configs */
|
||||||
#define SOLENOID_PIN B12
|
#define SOLENOID_PIN B12
|
||||||
#define SOLENOID_PINS { B12, B13, B14, B15 }
|
#define SOLENOID_PINS { B12, B13, B14, B15 }
|
||||||
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
|
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
|
||||||
|
@ -10,4 +10,7 @@
|
|||||||
|
|
||||||
#define HAL_USE_PWM TRUE
|
#define HAL_USE_PWM TRUE
|
||||||
|
|
||||||
|
#define HAL_USE_SPI TRUE
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
|
||||||
#include_next <halconf.h>
|
#include_next <halconf.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"ws2812": {
|
"ws2812": {
|
||||||
"pin": "B0"
|
"pin": "B0"
|
||||||
}
|
},
|
||||||
"apa102": {
|
"apa102": {
|
||||||
"data_pin": "B0",
|
"data_pin": "B0",
|
||||||
"clock_pin": "B1"
|
"clock_pin": "B1"
|
||||||
|
@ -14,3 +14,6 @@
|
|||||||
|
|
||||||
#undef AT32_PWM_USE_TMR5
|
#undef AT32_PWM_USE_TMR5
|
||||||
#define AT32_PWM_USE_TMR5 TRUE
|
#define AT32_PWM_USE_TMR5 TRUE
|
||||||
|
|
||||||
|
#undef AT32_SPI_USE_SPI1
|
||||||
|
#define AT32_SPI_USE_SPI1 TRUE
|
||||||
|
@ -16,3 +16,13 @@
|
|||||||
#define I2C1_SDA_PIN GP12
|
#define I2C1_SDA_PIN GP12
|
||||||
#define I2C1_SCL_PIN GP13
|
#define I2C1_SCL_PIN GP13
|
||||||
|
|
||||||
|
/* LCD configs */
|
||||||
|
#define LCD_RST_PIN GP0
|
||||||
|
#define LCD_DC_PIN GP1
|
||||||
|
#define LCD_CS_PIN GP2
|
||||||
|
|
||||||
|
/* SPI pins */
|
||||||
|
#define SPI_DRIVER SPID0
|
||||||
|
#define SPI_SCK_PIN GP18
|
||||||
|
#define SPI_MOSI_PIN GP19
|
||||||
|
#define SPI_MISO_PIN GP20
|
||||||
|
22
keyboards/handwired/onekey/kb2040/halconf.h
Normal file
22
keyboards/handwired/onekey/kb2040/halconf.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/* Copyright 2020 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_SPI TRUE
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
|
||||||
|
#include_next <halconf.h>
|
@ -22,3 +22,6 @@
|
|||||||
|
|
||||||
#undef RP_I2C_USE_I2C1
|
#undef RP_I2C_USE_I2C1
|
||||||
#define RP_I2C_USE_I2C1 TRUE
|
#define RP_I2C_USE_I2C1 TRUE
|
||||||
|
|
||||||
|
#undef RP_SPI_USE_SPI0
|
||||||
|
#define RP_SPI_USE_SPI0 TRUE
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/* SPI pins */
|
|
||||||
#define SPI_DRIVER SPID0
|
|
||||||
#define SPI_SCK_PIN GP18
|
|
||||||
#define SPI_MOSI_PIN GP19
|
|
||||||
#define SPI_MISO_PIN GP20
|
|
||||||
|
|
||||||
/* LCD Configuration */
|
|
||||||
#define LCD_RST_PIN GP0
|
|
||||||
#define LCD_DC_PIN GP1
|
|
||||||
#define LCD_CS_PIN GP2
|
|
@ -1,12 +0,0 @@
|
|||||||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include_next <halconf.h>
|
|
||||||
|
|
||||||
#undef HAL_USE_SPI
|
|
||||||
#define HAL_USE_SPI TRUE
|
|
||||||
|
|
||||||
#undef SPI_USE_WAIT
|
|
||||||
#define SPI_USE_WAIT TRUE
|
|
@ -1,9 +0,0 @@
|
|||||||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include_next <mcuconf.h>
|
|
||||||
|
|
||||||
#undef RP_SPI_USE_SPI0
|
|
||||||
#define RP_SPI_USE_SPI0 TRUE
|
|
@ -17,3 +17,14 @@
|
|||||||
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A
|
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A
|
||||||
|
|
||||||
#define ADC_PIN GP26
|
#define ADC_PIN GP26
|
||||||
|
|
||||||
|
/* LCD configs */
|
||||||
|
#define LCD_RST_PIN GP0
|
||||||
|
#define LCD_DC_PIN GP1
|
||||||
|
#define LCD_CS_PIN GP2
|
||||||
|
|
||||||
|
/* SPI pins */
|
||||||
|
#define SPI_DRIVER SPID0
|
||||||
|
#define SPI_SCK_PIN GP18
|
||||||
|
#define SPI_MOSI_PIN GP19
|
||||||
|
#define SPI_MISO_PIN GP20
|
||||||
|
@ -4,7 +4,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define HAL_USE_I2C TRUE
|
#define HAL_USE_I2C TRUE
|
||||||
|
|
||||||
#define HAL_USE_PWM TRUE
|
#define HAL_USE_PWM TRUE
|
||||||
|
|
||||||
#define HAL_USE_ADC TRUE
|
#define HAL_USE_ADC TRUE
|
||||||
|
|
||||||
|
#define HAL_USE_SPI TRUE
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
|
||||||
#include_next <halconf.h>
|
#include_next <halconf.h>
|
||||||
|
@ -10,3 +10,6 @@
|
|||||||
|
|
||||||
#undef RP_PWM_USE_PWM4
|
#undef RP_PWM_USE_PWM4
|
||||||
#define RP_PWM_USE_PWM4 TRUE
|
#define RP_PWM_USE_PWM4 TRUE
|
||||||
|
|
||||||
|
#undef RP_SPI_USE_SPI0
|
||||||
|
#define RP_SPI_USE_SPI0 TRUE
|
||||||
|
Loading…
Reference in New Issue
Block a user