diff options
author | lokher <lokher@gmail.com> | 2022-09-13 11:24:05 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-09-13 11:24:05 +0800 |
commit | 9581289745736ce068a1040f44cec37a2ca8830d (patch) | |
tree | 24f644715a5fd6cc4d804d9604fb094307808b1b /keyboards/nullbitsco | |
parent | fe13cedf8c09fa34d5cec4e4c624738095176625 (diff) |
Remove non-Keychron keyboards
Diffstat (limited to 'keyboards/nullbitsco')
59 files changed, 0 insertions, 4526 deletions
diff --git a/keyboards/nullbitsco/common/bitc_led.c b/keyboards/nullbitsco/common/bitc_led.c deleted file mode 100644 index 64d7c7160a..0000000000 --- a/keyboards/nullbitsco/common/bitc_led.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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 "bitc_led.h" - -void set_bitc_LED(uint8_t mode) { - switch(mode) { - case LED_ON: - setPinOutput(PIN_LED); - writePin(PIN_LED, GPIO_STATE_HIGH); - break; - - case LED_DIM: - setPinInput(PIN_LED); - break; - - case LED_OFF: - setPinOutput(PIN_LED); - writePin(PIN_LED, GPIO_STATE_LOW); - break; - - default: - break; - } -}
\ No newline at end of file diff --git a/keyboards/nullbitsco/common/bitc_led.h b/keyboards/nullbitsco/common/bitc_led.h deleted file mode 100644 index 14cd4f15b7..0000000000 --- a/keyboards/nullbitsco/common/bitc_led.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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" - -#define LED_ON 2 -#define LED_DIM 1 -#define LED_OFF 0 - -#define GPIO_STATE_LOW 0 -#define GPIO_STATE_HIGH 1 - -#define PIN_LED F0 - -void set_bitc_LED(uint8_t mode);
\ No newline at end of file diff --git a/keyboards/nullbitsco/common/remote_kb.c b/keyboards/nullbitsco/common/remote_kb.c deleted file mode 100644 index 8e3f7f6766..0000000000 --- a/keyboards/nullbitsco/common/remote_kb.c +++ /dev/null @@ -1,176 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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/>. - */ - -/* -Remote keyboard is an experimental feature that allows for connecting another -keyboard, macropad, numpad, or accessory without requiring an additional USB connection. -The "remote keyboard" forwards its keystrokes using UART serial over TRRS. Dynamic VUSB -detect allows the keyboard automatically switch to host or remote mode depending on -which is connected to the USB port. - -Possible functionality includes the ability to send data from the host to the remote using -a reverse link, allowing for LED sync, configuration, and more data sharing between devices. -This will require a new communication protocol, as the current one is limited. -*/ - -#include "remote_kb.h" -#include "uart.h" - -uint8_t - msg[UART_MSG_LEN], - msg_idx = 0; - -bool - is_host = true; - -// Private functions - -static bool vbus_detect(void) { - #if defined(__AVR_ATmega32U4__) - //returns true if VBUS is present, false otherwise. - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(10); - return (USBSTA & (1<<VBUS)); //checks state of VBUS - #else - #error vbus_detect is not implemented for this architecure! - #endif -} - -static uint8_t chksum8(const unsigned char *buf, size_t len) { - unsigned int sum; - for (sum = 0 ; len != 0 ; len--) - sum += *(buf++); - return (uint8_t)sum; -} - -static void send_msg(uint16_t keycode, bool pressed) { - msg[IDX_PREAMBLE] = UART_PREAMBLE; - msg[IDX_KCLSB] = (keycode & 0xFF); - msg[IDX_KCMSB] = (keycode >> 8) & 0xFF; - msg[IDX_PRESSED] = pressed; - msg[IDX_CHECKSUM] = chksum8(msg, UART_MSG_LEN-1); - uart_transmit(msg, UART_MSG_LEN); -} - -static inline void print_message_buffer(void) { - for (int i=0; i<UART_MSG_LEN; i++) { - dprintf("msg[%u]: 0x%02X\n", i, msg[i]); - } -} - -static void process_uart(void) { - uint8_t chksum = chksum8(msg, UART_MSG_LEN-1); - if (msg[IDX_PREAMBLE] != UART_PREAMBLE || msg[IDX_CHECKSUM] != chksum) { - dprintf("UART checksum mismatch!\n"); - print_message_buffer(); - dprintf("calc checksum: 0x%02X\n", chksum); - } else { - uint16_t keycode = (uint16_t)msg[IDX_KCLSB] | ((uint16_t)msg[IDX_KCMSB] << 8); - bool pressed = (bool)msg[IDX_PRESSED]; - if (IS_RM_KC(keycode)) { - keyrecord_t record; - record.event.pressed = pressed; - if (pressed) dprintf("Remote macro: press [%u]\n", keycode); - else dprintf("Remote macro: release [%u]\n", keycode); - process_record_user(keycode, &record); - } else { - if (pressed) { - dprintf("Remote: press [%u]\n", keycode); - register_code(keycode); - } else { - dprintf("Remote: release [%u]\n", keycode); - unregister_code(keycode); - } - } - } -} - -static void get_msg(void) { - while (uart_available()) { - msg[msg_idx] = uart_read(); - dprintf("idx: %u, recv: 0x%002X\n", msg_idx, msg[msg_idx]); - if (msg_idx == 0 && (msg[msg_idx] != UART_PREAMBLE)) { - dprintf("Byte sync error!\n"); - msg_idx = 0; - } else if (msg_idx == (UART_MSG_LEN-1)) { - process_uart(); - msg_idx = 0; - break; - } else { - msg_idx++; - } - } -} - -static void handle_host_incoming(void) { - get_msg(); -} - -static void handle_host_outgoing(void) { - // for future reverse link use -} - -static void handle_remote_incoming(void) { - // for future reverse link use -} - -static void handle_remote_outgoing(uint16_t keycode, keyrecord_t *record) { - if (IS_HID_KC(keycode) || IS_RM_KC(keycode)) { - dprintf("Remote: send [%u]\n", keycode); - send_msg(keycode, record->event.pressed); - } -} - -// Public functions - -void matrix_init_remote_kb(void) { - uart_init(SERIAL_UART_BAUD); - is_host = vbus_detect(); -} - -void process_record_remote_kb(uint16_t keycode, keyrecord_t *record) { - #if defined (KEYBOARD_HOST) - handle_host_outgoing(); - - #elif defined(KEYBOARD_REMOTE) - handle_remote_outgoing(keycode, record); - - #else //auto check with VBUS - if (is_host) { - handle_host_outgoing(); - } - else { - handle_remote_outgoing(keycode, record); - } - #endif -} - -void matrix_scan_remote_kb(void) { - #if defined(KEYBOARD_HOST) - handle_host_incoming(); - - #elif defined (KEYBOARD_REMOTE) - handle_remote_incoming(); - - #else //auto check with VBUS - if (is_host) { - handle_host_incoming(); - } - else { - handle_remote_incoming(); - } - #endif -} diff --git a/keyboards/nullbitsco/common/remote_kb.h b/keyboards/nullbitsco/common/remote_kb.h deleted file mode 100644 index da124bf5f4..0000000000 --- a/keyboards/nullbitsco/common/remote_kb.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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" - -#define SERIAL_UART_BAUD 76800 //low error rate for 32u4 @ 16MHz - -#define UART_PREAMBLE 0x69 -#define UART_MSG_LEN 5 -#define UART_NULL 0 - -#define IDX_PREAMBLE 0 -#define IDX_KCLSB 1 -#define IDX_KCMSB 2 -#define IDX_PRESSED 3 -#define IDX_CHECKSUM 4 - -#define IS_HID_KC(x) ((x > 0) && (x < 0xFF)) -#define IS_RM_KC(x) ((x >= RM_BASE) && (x <= 0xFFFF)) - -#define RM_BASE 0xFFFF-16 -enum remote_macros { - RM_1 = RM_BASE, - RM_2, RM_3, - RM_4, RM_5, - RM_6, RM_7, - RM_8, RM_9, - RM_10, RM_11, - RM_12, RM_13, - RM_14, RM_15, -}; - - -// Public functions -void - matrix_init_remote_kb(void), - process_record_remote_kb(uint16_t keycode, keyrecord_t *record), - matrix_scan_remote_kb(void);
\ No newline at end of file diff --git a/keyboards/nullbitsco/info.json b/keyboards/nullbitsco/info.json deleted file mode 100644 index 28adc903ad..0000000000 --- a/keyboards/nullbitsco/info.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "maintainer": "nullbitsco" -} diff --git a/keyboards/nullbitsco/nibble/big_led.c b/keyboards/nullbitsco/nibble/big_led.c deleted file mode 100644 index d66a808153..0000000000 --- a/keyboards/nullbitsco/nibble/big_led.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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 "big_led.h" - -void set_big_LED_rgb(uint8_t r_mode, uint8_t g_mode, uint8_t b_mode) { - set_big_LED_r(r_mode); - set_big_LED_g(g_mode); - set_big_LED_b(b_mode); -} - -void set_big_LED_r(uint8_t mode) { - switch(mode) { - case LED_ON: - setPinOutput(BIG_LED_R_PIN); - writePin(BIG_LED_R_PIN, GPIO_STATE_HIGH); - break; - - case LED_OFF: - setPinOutput(BIG_LED_R_PIN); - writePin(BIG_LED_R_PIN, GPIO_STATE_LOW); - break; - - default: - break; - } -} - -void set_big_LED_g(uint8_t mode) { - switch(mode) { - case LED_ON: - setPinOutput(BIG_LED_G_PIN); - writePin(BIG_LED_G_PIN, GPIO_STATE_HIGH); - break; - - case LED_OFF: - setPinOutput(BIG_LED_G_PIN); - writePin(BIG_LED_G_PIN, GPIO_STATE_LOW); - break; - - default: - break; - } -} - -void set_big_LED_b(uint8_t mode) { - switch(mode) { - case LED_ON: - setPinOutput(BIG_LED_B_PIN); - writePin(BIG_LED_B_PIN, GPIO_STATE_HIGH); - break; - - case LED_OFF: - setPinOutput(BIG_LED_B_PIN); - writePin(BIG_LED_B_PIN, GPIO_STATE_LOW); - break; - - default: - break; - } -} diff --git a/keyboards/nullbitsco/nibble/big_led.h b/keyboards/nullbitsco/nibble/big_led.h deleted file mode 100644 index 4ebcc35f08..0000000000 --- a/keyboards/nullbitsco/nibble/big_led.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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" - -/* Optional big LED pins */ -#define BIG_LED_R_PIN D7 -#define BIG_LED_G_PIN C6 -#define BIG_LED_B_PIN D0 - -#define LED_ON 2 -#define LED_OFF 0 - -#define GPIO_STATE_LOW 0 -#define GPIO_STATE_HIGH 1 - -void - set_big_LED_rgb(uint8_t r_mode, uint8_t g_mode, uint8_t b_mode), - set_big_LED_r(uint8_t mode), - set_big_LED_g(uint8_t mode), - set_big_LED_b(uint8_t mode); diff --git a/keyboards/nullbitsco/nibble/config.h b/keyboards/nullbitsco/nibble/config.h deleted file mode 100644 index c4461c5b20..0000000000 --- a/keyboards/nullbitsco/nibble/config.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright 2021 Jay Greco - * - * 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 "config_common.h" - -/* Used to set host for remote KB if VUSB detect doesn't work. */ -// #define KEYBOARD_HOST // Force host mode -// #define KEYBOARD_REMOTE // Force remote mode - -// Workaround for freezing after MacOS sleep -#define NO_USB_STARTUP_CHECK - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 16 -#define MATRIX_MUX_COLS 4 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 10 - -/* - * Keyboard Matrix Assignments - * The nibble uses a demultiplexer for the cols. - * to free up more IOs for awesomeness! - * See matrix.c for more details. -*/ -#define MATRIX_ROW_PINS { B1, B3, B2, B6, D4 } -#define MATRIX_COL_MUX_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { } - -/* Optional SMT LED pins */ -#define RGB_DI_PIN E6 -#define RGBLED_NUM 10 -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_SLEEP - -/* Optional encoder pins */ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 }
\ No newline at end of file diff --git a/keyboards/nullbitsco/nibble/info.json b/keyboards/nullbitsco/nibble/info.json deleted file mode 100644 index 33ae369936..0000000000 --- a/keyboards/nullbitsco/nibble/info.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "keyboard_name": "NIBBLE", - "manufacturer": "nullbits", - "url": "https://nullbits.co/nibble/", - "usb": { - "vid": "0x6E61", - "pid": "0x6060", - "device_version": "0.0.1" - }, - "layouts": { - "LAYOUT_all": { - "layout": [ - {"label":"Esc", "x":1, "y":0}, - {"label":"!", "x":2, "y":0}, - {"label":"@", "x":3, "y":0}, - {"label":"#", "x":4, "y":0}, - {"label":"$", "x":5, "y":0}, - {"label":"%", "x":6, "y":0}, - {"label":"^", "x":7, "y":0}, - {"label":"&", "x":8, "y":0}, - {"label":"*", "x":9, "y":0}, - {"label":"(", "x":10, "y":0}, - {"label":")", "x":11, "y":0}, - {"label":"_", "x":12, "y":0}, - {"label":"+", "x":13, "y":0}, - {"label":"Backspace", "x":14, "y":0, "w":2}, - {"label":"Home", "x":16, "y":0}, - {"label":"ENC", "x":0, "y":1}, - {"label":"Tab", "x":1, "y":1, "w":1.5}, - {"label":"Q", "x":2.5, "y":1}, - {"label":"W", "x":3.5, "y":1}, - {"label":"E", "x":4.5, "y":1}, - {"label":"R", "x":5.5, "y":1}, - {"label":"T", "x":6.5, "y":1}, - {"label":"Y", "x":7.5, "y":1}, - {"label":"U", "x":8.5, "y":1}, - {"label":"I", "x":9.5, "y":1}, - {"label":"O", "x":10.5, "y":1}, - {"label":"P", "x":11.5, "y":1}, - {"label":"{", "x":12.5, "y":1}, - {"label":"}", "x":13.5, "y":1}, - {"label":"|", "x":14.5, "y":1, "w":1.5}, - {"label":"Delete", "x":16, "y":1}, - {"label":"M1", "x":0, "y":2}, - {"label":"Caps Lock", "x":1, "y":2, "w":1.25}, - {"label":"A", "x":2.75, "y":2}, - {"label":"S", "x":3.75, "y":2}, - {"label":"D", "x":4.75, "y":2}, - {"label":"F", "x":5.75, "y":2}, - {"label":"G", "x":6.75, "y":2}, - {"label":"H", "x":7.75, "y":2}, - {"label":"J", "x":8.75, "y":2}, - {"label":"K", "x":9.75, "y":2}, - {"label":"L", "x":10.75, "y":2}, - {"label":":", "x":11.75, "y":2}, - {"label":"\"", "x":12.75, "y":2}, - {"label":"Enter", "x":13.75, "y":2, "w":2.25}, - {"label":"PgUp", "x":16, "y":2}, - {"label":"M2", "x":0, "y":3}, - {"label":"Shift", "x":1, "y":3, "w":1.25}, - {"label":"ISO \\", "x":2.25, "y":3}, - {"label":"Z", "x":3.25, "y":3}, - {"label":"X", "x":4.25, "y":3}, - {"label":"C", "x":5.25, "y":3}, - {"label":"V", "x":6. |