From b6850bc043b1d129042f47501f0a1dc1e196f962 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 9 Apr 2019 08:58:11 -0700 Subject: remove all keyboards but ergodox and planck --- keyboards/fc660c/README.md | 167 ---------------------- keyboards/fc660c/actuation_point.c | 87 ------------ keyboards/fc660c/actuation_point.h | 32 ----- keyboards/fc660c/config.h | 82 ----------- keyboards/fc660c/fc660c.c | 56 -------- keyboards/fc660c/fc660c.h | 57 -------- keyboards/fc660c/i2c.c | 162 --------------------- keyboards/fc660c/i2c.h | 49 ------- keyboards/fc660c/info.json | 12 -- keyboards/fc660c/keymaps/dbroqua/keymap.c | 44 ------ keyboards/fc660c/keymaps/default/README.md | 5 - keyboards/fc660c/keymaps/default/config.h | 19 --- keyboards/fc660c/keymaps/default/keymap.c | 34 ----- keyboards/fc660c/matrix.c | 217 ----------------------------- keyboards/fc660c/rules.mk | 66 --------- 15 files changed, 1089 deletions(-) delete mode 100644 keyboards/fc660c/README.md delete mode 100644 keyboards/fc660c/actuation_point.c delete mode 100644 keyboards/fc660c/actuation_point.h delete mode 100644 keyboards/fc660c/config.h delete mode 100644 keyboards/fc660c/fc660c.c delete mode 100644 keyboards/fc660c/fc660c.h delete mode 100644 keyboards/fc660c/i2c.c delete mode 100644 keyboards/fc660c/i2c.h delete mode 100644 keyboards/fc660c/info.json delete mode 100644 keyboards/fc660c/keymaps/dbroqua/keymap.c delete mode 100644 keyboards/fc660c/keymaps/default/README.md delete mode 100644 keyboards/fc660c/keymaps/default/config.h delete mode 100644 keyboards/fc660c/keymaps/default/keymap.c delete mode 100644 keyboards/fc660c/matrix.c delete mode 100644 keyboards/fc660c/rules.mk (limited to 'keyboards/fc660c') diff --git a/keyboards/fc660c/README.md b/keyboards/fc660c/README.md deleted file mode 100644 index 638c559577..0000000000 --- a/keyboards/fc660c/README.md +++ /dev/null @@ -1,167 +0,0 @@ -FC660C Alt Controller -================= - -This file and the entire QMK port of this board are based on its TMK implementation: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/fc980c - ------------- - -- Keyboard Maintainer: [Balz Guenat](https://github.com/BalzGuenat) -- Hardware Supported: Hasu's Alt Controller (see below) -- Hardware Availability: https://geekhack.org/index.php?topic=90317.0 - -Make example for this keyboard (after setting up your build environment): - - make fc660c:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. - -To flash the firmware, press the reset button on the controller and run: - - sudo make fc660c:default:dfu - --------- - -Thread on Geekhack: https://geekhack.org/index.php?topic=88439.0 - -Also: https://geekhack.org/index.php?topic=88720.0 - - -Actuation Point adjustment --------------------------- -You can adjust the actuation point of the keys by setting `ACTUATION_DEPTH_ADJUSTMENT` in `config.h`. -A value above 0 will result in a deeper, less sensitive actuation whereas a value above 1 will result in a more shallow, more sensitive actuation. -Be careful with this setting and use small values (+/-5). -See the `actuation-point-example` keymap of the `fc980c` keyboard for an example. -For more information, inspect the `fc660c_i2c` branch of TMK [here](https://github.com/tmk/tmk_keyboard/tree/fc660c_i2c). -Functionality for writing to the EEPROM has deliberately not been included to reduce the chance of people messing up their boards. - - -Pinouts -------- - - |Switch |Controller | - | board | board |Description |Schematic |ATmega32u4 - |--------|-----------|--------------------------------------|-----------|------------ - | 1 |20 | FG |FG |GND - | 2 |19 | GND |GND |GND - | 3 |18 | GND |GND |GND - | 4 |17 | 3.3V |V33 |3.3V/5V - | 5 |16 | 5V |Vcc |5V - | 6 |15 |*Z6-TP1684-4-HYS(o) |FBSTB |PC7 - | 7 |14 |*Z6-TP1684-2-KEY(i) |OUT |PC6 - | 8 |13 |*Z2-AD5258-5-SCL(I2C) |SCL |PD0(TWI) - | 9 |12 |*Z2-AD5258-4-SDA(I2C) |SDA |PD1(TWI) - |10 |11 |*Z4-LV4051A-6-~EN(Col 0-7) |INH_1 |PB4 - |11 |10 |*Z5-LV4051A-6-~EN(Col 8-F) |INH_2 |PB3 - |12 | 9 |+Z7-LV07A-5 (LV4051A-9-C) |SEL_C |PB2 - |13 | 8 |+Z7-LV07A-1 (LV4051A-10-B) |SEL_B |PB1 - |14 | 7 |+Z7-LV07A-3 (LV4051A-11-A) |SEL_A |PB0 - |15 | 6 |+Z3-LVC138A-3-C |COL4 |PD6 - |16 | 5 |+Z3-LVC138A-2-B |COL3 |PD5 - |17 | 4 |+Z3-LVC138A-1-A |COL2 |PD4 - |18 | 3 |+Z3-LVC138A-4-~G2A Z6-TP1684-5-~EN |COL1 |PD7 - |19 | 2 |+Z7-LV07A-11-~InsertLED |LED1 |PB5 - |20 | 1 |+Z7-LV07A-13-~CapsLED |LED2 |PB6 - -``` -* 5V intferface -+ 3.3V interface -``` - -- Connector on Switch board: https://i.imgur.com/Zi89xO5.jpg -- Connector on Controller board: https://i.imgur.com/9SZUzYo.jpg - - -Key Matrix ----------- -Row5-7 have no key, you can omit scaning on those lines. Topre original controller scans those rows for some reason. - - | |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |A |B |C |D |E |F | - |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----| - | 0|Q |W |E |Tab |R |U |T |Y |O |P |[ |I |] | |\ |Del | - | 1|1 |2 |3 |Esc |4 |7 |5 |6 |9 |0 |- |8 |= | |BSpc|Ins | - | 2| |LWin|LAlt|LCtl| | | |Spc |RAlt| |RCtl| |Fn |Down|Left|Rght| - | 3| |Z |X |LSft|C |N |V |B |, |. |/ |M |RSft|Up | | | - | 4|A |S |D |Caps|F |J |G |H |L |; |' |K | | |Entr| | - | 5| | | | | | | | | | | | | | | | | - | 6| | | | | | | | | | | | | | | | | - | 7| | | | | | | | | | | | | | | | | - -Logic analyzer pics: -- http://i.imgur.com/9XoNTev.png -- https://i.imgur.com/5FCP1Ay.png - -This code emuluates what original cotnroller does for matrix scan. -- https://github.com/tmk/tmk_keyboard/blob/master/keyboard/fc660c/fc660c.c - - -### Row designation -LV138A(Z3) selects a row line and gives strobe by enabling with ~G2A(18). - - |Row |A/17|B/16|C/15| - |----|----|----|----| - |0 |0 |0 |0 | - |1 |1 |0 |0 | - |2 |0 |1 |0 | - |3 |1 |1 |0 | - |4 |0 |0 |1 | - |5 |1 |0 |1 | - |6 |0 |1 |1 | - |7 |1 |1 |1 | - - -### Column designation -LV4051A(Z4, Z5) select one of 16 column lines to sense capacitance of switches. - - |Col |A/14|B/13|C/12|Z4-EN/10|Z5-EN/11| - |----|----|----|----|--------|--------| - |0 |0 |0 |0 |0 |1 | - |1 |1 |0 |0 |0 |1 | - |2 |0 |1 |0 |0 |1 | - |3 |1 |1 |0 |0 |1 | - |4 |0 |0 |1 |0 |1 | - |5 |1 |0 |1 |0 |1 | - |6 |0 |1 |1 |0 |1 | - |7 |1 |1 |1 |0 |1 | - |8 |0 |0 |0 |1 |0 | - |9 |1 |0 |0 |1 |0 | - |A |0 |1 |0 |1 |0 | - |B |1 |1 |0 |1 |0 | - |C |0 |0 |1 |1 |0 | - |D |1 |0 |1 |1 |0 | - |E |0 |1 |1 |1 |0 | - |F |1 |1 |1 |1 |0 | - - -FCC documents -------------- -https://fccid.io/RPKFC660C - -- schematic: https://fccid.io/pdf.php?id=1888185 -- part list: https://fccid.io/pdf.php?id=1888184 - - -Datasheets ----------- -- Hirose DF14A-20P-1.25H: http://www.mouser.com/ds/2/185/DF14_catalog-939195.pdf -- LV07A: http://www.ti.com/lit/ds/symlink/sn74lv07a.pdf -- LV138A: http://www.ti.com/lit/ds/symlink/sn74lvc138a.pdf -- LV4051A: http://www.ti.com/lit/ds/symlink/sn74lv4051a.pdf -- AD5258: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf - - -3.3V power supply ------------------ -LV07A and LVC138A are 5V-tolerant and can be powered with 5V, the keyboard will work only with 5V power supply. It may not be completely safe to operate LV138A with 5V Vcc, its datasheet says: - -> Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability. - -Digipot AD5258 --------------- -Controller can operate AD5258 via I2C to change actuation point of keys. This may make keyboard unusable accidentally and it will be difficult to recovery in some situation. For safety firmware doesn't support it at this point, though. - -Lower value of RDAC register causes shallower actuation point. - -Resources ---------- -- Pics: https://imgur.com/a/UTR8Z diff --git a/keyboards/fc660c/actuation_point.c b/keyboards/fc660c/actuation_point.c deleted file mode 100644 index 5f4cb16f40..0000000000 --- a/keyboards/fc660c/actuation_point.c +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2017 Balz Guenat -based on work by Jun Wako - -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 . -*/ - -#include "actuation_point.h" -#include "i2c.h" - -/////////////////////////////////////////////////////////////////////////////// -// -// AD5258 I2C digital potentiometer -// http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf -// -#define AD5258_ADDR 0b0011000 -#define AD5258_INST_RDAC 0x00 -#define AD5258_INST_EEPROM 0x20 - -uint8_t read_rdac(void) { - // read RDAC register - i2c_start_write(AD5258_ADDR); - i2c_master_write(AD5258_INST_RDAC); - i2c_start_read(AD5258_ADDR); - uint8_t ret = i2c_master_read(I2C_NACK); - i2c_master_stop(); - return ret; -}; - -uint8_t read_eeprom(void) { - i2c_start_write(AD5258_ADDR); - i2c_master_write(AD5258_INST_EEPROM); - i2c_start_read(AD5258_ADDR); - uint8_t ret = i2c_master_read(I2C_NACK); - i2c_master_stop(); - return ret; -}; - -void write_rdac(uint8_t rdac) { - // write RDAC register: - i2c_start_write(AD5258_ADDR); - i2c_master_write(AD5258_INST_RDAC); - i2c_master_write(rdac & 0x3F); - i2c_master_stop(); -}; - -void actuation_point_up(void) { - // write RDAC register: lower value makes actuation point shallow - uint8_t rdac = read_rdac(); - if (rdac == 0) - write_rdac(0); - else - write_rdac(rdac-1); -}; - -void actuation_point_down(void) { - // write RDAC register: higher value makes actuation point deep - uint8_t rdac = read_rdac(); - if (rdac == 63) - write_rdac(63); - else - write_rdac(rdac+1); -}; - -void adjust_actuation_point(int offset) { - i2c_master_init(); - uint8_t rdac = read_eeprom() + offset; - if (rdac > 63) { // protects from under and overflows - if (offset > 0) - write_rdac(63); - else - write_rdac(0); - } else { - write_rdac(rdac); - } -} diff --git a/keyboards/fc660c/actuation_point.h b/keyboards/fc660c/actuation_point.h deleted file mode 100644 index f7066d92c1..0000000000 --- a/keyboards/fc660c/actuation_point.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2017 Balz Guenat - -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 . -*/ - -#ifndef ACTUATION_POINT_H -#define ACTUATION_POINT_H - -#include - -// see keymaps/actuation-point-example to see how these functions can be used. -uint8_t read_rdac(void); -uint8_t read_eeprom(void); -void actuation_point_up(void); -void actuation_point_down(void); - -// be careful with this. -void adjust_actuation_point(int offset); - -#endif diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h deleted file mode 100644 index fe9c695174..0000000000 --- a/keyboards/fc660c/config.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2017 Balz Guenat - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x660C -#define DEVICE_VER 0x0100 -#define MANUFACTURER QMK -#define PRODUCT Leopold FC660C with QMK -#define DESCRIPTION Leopold FC660C with Hasu alternative controller using QMK - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 16 - -//#define DIODE_DIRECTION - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 1 - -/* mapping backlight LEDs to correct Pin */ -// #define BACKLIGHT_PIN B7 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 0 -#define TAPPING_TERM 175 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -// #define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -// #define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -#define USE_I2C - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -// higher value means deeper actuation point, less sensitive -// be careful and only make small adjustments (steps of 1 or 2). -// too high and keys will fail to actuate. too low and keys will actuate spontaneously. -// test all keys before further adjustment. -// this should probably stay in the range +/-5. -// #define ACTUATION_DEPTH_ADJUSTMENT 0 - -#endif diff --git a/keyboards/fc660c/fc660c.c b/keyboards/fc660c/fc660c.c deleted file mode 100644 index da6ba9e744..0000000000 --- a/keyboards/fc660c/fc660c.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 Balz Guenat - -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 . -*/ -#include "fc660c.h" - -#ifdef ACTUATION_DEPTH_ADJUSTMENT -#include "actuation_point.h" -#endif - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - -#ifdef ACTUATION_DEPTH_ADJUSTMENT - adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); -#endif - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. -*/ -#ifndef FC660C_H -#define FC660C_H - -#include "quantum.h" - - -#define LAYOUT( \ - K13, K10, K11, K12, K14, K16, K17, K15, K1B, K18, K19, K1A, K1C, K1E, K1F, \ - K03, K00, K01, K02, K04, K06, K07, K05, K0B, K08, K09, K0A, K0C, K0E, K0F, \ - K43, K40, K41, K42, K44, K46, K47, K45, K4B, K48, K49, K4A, K4E, \ - K33, K31, K32, K34, K36, K37, K35, K3B, K38, K39, K3A, K3C, K3D, \ - K23, K21, K22, K27, K28, K2A, K2C, K2E, K2D, K2F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, \ - K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, \ - K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \ - { KC_NO, K21, K22, K23, KC_NO, KC_NO, KC_NO, K27, \ - K28, KC_NO, K2A, KC_NO, K2C, K2D, K2E, K2F }, \ - { KC_NO, K31, K32, K33, K34, K35, K36, K37, \ - K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K4A, K4B, KC_NO, KC_NO, K4E, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ -} -/* -KEYMAP( - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______, _______, _______,_______,_______, _______,_______,_______ - ) -*/ - -#endif diff --git a/keyboards/fc660c/i2c.c b/keyboards/fc660c/i2c.c deleted file mode 100644 index 084c890c40..0000000000 --- a/keyboards/fc660c/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/fc660c/info.json b/keyboards/fc660c/info.json deleted file mode 100644 index 9ed48aad15..0000000000 --- a/keyboards/fc660c/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "fc660c", - "url": "", - "maintainer": "qmk", - "width": 16.5, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "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":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.25}, {"x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Win", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}] - } - } -} \ No newline at end of file diff --git a/keyboards/fc660c/keymaps/dbroqua/keymap.c b/keyboards/fc660c/keymaps/dbroqua/keymap.c deleted file mode 100644 index 0c6931a3f2..0000000000 --- a/keyboards/fc660c/keymaps/dbroqua/keymap.c +++ /dev/null @@ -1,44 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* BASE layer: Default Layer - * ,--------------------------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | | Ins | - * |-----------------------------------------------------------------------------------------+ +-----+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | | Del | - * |-----------------------------------------------------------------------------------------+ +-----+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |--------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | - * +--------------------------------------------------------------------------------------------+-----+ - * | Ctrl | Gui | Alt | Space | Alt | Gui | Fn | Left| Down|Right| - * `--------------------------------------------------------------------------------------------------´ - */ - [0] = LAYOUT( - 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_INS, - 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_DEL, - KC_LCTL,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_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT - ), - /* FN layer - * ,--------------------------------------------------------------------------------------------------. - * | Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | | - * |-----------------------------------------------------------------------------------------+ +-----+ - * | | | | | | | | |PrtSc| Slck| Paus| | | | | | - * |-----------------------------------------------------------------------------------------+ +-----+ - * | | Vol-| Vol+| Mute|Eject| | | | Home| PgUp| | | | - * |--------------------------------------------------------------------------------------------+ - * | | Prev| Play| Next| | | | | End | PgDn| | | | - * +--------------------------------------------------------------------------------------------+-----+ - * | | | | | | | | | | | - * `--------------------------------------------------------------------------------------------------´ - */ - [1] = LAYOUT( - 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_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, - _______,KC_VOLD,KC_VOLU,KC_MUTE,KC_EJCT,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______, - _______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,_______,KC_END, KC_PGDN,_______,_______, _______, - _______,_______,_______, _______, _______,_______,MO(1), _______,_______,_______ - ) -}; diff --git a/keyboards/fc660c/keymaps/default/README.md b/keyboards/fc660c/keymaps/default/README.md deleted file mode 100644 index f813ed0c3e..0000000000 --- a/keyboards/fc660c/keymaps/default/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# The default keymap for the FC660C - -Emulates original keymap. - -![](https://i.imgur.com/fg89nez.jpg) \ No newline at end of file diff --git a/keyboards/fc660c/keymaps/default/config.h b/keyboards/fc660c/keymaps/default/config.h deleted file mode 100644 index b89b05009a..0000000000 --- a/keyboards/fc660c/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2017 Balz Guenat - * - * 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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/fc660c/keymaps/default/keymap.c b/keyboards/fc660c/keymaps/default/keymap.c deleted file mode 100644 index bf890c2c1d..0000000000 --- a/keyboards/fc660c/keymaps/default/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2017 Balz Guenat - -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 . -*/ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, 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_INS, - 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_DEL, - 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_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT - ), - [1] = LAYOUT( - KC_GRV, 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_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,KC_END, KC_PGDN,_______,_______, _______, - _______,_______,_______, _______, _______,_______,MO(1), _______,_______,_______ - ) -}; diff --git a/keyboards/fc660c/matrix.c b/keyboards/fc660c/matrix.c deleted file mode 100644 index e6e4948104..0000000000 --- a/keyboards/fc660c/matrix.c +++ /dev/null @@ -1,217 +0,0 @@ -/* -Copyright 2017 Balz Guenat -based on work by Jun Wako - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "timer.h" -#include "matrix.h" -#include "led.h" - -// Timer resolution check -#if (1000000/TIMER_RAW_FREQ > 20) -# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." -#endif - - -/* - * Pin configuration for ATMega32U4 - * - * Row: PD4-6, 7(~EN) - * Col: PB0-2, 3(Z5 ~EN), 4(Z4 ~EN) - * Key: PC6(pull-uped) - * Hys: PC7 - */ -static inline void KEY_ENABLE(void) { (PORTD &= ~(1<<7)); } -static inline void KEY_UNABLE(void) { (PORTD |= (1<<7)); } -static inline bool KEY_STATE(void) { return (PINC & (1<<6)); } -static inline void KEY_HYS_ON(void) { (PORTC |= (1<<7)); } -static inline void KEY_HYS_OFF(void) { (PORTC &= ~(1<<7)); } -static inline void KEY_INIT(void) -{ - /* Col */ - DDRB |= 0x1F; - /* Key: input with pull-up */ - DDRC &= ~(1<<6); - PORTC |= (1<<6); - /* Hys */ - DDRC |= (1<<7); - /* Row */ - DDRD |= 0xF0; - - KEY_UNABLE(); - KEY_HYS_OFF(); -} -static inline void SET_ROW(uint8_t ROW) -{ - // set row with unabling key - PORTD = (PORTD & 0x0F) | (1<<7) | ((ROW & 0x07) << 4); -} -static inline void SET_COL(uint8_t COL) -{ - // |PB3(Z5 ~EN)|PB4(Z4 ~EN) - // --------|-----------|----------- - // Col:0-7 |high |low - // Col:8-F |low |high - PORTB = (PORTB & 0xE0) | ((COL & 0x08) ? 1<<4 : 1<<3) | (COL & 0x07); -} - -static uint32_t matrix_last_modified = 0; - -// matrix state buffer(1:on, 0:off) -static matrix_row_t *matrix; -static matrix_row_t *matrix_prev; -static matrix_row_t _matrix0[MATRIX_ROWS]; -static matrix_row_t _matrix1[MATRIX_ROWS]; - - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - - -void matrix_init(void) -{ - KEY_INIT(); - - // LEDs on CapsLock and Insert - DDRB |= (1<<5) | (1<<6); - PORTB |= (1<<5) | (1<<6); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; - matrix = _matrix0; - matrix_prev = _matrix1; - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) -{ - matrix_row_t *tmp; - - tmp = matrix_prev; - matrix_prev = matrix; - matrix = tmp; - - uint8_t row, col; - for (col = 0; col < MATRIX_COLS; col++) { - SET_COL(col); - for (row = 0; row < MATRIX_ROWS; row++) { - //KEY_SELECT(row, col); - SET_ROW(row); - _delay_us(2); - - // Not sure this is needed. This just emulates HHKB controller's behaviour. - if (matrix_prev[row] & (1< 20/(1000000/TIMER_RAW_FREQ)) { - matrix[row] = matrix_prev[row]; - } - - _delay_us(5); - KEY_HYS_OFF(); - KEY_UNABLE(); - - // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. - // This takes 25us or more to make sure KEY_STATE returns to idle state. - _delay_us(75); - } - if (matrix[row] ^ matrix_prev[row]) { - matrix_last_modified = timer_read32(); - } - } - matrix_scan_quantum(); - return 1; -} - -inline -matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) -{ -#if (MATRIX_COLS <= 8) - print("r/c 01234567\n"); -#elif (MATRIX_COLS <= 16) - print("r/c 0123456789ABCDEF\n"); -#elif (MATRIX_COLS <= 32) - print("r/c 0123456789ABCDEF0123456789ABCDEF\n"); -#endif - - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - -#if (MATRIX_COLS <= 8) - xprintf("%02X: %08b%s\n", row, bitrev(matrix_get_row(row)), -#elif (MATRIX_COLS <= 16) - xprintf("%02X: %016b%s\n", row, bitrev16(matrix_get_row(row)), -#elif (MATRIX_COLS <= 32) - xprintf("%02X: %032b%s\n", row, bitrev32(matrix_get_row(row)), -#endif -#ifdef MATRIX_HAS_GHOST - matrix_has_ghost_in_row(row) ? "