mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
Merge 3214606f65
into 9bea332a21
This commit is contained in:
commit
740e3b0310
24
keyboards/barettcreative/bc75ext/config.h
Normal file
24
keyboards/barettcreative/bc75ext/config.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* Copyright 2024
|
||||
*
|
||||
* 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
|
||||
|
||||
#undef I2C_DRIVER
|
||||
#define I2C_DRIVER I2CD0
|
||||
#undef I2C1_SCL_PIN
|
||||
#define I2C1_SCL_PIN GP1
|
||||
#undef I2C1_SDA_PIN
|
||||
#define I2C1_SDA_PIN GP0
|
21
keyboards/barettcreative/bc75ext/halconf.h
Normal file
21
keyboards/barettcreative/bc75ext/halconf.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* Copyright 2024
|
||||
*
|
||||
* 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>
|
133
keyboards/barettcreative/bc75ext/keyboard.json
Normal file
133
keyboards/barettcreative/bc75ext/keyboard.json
Normal file
@ -0,0 +1,133 @@
|
||||
{
|
||||
"keyboard_name": "BC75EXT",
|
||||
"manufacturer": "DeskDaily",
|
||||
"url": "",
|
||||
"maintainer": "DeskDaily",
|
||||
"usb": {
|
||||
"vid": "0xD896",
|
||||
"pid": "0x0001",
|
||||
"device_version": "1.0.0"
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"matrix_pins": {
|
||||
"rows": ["GP28", "GP25", "GP24", "GP23", "GP22", "GP21"],
|
||||
"cols": ["GP20", "GP19", "GP18", "GP17", "GP16", "GP15", "GP14", "GP13", "GP12", "GP11", "GP10", "GP9", "GP8", "GP7", "GP6", "GP5", "GP4"]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"mousekey": true,
|
||||
"extrakey": true,
|
||||
"console": false,
|
||||
"command": false,
|
||||
"nkro": true,
|
||||
"encoder": true,
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "GP27", "pin_b": "GP26"},
|
||||
{"pin_a": "GP2", "pin_b": "GP3"}
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_ext75_ansi_split_lshift": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1.5, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2.75, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3.75, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4.75, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5.75, "y": 0},
|
||||
{"matrix": [0, 7], "x": 7, "y": 0},
|
||||
{"matrix": [0, 8], "x": 8, "y": 0},
|
||||
{"matrix": [0, 9], "x": 9, "y": 0},
|
||||
{"matrix": [0, 10], "x": 10, "y": 0},
|
||||
{"matrix": [0, 11], "x": 11.25, "y": 0},
|
||||
{"matrix": [0, 12], "x": 12.25, "y": 0},
|
||||
{"matrix": [0, 13], "x": 13.25, "y": 0},
|
||||
{"matrix": [0, 14], "x": 14.25, "y": 0},
|
||||
{"matrix": [0, 15], "x": 15.5, "y": 0},
|
||||
{"matrix": [0, 16], "x": 17, "y": 0},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1.5},
|
||||
{"matrix": [1, 1], "x": 1.5, "y": 1.5},
|
||||
{"matrix": [1, 2], "x": 2.5, "y": 1.5},
|
||||
{"matrix": [1, 3], "x": 3.5, "y": 1.5},
|
||||
{"matrix": [1, 4], "x": 4.5, "y": 1.5},
|
||||
{"matrix": [1, 5], "x": 5.5, "y": 1.5},
|
||||
{"matrix": [1, 6], "x": 6.5, "y": 1.5},
|
||||
{"matrix": [1, 7], "x": 7.5, "y": 1.5},
|
||||
{"matrix": [1, 8], "x": 8.5, "y": 1.5},
|
||||
{"matrix": [1, 9], "x": 9.5, "y": 1.5},
|
||||
{"matrix": [1, 10], "x": 10.5, "y": 1.5},
|
||||
{"matrix": [1, 11], "x": 11.5, "y": 1.5},
|
||||
{"matrix": [1, 12], "x": 12.5, "y": 1.5},
|
||||
{"matrix": [1, 13], "x": 13.5, "y": 1.5},
|
||||
{"matrix": [1, 15], "x": 14.5, "y": 1.5, "w": 2},
|
||||
{"matrix": [1, 16], "x": 17, "y": 1.5},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2.5},
|
||||
{"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2.5},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2.5},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2.5},
|
||||
{"matrix": [2, 6], "x": 6, "y": 2.5},
|
||||
{"matrix": [2, 7], "x": 7, "y": 2.5},
|
||||
{"matrix": [2, 8], "x": 8, "y": 2.5},
|
||||
{"matrix": [2, 9], "x": 9, "y": 2.5},
|
||||
{"matrix": [2, 10], "x": 10, "y": 2.5},
|
||||
{"matrix": [2, 11], "x": 11, "y": 2.5},
|
||||
{"matrix": [2, 12], "x": 12, "y": 2.5},
|
||||
{"matrix": [2, 13], "x": 13, "y": 2.5},
|
||||
{"matrix": [2, 14], "x": 14, "y": 2.5},
|
||||
{"matrix": [2, 15], "x": 15, "y": 2.5, "w": 1.5},
|
||||
{"matrix": [2, 16], "x": 17, "y": 2.5},
|
||||
|
||||
{"matrix": [3, 0], "x": 0, "y": 3.5},
|
||||
{"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75},
|
||||
{"matrix": [3, 3], "x": 3.25, "y": 3.5},
|
||||
{"matrix": [3, 4], "x": 4.25, "y": 3.5},
|
||||
{"matrix": [3, 5], "x": 5.25, "y": 3.5},
|
||||
{"matrix": [3, 6], "x": 6.25, "y": 3.5},
|
||||
{"matrix": [3, 7], "x": 7.25, "y": 3.5},
|
||||
{"matrix": [3, 8], "x": 8.25, "y": 3.5},
|
||||
{"matrix": [3, 9], "x": 9.25, "y": 3.5},
|
||||
{"matrix": [3, 10], "x": 10.25, "y": 3.5},
|
||||
{"matrix": [3, 11], "x": 11.25, "y": 3.5},
|
||||
{"matrix": [3, 12], "x": 12.25, "y": 3.5},
|
||||
{"matrix": [3, 13], "x": 13.25, "y": 3.5},
|
||||
{"matrix": [3, 15], "x": 14.25, "y": 3.5, "w": 2.25},
|
||||
{"matrix": [3, 16], "x": 17, "y": 3.5},
|
||||
|
||||
{"matrix": [4, 0], "x": 0, "y": 4.5},
|
||||
{"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 1.25},
|
||||
{"matrix": [4, 2], "x": 2.75, "y": 4.5},
|
||||
{"matrix": [4, 3], "x": 3.75, "y": 4.5},
|
||||
{"matrix": [4, 4], "x": 4.75, "y": 4.5},
|
||||
{"matrix": [4, 5], "x": 5.75, "y": 4.5},
|
||||
{"matrix": [4, 6], "x": 6.75, "y": 4.5},
|
||||
{"matrix": [4, 7], "x": 7.75, "y": 4.5},
|
||||
{"matrix": [4, 8], "x": 8.75, "y": 4.5},
|
||||
{"matrix": [4, 9], "x": 9.75, "y": 4.5},
|
||||
{"matrix": [4, 10], "x": 10.75, "y": 4.5},
|
||||
{"matrix": [4, 11], "x": 11.75, "y": 4.5},
|
||||
{"matrix": [4, 12], "x": 12.75, "y": 4.5},
|
||||
{"matrix": [4, 14], "x": 13.75, "y": 4.5, "w": 1.75},
|
||||
{"matrix": [4, 15], "x": 15.75, "y": 4.75},
|
||||
{"matrix": [4, 16], "x": 17, "y": 4.5},
|
||||
|
||||
{"matrix": [5, 0], "x": 0, "y": 5.5},
|
||||
{"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 4], "x": 4, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 7], "x": 5.25, "y": 5.5, "w": 6.25},
|
||||
{"matrix": [5, 11], "x": 11.5, "y": 5.5, "w": 1.5},
|
||||
{"matrix": [5, 13], "x": 13, "y": 5.5, "w": 1.5},
|
||||
{"matrix": [5, 14], "x": 14.75, "y": 5.75},
|
||||
{"matrix": [5, 15], "x": 15.75, "y": 5.75},
|
||||
{"matrix": [5, 16], "x": 16.75, "y": 5.75}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
374
keyboards/barettcreative/bc75ext/keymaps/default/keymap.c
Normal file
374
keyboards/barettcreative/bc75ext/keymaps/default/keymap.c
Normal file
@ -0,0 +1,374 @@
|
||||
/* Copyright 2024
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ext75_ansi_split_lshift(
|
||||
KC_TRNS, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SPC, KC_DEL,
|
||||
KC_PSCR, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
|
||||
KC_PGUP, 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_RBRC, KC_BSLS, KC_INS,
|
||||
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END,
|
||||
MO(1), KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PAUSE,
|
||||
MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT_ext75_ansi_split_lshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[2] = LAYOUT_ext75_ansi_split_lshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[3] = LAYOUT_ext75_ansi_split_lshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), 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
|
||||
|
||||
/* Bongocat animation copied from the evo70 by customMK, slight modifications to make it standalone */
|
||||
#ifdef OLED_ENABLE
|
||||
#include "matrix.h"
|
||||
#include OLED_FONT_H
|
||||
|
||||
extern matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
#define ANIM_FRAME_DURATION 100
|
||||
#define IDLE_FRAMES 5
|
||||
#define IDLE_TIMEOUT 750
|
||||
#define SLEEP_TIMEOUT 15000
|
||||
|
||||
static bool OLED_redraw = true;
|
||||
|
||||
static const uint8_t bongofont[] PROGMEM = { \
|
||||
0xC1, 0xC1, 0xC2, 0x04, 0x08, 0x10, \
|
||||
0xC0, 0x38, 0x04, 0x03, 0x00, 0x00, \
|
||||
0xA0, 0x22, 0x24, 0x14, 0x12, 0x12, \
|
||||
0xA0, 0x21, 0x22, 0x12, 0x11, 0x11, \
|
||||
0x83, 0x7C, 0x41, 0x41, 0x40, 0x40, \
|
||||
0x82, 0x82, 0x84, 0x08, 0x10, 0x20, \
|
||||
0x80, 0x80, 0x00, 0x00, 0x00, 0x00, \
|
||||
0x80, 0x70, 0x19, 0x06, 0x00, 0x00, \
|
||||
0x80, 0x70, 0x0C, 0x03, 0x00, 0x00, \
|
||||
0x80, 0x00, 0x30, 0x30, 0x00, 0xC0, \
|
||||
0x80, 0x00, 0x30, 0x30, 0x00, 0x00, \
|
||||
0x49, 0x88, 0x08, 0x08, 0x08, 0x00, \
|
||||
0x44, 0x84, 0x04, 0x04, 0x00, 0x00, \
|
||||
0x40, 0x80, 0x00, 0x00, 0x00, 0x00, \
|
||||
0x40, 0x40, 0x20, 0x20, 0x20, 0x20, \
|
||||
0x3C, 0xC2, 0x01, 0x01, 0x02, 0x02, \
|
||||
0x35, 0x01, 0x8A, 0x7C, 0x00, 0x00, \
|
||||
0x20, 0x40, 0x80, 0x00, 0x00, 0x00, \
|
||||
0x20, 0x21, 0x22, 0x12, 0x11, 0x11, \
|
||||
0x20, 0x20, 0x10, 0x10, 0x10, 0x10, \
|
||||
0x1E, 0xE1, 0x00, 0x00, 0x01, 0x01, \
|
||||
0x1C, 0xE2, 0x01, 0x01, 0x02, 0x02, \
|
||||
0x18, 0x64, 0x82, 0x02, 0x02, 0x02, \
|
||||
0x18, 0x60, 0x80, 0x00, 0x00, 0x00, \
|
||||
0x18, 0x18, 0x1B, 0x03, 0x00, 0x40, \
|
||||
0x18, 0x06, 0x05, 0x98, 0x99, 0x84, \
|
||||
0x12, 0x0B, 0x08, 0x08, 0x08, 0x08, \
|
||||
0x11, 0x09, 0x08, 0x08, 0x08, 0x08, \
|
||||
0x10, 0x10, 0xD0, 0x11, 0x0F, 0x21, \
|
||||
0x10, 0x10, 0x10, 0x11, 0x0F, 0x01, \
|
||||
0x10, 0x08, 0x08, 0x04, 0x04, 0x04, \
|
||||
0x10, 0x08, 0x04, 0x02, 0x02, 0x04, \
|
||||
0x0C, 0x30, 0x40, 0x80, 0x00, 0x00, \
|
||||
0x0C, 0x0C, 0x0D, 0x01, 0x00, 0x40, \
|
||||
0x08, 0xE8, 0x08, 0x07, 0x10, 0x24, \
|
||||
0x08, 0x30, 0x40, 0x80, 0x00, 0x00, \
|
||||
0x08, 0x08, 0x08, 0x07, 0x00, 0x00, \
|
||||
0x08, 0x08, 0x04, 0x02, 0x02, 0x02, \
|
||||
0x08, 0x04, 0x02, 0x01, 0x01, 0x02, \
|
||||
0x05, 0x05, 0x09, 0x09, 0x10, 0x10, \
|
||||
0x04, 0x38, 0x40, 0x80, 0x00, 0x00, \
|
||||
0x04, 0x04, 0x08, 0x08, 0x10, 0x10, \
|
||||
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, \
|
||||
0x04, 0x04, 0x02, 0x01, 0x00, 0x00, \
|
||||
0x02, 0x02, 0x81, 0x80, 0x80, 0x00, \
|
||||
0x02, 0x02, 0x04, 0x04, 0x08, 0x08, \
|
||||
0x02, 0x02, 0x02, 0x01, 0x01, 0x01, \
|
||||
0x02, 0x02, 0x01, 0x00, 0x00, 0x00, \
|
||||
0x01, 0xE1, 0x1A, 0x06, 0x09, 0x31, \
|
||||
0x01, 0x01, 0x02, 0x04, 0x08, 0x10, \
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, \
|
||||
0x00, 0x80, 0x80, 0x00, 0x00, 0x00, \
|
||||
0x00, 0x80, 0x40, 0x40, 0x20, 0x20, \
|
||||
0x00, 0x00, 0x80, 0x80, 0x40, 0x40, \
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x81, \
|
||||
0x00, 0x00, 0x01, 0x01, 0x00, 0x40, \
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, \
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, \
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, \
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, \
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
|
||||
static const uint8_t bongo_line_x[] = {51, 49, 48, 57};
|
||||
static const uint8_t bongo_line_y[] = {0, 8, 16, 24};
|
||||
static const uint8_t bongo_line_len[] = {5, 7, 8, 6};
|
||||
|
||||
const uint8_t bongo_line_data[8][26] PROGMEM = {
|
||||
{ //idle1
|
||||
60, 52, 19, 30, 35, \
|
||||
22, 47, 51, 60, 9, 0, 17, \
|
||||
1, 57, 33, 3, 27, 41, 29, 50, \
|
||||
45, 36, 60, 60, 60, 60}, \
|
||||
{ //idle2
|
||||
60, 52, 19, 30, 35, \
|
||||
22, 47, 51, 60, 9, 0, 17, \
|
||||
1, 57, 33, 3, 27, 41, 29, 50, \
|
||||
45, 36, 60, 60, 60, 60}, \
|
||||
{ //idle3
|
||||
60, 53, 14, 31, 23, \
|
||||
15, 43, 60, 60, 54, 5, 13, \
|
||||
7, 56, 24, 2, 26, 39, 29, 50, \
|
||||
45, 36, 60, 60, 60, 60}, \
|
||||
{ //idle4
|
||||
6, 52, 19, 38, 32, \
|
||||
20, 47, 51, 60, 9, 0, 17, \
|
||||
8, 57, 33, 3, 27, 41, 29, 50, \
|
||||
45, 36, 60, 60, 60, 60}, \
|
||||
{ //idle5
|
||||
60, 52, 19, 37, 40, \
|
||||
21, 47, 51, 60, 9, 0, 17, \
|
||||
8, 57, 33, 3, 27, 41, 29, 50, \
|
||||
45, 36, 60, 60, 60, 60}, \
|
||||
{ //prep
|
||||
6, 52, 19, 38, 32, \
|
||||
20, 44, 51, 60, 10, 48, 16, \
|
||||
8, 25, 4, 18, 27, 42, 46, 50, \
|
||||
60, 60, 60, 60, 60, 60}, \
|
||||
{ //tap1
|
||||
6, 52, 19, 38, 32, \
|
||||
20, 44, 51, 60, 10, 49, 17, \
|
||||
8, 25, 4, 18, 27, 41, 28, 11, \
|
||||
60, 60, 60, 60, 58, 59}, \
|
||||
{ //tap2
|
||||
6, 52, 19, 38, 32, \
|
||||
20, 47, 51, 60, 10, 48, 16, \
|
||||
8, 60, 55, 3, 27, 42, 46, 50, \
|
||||
45, 34, 12, 60, 60, 60}
|
||||
};
|
||||
|
||||
enum anin_states { sleep, idle, prep, tap };
|
||||
uint8_t anim_state = idle;
|
||||
uint32_t idle_timeout_timer = 0;
|
||||
uint32_t anim_timer = 0;
|
||||
uint8_t current_idle_frame = 0;
|
||||
uint8_t current_tap_frame = 6;
|
||||
uint8_t last_bongo_frame = 12;
|
||||
|
||||
void write_bongochar_at_pixel_xy(uint8_t x, uint8_t y, uint8_t data, bool invert) {
|
||||
uint8_t i, j, temp;
|
||||
for (i = 0; i < 6 ; i++) { // 6 = font width
|
||||
temp = pgm_read_byte(&bongofont[data * 6]+i);
|
||||
for (j = 0; j < 8; j++) { // 8 = font height
|
||||
if (temp & 0x01) {
|
||||
oled_write_pixel(x + i, y + j, !invert);
|
||||
} else {
|
||||
oled_write_pixel(x + i, y + j, invert);
|
||||
}
|
||||
temp >>= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool is_key_down(void) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
if (matrix[i] > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void eval_anim_state(void) {
|
||||
bool key_down;
|
||||
key_down = is_key_down();
|
||||
|
||||
switch (anim_state) {
|
||||
case sleep:
|
||||
if(key_down) { anim_state = tap; }
|
||||
break;
|
||||
case idle:
|
||||
if(key_down) { anim_state = tap; }
|
||||
else if (timer_elapsed32(idle_timeout_timer) >= SLEEP_TIMEOUT) //prep to idle
|
||||
{
|
||||
anim_state = sleep;
|
||||
current_idle_frame = 0;
|
||||
}
|
||||
break;
|
||||
case prep:
|
||||
if(key_down) { anim_state = tap; }
|
||||
else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) //prep to idle
|
||||
{
|
||||
anim_state = idle;
|
||||
current_idle_frame = 0;
|
||||
}
|
||||
break;
|
||||
case tap:
|
||||
if (!key_down)
|
||||
{
|
||||
anim_state = prep;
|
||||
idle_timeout_timer = timer_read32();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void draw_bongo_table(void) {
|
||||
//draws the table edge for bongocat, this edge doesn't change during the animation
|
||||
uint8_t i;
|
||||
uint8_t y = 31;
|
||||
uint8_t j = 0;
|
||||
for (i = 17; i < 57; i++) {
|
||||
oled_write_pixel(i, y, true); //every five horizontal pixels, move up one pixel to make a diagonal line
|
||||
if (j == 4) {
|
||||
--y;
|
||||
j=0;
|
||||
} else {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
y=15;
|
||||
j=0;
|
||||
for (i = 91; i < 128; i++) {
|
||||
|
||||
oled_write_pixel(i, y, true); //every four horizontal pixels, move up one pixel to make a diagonal line
|
||||
if (j == 3) {
|
||||
--y;
|
||||
j=0;
|
||||
} else {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void draw_bongocat_frame(int framenumber) {
|
||||
//only redraw if the animation frame has changed
|
||||
if (framenumber != last_bongo_frame) {
|
||||
last_bongo_frame = framenumber;
|
||||
uint8_t i, j, current_bongochar = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < bongo_line_len[i]; j++) {
|
||||
write_bongochar_at_pixel_xy(bongo_line_x[i] + j*6, bongo_line_y[i], pgm_read_byte(&bongo_line_data[framenumber][current_bongochar]), false);
|
||||
current_bongochar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool is_new_tap(void) {
|
||||
static matrix_row_t old_matrix[] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
bool new_tap = false;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
if (matrix[i] > old_matrix[i]) { // more 1's detected, there was a new tap
|
||||
new_tap = true;
|
||||
}
|
||||
old_matrix[i] = matrix[i];
|
||||
}
|
||||
return new_tap;
|
||||
}
|
||||
|
||||
void draw_bongocat(void) {
|
||||
static bool already_tapped = false;
|
||||
if (is_new_tap()) {
|
||||
already_tapped = false;
|
||||
};
|
||||
eval_anim_state();
|
||||
switch (anim_state) {
|
||||
case sleep:
|
||||
draw_bongocat_frame(4);
|
||||
break;
|
||||
case idle:
|
||||
draw_bongocat_frame(4 - current_idle_frame);
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
current_idle_frame = (current_idle_frame + 1) % 5;
|
||||
anim_timer = timer_read32();
|
||||
}
|
||||
break;
|
||||
case prep:
|
||||
draw_bongocat_frame(5);
|
||||
already_tapped = false;
|
||||
break;
|
||||
case tap:
|
||||
draw_bongocat_frame(current_tap_frame);
|
||||
if (already_tapped == false) {
|
||||
if (current_tap_frame == 6) {
|
||||
current_tap_frame = 7;
|
||||
}
|
||||
else {
|
||||
current_tap_frame = 6;
|
||||
}
|
||||
}
|
||||
already_tapped = true;
|
||||
break;
|
||||
default:
|
||||
draw_bongocat_frame(4);
|
||||
already_tapped = false;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
|
||||
if (OLED_redraw){
|
||||
oled_clear();
|
||||
last_bongo_frame = 12; //force a redraw
|
||||
draw_bongo_table();
|
||||
OLED_redraw = false;
|
||||
}
|
||||
draw_bongocat();
|
||||
|
||||
led_t led_state = host_keyboard_led_state(); // caps lock stuff, prints CAPS on new line if caps led is on
|
||||
oled_set_cursor(0, 0);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false);
|
||||
oled_set_cursor(0, 1);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
25
keyboards/barettcreative/bc75ext/mcuconf.h
Normal file
25
keyboards/barettcreative/bc75ext/mcuconf.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* Copyright 2024
|
||||
*
|
||||
* 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 FALSE
|
||||
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#define RP_I2C_USE_I2C0 TRUE
|
26
keyboards/barettcreative/bc75ext/readme.md
Normal file
26
keyboards/barettcreative/bc75ext/readme.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Barett Creative BC75EXT
|
||||
|
||||
![bc75ext](https://i.imgur.com/lPEKftHhl.png)
|
||||
|
||||
A 75% pcb with extra column on the left. Optional to use 2 encoders or 1 encoder and OLED.
|
||||
|
||||
* Keyboard Maintainer: [DeskDaily](https://github.com/DeskDaily)
|
||||
* Hardware Supported: Wooden Cases by Barett Creative
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make barettcreative/bc75ext:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make barettcreative/bc75ext:default:flash
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the upper left key) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
||||
|
||||
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).
|
4
keyboards/barettcreative/bc75ext/rules.mk
Normal file
4
keyboards/barettcreative/bc75ext/rules.mk
Normal file
@ -0,0 +1,4 @@
|
||||
OLED_ENABLE = yes
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
OLED_DRIVER = ssd1306
|
||||
ENCODER_MAP = ENABLE
|
Loading…
Reference in New Issue
Block a user