Skip to content

Commit

Permalink
Test, adding rp2040_ce
Browse files Browse the repository at this point in the history
  • Loading branch information
TweetyDaBird committed Mar 1, 2024
1 parent d3db4ab commit a9184c5
Show file tree
Hide file tree
Showing 13 changed files with 204 additions and 51 deletions.
29 changes: 28 additions & 1 deletion keyboards/tweetydabird/lotus58/elite_c/info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
{
"bootloader": "atmel-dfu"
"pin_compatible": "elite_c",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4", "resolution": 2}
]
},
"matrix_pins": {
"cols": ["B1", "B2", "B3", "B6", "F7", "F6"],
"rows": ["D4", "C6", "D7", "E6", "B4"]
},
"split": {
"encoder": {
"right": {
"rotary": [
{"pin_a": "F4", "pin_b": "F5", "resolution": 2}
]
}
},
"soft_serial_pin": "D2",
"transport": {
"protocol": "serial",
},
},
"ws2812": {
"pin": "D3"
},
}
46 changes: 8 additions & 38 deletions keyboards/tweetydabird/lotus58/info.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,44 @@
{
"manufacturer": "Tweetys Wild Thinking",
"keyboard_name": "Lotus 58 Glow (QMK)",
"keyboard_name": "Lotus 58 Glow",
"maintainer": "TweetyDaBird",
"bootloader_instructions": "Short marked pads on PCB, or hold top-outer key when plugging in each hand.",
"build": {
"lto": true
},
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4", "resolution": 2}
]
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"oled": true,
"encoder": true,
"rgblight": true,
"split": true,
"tri_layer": true
},
"matrix_pins": {
"cols": ["B1", "B2", "B3", "B6", "F7", "F6"],
"rows": ["D4", "C6", "D7", "E6", "B4"]
},
"pin_compatible": "promicro",
"processor": "atmega32u4",
"rgblight": {
"led_count": 70,
"split": true,
"split_count": [35, 35],
"max_brightness": 175,
"sleep": true,
"max_brightness": 175
},
"ws2812": {
"pin": "D3"
"split": true,
"split_count": [35, 35]
},
"split": {
"bootmagic": {
"matrix": [5, 0]
},
"enabled": true,
"encoder": {
"right": {
"rotary": [
{"pin_a": "F4", "pin_b": "F5", "resolution": 2}
]
}
},
"soft_serial_pin": "D2",
"transport": {
"protocol": "serial",
"sync_matrix_state": true,
"sync_modifiers": true
},
"usb_detect": {
"enabled": true
}
},
"url": "https://lectronz.com/stores/tweetys-wild-thinking",
"usb": {
"vid": "0xFEED",
"pid": "0x23B0",
"device_version": "1.2.3",
"force_nkro": true
"force_nkro": true,
"pid": "0x23B0",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
Expand Down
29 changes: 20 additions & 9 deletions keyboards/tweetydabird/lotus58/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_UP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_RGHT),
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_UP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_RGHT),
KC_LGUI, TG(2), KC_LALT, LSFT_T(KC_SPC), RSFT_T(KC_ENT), KC_RALT, TG(1), RGUI_T(KC_BSPC)
),

Expand All @@ -28,8 +28,8 @@ LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC
),

[3] = LAYOUT(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAI, RGB_TOG,
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD,RGB_SAD, RGB_M_P,
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, NK_TOGG, AC_TOGG, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAI, RGB_TOG,
QK_RBT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD,RGB_SAD, RGB_M_P,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_VAI, RGB_M_B,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_VAD, RGB_M_R,
_______, _______, _______, _______, _______, _______, _______, _______
Expand All @@ -39,9 +39,9 @@ LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
};
#endif

Expand Down Expand Up @@ -76,11 +76,22 @@ static void print_status_narrow(void) {
led_t led_usb_state = host_keyboard_led_state();
oled_write_ln_P(PSTR("Caps- lock"), led_usb_state.caps_lock);

#ifdef AUTO_SHIFT_ENABLE

bool autoshift = get_autoshift_state();
oled_advance_page(true);
oled_write_P(PSTR("Auto-Shift"), autoshift);
oled_advance_page(true);

#endif


}

bool oled_task_user(void) {
// Render the OLED
print_status_narrow();
return false;
}

#endif
4 changes: 4 additions & 0 deletions keyboards/tweetydabird/lotus58/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
ENCODER_MAP_ENABLE = yes
AUTO_SHIFT_ENABLE = yes

ifeq ($(strip $(MCU)), atmega32u4)
LTO_ENABLE = yes
endif
4 changes: 2 additions & 2 deletions keyboards/tweetydabird/lotus58/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ ifeq ($(strip $(MCU)), atmega32u4)
QMK_SETTINGS = no
KEY_OVERRIDE_ENABLE = no
COMBO_ENABLE = no

LTO_ENABLE = yes

# Reduce size even more for non-nanoboot bootloaders
ifneq ($(strip $(BOOTLOADER_SIZE)), 512)
MAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
endif
endif
29 changes: 29 additions & 0 deletions keyboards/tweetydabird/lotus58/nanoboot/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"pin_compatible": "promicro",
"processor": "atmega32u4",
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4", "resolution": 2}
]
},
"matrix_pins": {
"cols": ["B1", "B2", "B3", "B6", "F7", "F6"],
"rows": ["D4", "C6", "D7", "E6", "B4"]
},
"split": {
"encoder": {
"right": {
"rotary": [
{"pin_a": "F4", "pin_b": "F5", "resolution": 2}
]
}
},
"soft_serial_pin": "D2",
"transport": {
"protocol": "serial",
},
},
"ws2812": {
"pin": "D3"
},
}
29 changes: 28 additions & 1 deletion keyboards/tweetydabird/lotus58/promicro/info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
{
"pin_compatible": "promicro",
"processor": "atmega32u4",
"bootloader": "caterina"
}
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4", "resolution": 2}
]
},
"matrix_pins": {
"cols": ["B1", "B2", "B3", "B6", "F7", "F6"],
"rows": ["D4", "C6", "D7", "E6", "B4"]
},
"split": {
"encoder": {
"right": {
"rotary": [
{"pin_a": "F4", "pin_b": "F5", "resolution": 2}
]
}
},
"soft_serial_pin": "D2",
"transport": {
"protocol": "serial"
},
},
"ws2812": {
"pin": "D3"
},
}
9 changes: 9 additions & 0 deletions keyboards/tweetydabird/lotus58/rp2040_ce/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2024 Markus Knutsson (@TweetyDaBird)
// SPDX-License-Identifier: GPL-2.0-or-later

#define SERIAL_USART_TX_PIN GP1 // The GPIO pin that is used split communication.
#define SERIAL_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the Serial implementation uses the PIO0 peripheral

#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP2
#define I2C1_SCL_PIN GP3
21 changes: 21 additions & 0 deletions keyboards/tweetydabird/lotus58/rp2040_ce/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2022 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_I2C TRUE

#include_next <halconf.h>
31 changes: 31 additions & 0 deletions keyboards/tweetydabird/lotus58/rp2040_ce/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"development_board": "promicro_rp2040",
"processor": "RP2040",
"bootloader": "rp2040",
"encoder": {
"rotary": [
{"pin_a": "GP28", "pin_b": "GP29", "resolution": 2}
]
},
"matrix_pins": {
"cols": ["GP22", "GP23", "GP20", "GP21", "GP26", "GP27"],
"rows": ["GP4", "GP5", "GP6", "GP7", "GP8"]
},
"split": {
"encoder": {
"right": {
"rotary": [
{"pin_a": "GP29", "pin_b": "GP28", "resolution": 2}
]
}
},
"usb_detect": {
"enabled": true
}
},
"ws2812": {
"driver": "vendor",
"pin": "GP0"
},

}
22 changes: 22 additions & 0 deletions keyboards/tweetydabird/lotus58/rp2040_ce/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* Copyright 2022 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

#include_next <mcuconf.h>

#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
1 change: 1 addition & 0 deletions keyboards/tweetydabird/lotus58/rp2040_ce/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERIAL_DRIVER = vendor
1 change: 1 addition & 0 deletions keyboards/tweetydabird/lotus58/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEFAULT_FOLDER = tweetydabird/lotus58/promicro

0 comments on commit a9184c5

Please sign in to comment.