Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BIOI Keyboards #9602

Merged
merged 22 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions keyboards/bioi/ble.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 <avr/pgmspace.h>
#include "report.h"
#include "host.h"
Expand All @@ -24,7 +38,7 @@
#include "ble.h"
#include "usart.h"

user_config_t ble_config;
keyboard_config_t ble_config;

static uint8_t bluefruit_keyboard_leds = 0;

Expand Down Expand Up @@ -203,4 +217,4 @@ void usart_init(void)
send_str(PSTR("\r\n"));
send_str(PSTR("\r\n"));
send_str(PSTR("\r\n"));
}
}
27 changes: 19 additions & 8 deletions keyboards/bioi/ble.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#ifndef BLE_H
#define BLE_H
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 <stdbool.h>
#include "host_driver.h"
Expand All @@ -11,15 +24,13 @@ typedef union {
struct {
bool init : 1;
};
} user_config_t;
} keyboard_config_t;

user_config_t ble_config;
extern keyboard_config_t ble_config;

host_driver_t bluefruit_driver;
host_driver_t null_driver;
extern host_driver_t bluefruit_driver;
extern host_driver_t null_driver;

void send_str(const char *str);
void usart_init(void);
void module_reset(void);

#endif
9 changes: 2 additions & 7 deletions keyboards/bioi/g60/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* USB Device descriptor parameter */

#define VENDOR_ID 0x6582
#define VENDOR_ID 0x8101 // 8101 = "BIOI"
#define PRODUCT_ID 0x6080
#define DEVICE_VER 0x0001
#define MANUFACTURER Basic IO Instruments
#define PRODUCT BIOI G60
#define DESCRIPTION G60 BLE Dual Mode Keyboard by Baisc IO Instruments

/* key matrix size */
#define MATRIX_ROWS 5
Expand Down Expand Up @@ -54,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define BEBOUNCE 5
#define DEBOUNCE 5

/* RGB Underglow */
#define RGB_DI_PIN B1
Expand All @@ -64,10 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0


/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
Expand Down
14 changes: 14 additions & 0 deletions keyboards/bioi/g60/g60.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 "g60.h"

void keyboard_pre_init_kb(void) {
Expand Down
14 changes: 14 additions & 0 deletions keyboards/bioi/g60/g60.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 "quantum.h"
Expand Down
4 changes: 2 additions & 2 deletions keyboards/bioi/g60/info.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"keyboard_name": "BIOI G60",
"url": "https://scottywei.github.io/bioi-g60ble/",
"maintainer": "Basic I/O Instruments",
"maintainer": "scottywei",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT": {
"LAYOUT_all": {
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
Expand Down
16 changes: 16 additions & 0 deletions keyboards/bioi/g60/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/* Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
*
* 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
drashna marked this conversation as resolved.
Show resolved Hide resolved

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Expand Down
16 changes: 16 additions & 0 deletions keyboards/bioi/g60/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/* Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
*
* 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
drashna marked this conversation as resolved.
Show resolved Hide resolved

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bioi/g60/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Inspired by the design of the Cherry G80 series, the G60 is a 60% USB/Bluetooth dual-mode custom keyboard.

* Keyboard Maintainer: [Baisc I/O Instruments(Scott Wei)](https://github.com/scottywei)
* Keyboard Maintainer: [Basic I/O Instruments (Scott Wei)](https://github.com/scottywei)
* Hardware Supported: [BIOI G60BLE PCB](https://scottywei.github.io/bioi-g60ble/)
* Hardware Availability: [BIOI Taobao Store](https://item.taobao.com/item.htm?&id=611933113439) / [Playkeyboard](https://play-keyboard.store/products/bioi-g60ble-pcb-default-version-custom-60-bluetooth-pcb)

Expand Down
26 changes: 13 additions & 13 deletions keyboards/bioi/g60/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ F_CPU = 8000000
# Bootloader selection
BOOTLOADER = qmk-dfu

SRC += ../usart.c \
../ble.c \
../main.c
SRC += ../usart.c \
../ble.c \
../main.c

OPT_DEFS += -DPROTOCOL_BLE
OPT_DEFS += -DUART_RX1_BUFFER_SIZE=16 -DUART_TX1_BUFFER_SIZE=16
Expand All @@ -18,19 +18,19 @@ OPT_DEFS += -DUSART1_ENABLED
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LTO_ENABLE = yes # Reduce firmware size
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
LTO_ENABLE = yes # Reduce firmware size

VIA_ENABLE = yes # VIA support should be enabled here due to the main() loop will be compiled first.
16 changes: 15 additions & 1 deletion keyboards/bioi/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 <avr/pgmspace.h>
#include <util/delay.h>

Expand Down Expand Up @@ -372,4 +386,4 @@ int main(void)
USB_USBTask();
#endif
}
}
}
6 changes: 1 addition & 5 deletions keyboards/bioi/morgan65/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* USB Device descriptor parameter */

#define VENDOR_ID 0x4249 // "BI" = Basic I/O Instruments
#define VENDOR_ID 0x8101 // 8101 = "BIOI"
#define PRODUCT_ID 0x6581
#define DEVICE_VER 0x0001
#define MANUFACTURER Basic IO Instruments
#define PRODUCT BIOI MORGAN65
#define DESCRIPTION MORGAN65 BLE Dual Mode Keyboard by Baisc IO Instruments

/* key matrix size */
#define MATRIX_ROWS 5
Expand Down Expand Up @@ -66,9 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bioi/morgan65/info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"keyboard_name": "Morgan65",
"url": "",
"maintainer": "Basic I/O Instruments",
"maintainer": "scottywei",
"width": 16,
"height": 5,
"layouts": {
Expand Down
16 changes: 16 additions & 0 deletions keyboards/bioi/morgan65/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/* Copyright 2020 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
*
* 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] = {
Expand Down
16 changes: 16 additions & 0 deletions keyboards/bioi/morgan65/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/* Copyright 2020 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
*
* 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] = {
Expand Down
14 changes: 14 additions & 0 deletions keyboards/bioi/morgan65/morgan65.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 "morgan65.h"

void keyboard_pre_init_kb(void) {
Expand Down
14 changes: 14 additions & 0 deletions keyboards/bioi/morgan65/morgan65.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
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 "quantum.h"
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bioi/morgan65/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Morgan65 is a 65% custom keyboard by DT Studio, powered by an USB/Bluetooth dual-mode PCB from Basic I/O Instruments.

* Keyboard Maintainer: [Baisc I/O Instruments(Scott Wei)](https://github.com/scottywei)
* Keyboard Maintainer: [Basic I/O Instruments (Scott Wei)](https://github.com/scottywei)
* Hardware Supported: Morgan65 PCB
* Hardware Availability: N/A

Expand Down
Loading