summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired/frenchdev
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/frenchdev')
-rw-r--r--keyboards/handwired/frenchdev/config.h73
-rw-r--r--keyboards/handwired/frenchdev/frenchdev.c107
-rw-r--r--keyboards/handwired/frenchdev/frenchdev.h110
-rw-r--r--keyboards/handwired/frenchdev/info.json116
-rw-r--r--keyboards/handwired/frenchdev/keymaps/default/readme.md13
-rw-r--r--keyboards/handwired/frenchdev/matrix.c336
-rw-r--r--keyboards/handwired/frenchdev/readme.md101
-rw-r--r--keyboards/handwired/frenchdev/rules.mk23
8 files changed, 0 insertions, 879 deletions
diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h
deleted file mode 100644
index f3d5398270..0000000000
--- a/keyboards/handwired/frenchdev/config.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 201 Nicolas Poirey <nicolas.poirey@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 "config_common.h"
-
-/* key matrix size */
-#define MATRIX_ROWS 16
-#define MATRIX_COLS 6
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-#define LED_BRIGHTNESS_LO 15
-#define LED_BRIGHTNESS_HI 255
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE 5
-
-#define USB_MAX_POWER_CONSUMPTION 500
-
-#define MOUSEKEY_INTERVAL 20
-#define MOUSEKEY_DELAY 0
-#define MOUSEKEY_TIME_TO_MAX 5
-#define MOUSEKEY_MAX_SPEED 2
-#define MOUSEKEY_WHEEL_DELAY 0
-
-#define TAPPING_TOGGLE 1
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
-#define TAPPING_TERM 200
-#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
-
-/* key combination for command */
-#define IS_COMMAND() ( \
- get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
- get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
-)
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* 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 DEBUG_MATRIX_SCAN_RATE
diff --git a/keyboards/handwired/frenchdev/frenchdev.c b/keyboards/handwired/frenchdev/frenchdev.c
deleted file mode 100644
index 6eed4de5ff..0000000000
--- a/keyboards/handwired/frenchdev/frenchdev.c
+++ /dev/null
@@ -1,107 +0,0 @@
-#include "frenchdev.h"
-
-extern inline void frenchdev_board_led_on(void);
-extern inline void frenchdev_led_1_on(void);
-extern inline void frenchdev_led_2_on(void);
-extern inline void frenchdev_led_3_on(void);
-extern inline void frenchdev_led_on(uint8_t led);
-
-extern inline void frenchdev_board_led_off(void);
-extern inline void frenchdev_led_1_off(void);
-extern inline void frenchdev_led_2_off(void);
-extern inline void frenchdev_led_3_off(void);
-extern inline void frenchdev_led_off(uint8_t led);
-
-extern inline void frenchdev_led_all_on(void);
-extern inline void frenchdev_led_all_off(void);
-
-extern inline void frenchdev_led_1_set(uint8_t n);
-extern inline void frenchdev_led_2_set(uint8_t n);
-extern inline void frenchdev_led_3_set(uint8_t n);
-extern inline void frenchdev_led_set(uint8_t led, uint8_t n);
-
-extern inline void frenchdev_led_all_set(uint8_t n);
-
-bool i2c_initialized = 0;
-uint8_t mcp23018_status = 0x20;
-
-void matrix_init_kb(void) {
- // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
- TCCR1A = 0b10101001; // set and configure fast PWM
- TCCR1B = 0b00001001; // set and configure fast PWM
-
-
-
- // unused pins - D4, D5, D7, E6
- // set as input with internal pull-ip enabled
- DDRD &= ~(1<<5 | 1<<4);
- DDRE &= ~(1<<6);
- PORTD |= (1<<5 | 1<<4);
- PORTE |= (1<<6);
-
- frenchdev_blink_all_leds();
- frenchdev_blink_all_leds();
- frenchdev_blink_all_leds();
- frenchdev_blink_all_leds();
-
- matrix_init_user();
-}
-
-void frenchdev_blink_all_leds(void)
-{
- frenchdev_led_all_off();
- frenchdev_led_all_set(LED_BRIGHTNESS_HI);
- frenchdev_led_1_on();
- wait_ms(50);
- frenchdev_led_2_on();
- wait_ms(50);
- frenchdev_led_3_on();
- wait_ms(50);
- frenchdev_led_1_off();
- wait_ms(50);
- frenchdev_led_2_off();
- wait_ms(50);
- frenchdev_led_3_off();
- frenchdev_led_all_off();
-}
-
-uint8_t init_mcp23018(void) {
- mcp23018_status = 0x20;
-
- // I2C subsystem
-
- // uint8_t sreg_prev;
- // sreg_prev=SREG;
- // cli();
- if (i2c_initialized == 0) {
- i2c_init(); // on pins D(1,0)
- i2c_initialized = true;;
- wait_ms(1000);
- }
-
- // set pin direction
- // - unused : input : 1
- // - input : input : 1
- // - driving : output : 0
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(IODIRA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
- i2c_stop();
-
- // set pull-up
- // - unused : on : 1
- // - input : on : 1
- // - driving : off : 0
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPPUA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
-
-out:
- i2c_stop();
-
- // SREG=sreg_prev;
-
- return mcp23018_status;
-}
diff --git a/keyboards/handwired/frenchdev/frenchdev.h b/keyboards/handwired/frenchdev/frenchdev.h
deleted file mode 100644
index d608fe9f09..0000000000
--- a/keyboards/handwired/frenchdev/frenchdev.h
+++ /dev/null
@@ -1,110 +0,0 @@
-#pragma once
-
-#include "quantum.h"
-#include <stdint.h>
-#include <stdbool.h>
-#include "i2c_master.h"
-#include <util/delay.h>
-
-// I2C aliases and register addresses (see "mcp23018.md" on tmk repository)
-#define I2C_ADDR 0b0100000
-#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
-#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
-#define IODIRA 0x00 // i/o direction register
-#define IODIRB 0x01
-#define GPPUA 0x0C // GPIO pull-up resistor register
-#define GPPUB 0x0D
-#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
-#define GPIOB 0x13
-#define OLATA 0x14 // output latch register
-#define OLATB 0x15
-
-extern uint8_t mcp23018_status;
-#define I2C_TIMEOUT 100
-
-void init_frenchdev(void);
-void frenchdev_blink_all_leds(void);
-uint8_t init_mcp23018(void);
-
-#define LED_BRIGHTNESS_LO 15
-#define LED_BRIGHTNESS_HI 255
-
-
-inline void frenchdev_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); }
-inline void frenchdev_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
-inline void frenchdev_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
-inline void frenchdev_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
-inline void frenchdev_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); }
-
-inline void frenchdev_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
-inline void frenchdev_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
-inline void frenchdev_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
-inline void frenchdev_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
-inline void frenchdev_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); }
-
-inline void frenchdev_led_all_on(void)
-{
- frenchdev_board_led_on();
- frenchdev_led_1_on();
- frenchdev_led_2_on();
- frenchdev_led_3_on();
-}
-
-inline void frenchdev_led_all_off(void)
-{
- frenchdev_board_led_off();
- frenchdev_led_1_off();
- frenchdev_led_2_off();
- frenchdev_led_3_off();
-}
-
-inline void frenchdev_led_1_set(uint8_t n) { OCR1A = n; }
-inline void frenchdev_led_2_set(uint8_t n) { OCR1B = n; }
-inline void frenchdev_led_3_set(uint8_t n) { OCR1C = n; }
-inline void frenchdev_led_set(uint8_t led, uint8_t n) {
- (led == 1) ? (OCR1A = n) :
- (led == 2) ? (OCR1B = n) :
- (OCR1C = n);
-}
-
-inline void frenchdev_led_all_set(uint8_t n)
-{
- frenchdev_led_1_set(n);
- frenchdev_led_2_set(n);
- frenchdev_led_3_set(n);
-}
-
-#define LAYOUT( \
- \
- k01, k02, k03, k04, k05, k06, k09, k0a, k0b, k0c, k0d, k0e, \
- k10, k11, k12, k13, k14, k15, k16, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
- k20, k21, k22, k23, k24, k25, k26, k29, k2a, k2b, k2c, k2d, k2e, k2f, \
- k30, k31, k32, k33, k34, k35, k36, k39, k3a, k3b, k3c, k3d, k3e, k3f, \
- k40, k41, k42, k43, k44, k45, k46, k47, k37, k38, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, \
- k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e, k5f, \
- \
- PL1, PL2, PL3, \
- PR1, PR2, PR3 \
- ) \
- \
- /* matrix positions, inverted left and right for I2C to be on row 0-7 */\
- { \
- \
- { k5f, k4f, k3f, k2f, k1f, KC_NO}, \
- { k5e, k4e, k3e, k2e, k1e, k0e }, \
- { k5d, k4d, k3d, k2d, k1d, k0d }, \
- { k5c, k4c, k3c, k2c, k1c, k0c }, \
- { k5b, k4b, k3b, k2b, k1b, k0b }, \
- { k5a, k4a, k3a, k2a, k1a, k0a }, \
- { k59, k49, k39, k29, k19, k09 }, \
- { k58, k48, k38, PR1, PR2, PR3 }, \
- \
- { k57, k47, k37, PL1, PL2, PL3 }, \
- { k56, k46, k36, k26, k16, k06 }, \
- { k55, k45, k35, k25, k15, k05 }, \
- { k54, k44, k34, k24, k14, k04 }, \
- { k53, k43, k33, k23, k13, k03 }, \
- { k52, k42, k32, k22, k12, k02 }, \
- { k51, k41, k31, k21, k11, k01 }, \
- { k50, k40, k30, k20, k10, KC_NO } \
- }
diff --git a/keyboards/handwired/frenchdev/info.json b/keyboards/handwired/frenchdev/info.json
deleted file mode 100644
index 48725f37ac..0000000000
--- a/keyboards/handwired/frenchdev/info.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "keyboard_name": "Frenchdev V1",
- "manufacturer": "Nicolas Poirey",
- "maintainer": "qmk",
- "usb": {
- "vid": "0xFEED",
- "pid": "0x1307",
- "device_version": "0.0.1"
- },
- "layouts": {
- "LAYOUT": {
- "layout": [
- {"label":"F1", "x":1, "y":0.9},
- {"label":"F2", "x":2, "y":0.3},
- {"label":"F3", "x":3, "y":0},
- {"label":"F4", "x":4, "y":0.4},
- {"label":"F5", "x":5, "y":0.5},
- {"label":"F6", "x":6, "y":0.5},
- {"label":"F7", "x":13, "y":0.5},
- {"label":"F8", "x":14, "y":0.5},
- {"label":"F9", "x":15, "y":0.4},
- {"label":"F10", "x":16, "y":0},
- {"label":"F11", "x":17, "y":0.3},
- {"label":"F12", "x":18, "y":0.9},
-
- {"label":"Esc", "x":0, "y":1.9},
- {"label":"\"", "x":1, "y":1.9},
- {"label":"\u00ab", "x":2, "y":1.3},
- {"label":"\u00bb", "x":3, "y":1},
- {"label":"(", "x":4, "y":1.4},
- {"label":")", "x":5, "y":1.5},
- {"label":"\u00a8", "x":6, "y":1.5},
- {"label":"^", "x":13, "y":1.5},
- {"label":"@", "x":14, "y":1.5},
- {"label":"+", "x":15, "y":1.4},
- {"label":"-", "x":16, "y":1},
- {"label":"/", "x":17, "y":1.3},
- {"label":"*", "x":18, "y":1.9},
- {"label":"Backspace", "x":19, "y":1.9},
-
- {"label":"Tab", "x":0, "y":2.9},
- {"label":"B", "x":1, "y":2.9},
- {"label":"&Eacute;", "x":2, "y":2.3},
- {"label":"P", "x":3, "y":2},
- {"label":"O", "x":4, "y":2.4},
- {"label":"&Egrave;", "x":5, "y":2.5},
- {"label":"_", "x":6, "y":2.5},
- {"label":"=", "x":13, "y":2.5},
- {"label":"K", "x":14, "y":2.5},
- {"label":"V", "x":15, "y":2.4},
- {"label":"D", "x":16, "y":2},
- {"label":"L", "x":17, "y":2.3},
- {"label":"J", "x":18, "y":2.9},
- {"label":"Enter", "x":19, "y":2.9},
-
- {"label":"`", "x":0, "y":3.9},
- {"label":"A", "x":1, "y":3.9},
- {"label":"U", "x":2, "y":3.3},
- {"label":"E", "x":3, "y":3},
- {"label":"I", "x":4, "y":3.4},
- {"label":"F", "x":5, "y":3.5},
- {"label":";", "x":6, "y":3.5},
- {"label":"!", "x":13, "y":3.5},
- {"label":"C", "x":14, "y":3.5},
- {"label":"T", "x":15, "y":3.4},
- {"label":"S", "x":16, "y":3},
- {"label":"R", "x":17, "y":3.3},
- {"label":"N", "x":18, "y":3.9},
- {"label":"'", "x":19, "y":3.9},
-
- {"label":"Shift", "x":0, "y":4.9},
- {"label":"Z", "x":1, "y":4.9},
- {"label":"&Agrave;", "x":2, "y":4.3},
- {"label":"Y", "x":3, "y":4},
- {"label":"X", "x":4, "y":4.4},
- {"label":"]", "x":5, "y":4.5},
- {"label":"Shift/Space", "x":6.5, "y":5},
- {"label":"Ctrl/Backspace", "x":7.5, "y":5},
- {"label":"Layer 2/Insert", "x":8.5, "y":5},
- {"label":"Layer 2 Lock", "x":10.5, "y":5},
- {"label":"Ctrl/Delete", "x":11.5, "y":5},
- {"label":"Shift/Space", "x":12.5, "y":5},
- {"label":"M", "x":14, "y":4.5},
- {"label":"G", "x":15, "y":4.4},
- {"label":"Up", "x":16, "y":4},
- {"label":"H", "x":17, "y":4.3},
- {"label":"Q", "x":18, "y":4.9},
- {"label":"Shift", "x":19, "y":4.9},
-
- {"label":"Ctrl", "x":0, "y":5.9},
- {"label":"GUI", "x":1, "y":5.9},
- {"label":"Keypad /", "x":2, "y":5.3},
- {"label":".", "x":3, "y":5},
- {"label":",", "x":4, "y":5.4},
- {"label":"Space", "x":5, "y":5.5},
- {"label":"Layer 1/Space", "x":6.5, "y":6},
- {"label":"Alt", "x":7.5, "y":6},
- {"label":"Caps Lock", "x":11.5, "y":6},
- {"label":"Layer 1/Space", "x":12.5, "y":6},
- {"label":"Space", "x":14, "y":5.5},
- {"label":"Left", "x":15, "y":5.4},
- {"label":"Down", "x":16, "y":5},
- {"label":"Right", "x":17, "y":5.3},
- {"label":":", "x":18, "y":5.9},
- {"label":"Ctrl", "x":19, "y":5.9},
-
- {"label":"Left Pedal 1", "x":2.25, "y":7.5, "w":1.5, "h":2},
- {"label":"Left Pedal 2", "x":3.75, "y":7.5, "w":1.5, "h":2},
- {"label":"Left Pedal 3", "x":5.25, "y":7.5, "w":1.5, "h":2},
- {"label":"Right Pedal 1", "x":13.25, "y":7.5, "w":1.5, "h":2},
- {"label":"Right Pedal 2", "x":14.75, "y":7.5, "w":1.5, "h":2},
- {"label":"Right Pedal 3", "x":16.25, "y":7.5, "w":1.5, "h":2}
- ]
- }
- }
-}
diff --git a/keyboards/handwired/frenchdev/keymaps/default/readme.md b/keyboards/handwired/frenchdev/keymaps/default/readme.md
deleted file mode 100644
index 1a81d1779f..0000000000
--- a/keyboards/handwired/frenchdev/keymaps/default/readme.md
+++ /dev/null
@@ -1,13 +0,0 @@
-layout :
-
-[default layout](http://i.imgur.com/r2Nvr4p.png)
-
-the thing when finished :
-http://imgur.com/a/6FY8v
-
-concept and mockup:
-http://imgur.com/a/R0vvs
-
-to build :
-
- docker run --rm -e keymap=default -e keyboard=frenchdev --rm -v D:/Repositories/qmk:/qmk:rw edasque/qmk_firmware
diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c
deleted file mode 100644
index 6dec9c6a74..0000000000
--- a/keyboards/handwired/frenchdev/matrix.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
-
-Note to self: adapted from ergodox EZ matrix
-The "column" and "row" in here actually refers to the opposite on the keyboard
-see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard
-Nicolas
-
-Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
-Copyright 2013 Nicolas Poirey <nicolas.poirey@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/>.
-*/
-
-/*
- * scan matrix
- */
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/io.h>
-#include "wait.h"
-#include "action_layer.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "frenchdev.h"
-
-/*
- * This constant define not debouncing time in msecs, but amount of matrix
- * scan loops which should be made to get stable debounced results.
- *
- * On Ergodox matrix scan rate is relatively low, because of slow I2C.
- * Now it's only 317 scans/second, or about 3.15 msec/scan.
- * According to Cherry specs, debouncing time is 5 msec.
- *
- * And so, there is no sense to have DEBOUNCE higher than 2.
- */
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-static uint8_t debouncing = DEBOUNCE;
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-static matrix_row_t read_cols(uint8_t row);
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
-
-static uint8_t mcp23018_reset_loop;
-
-__attribute__ ((weak))
-void matrix_init_user(void) {}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {}
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
- // initialize row and col
- debug_enable = true;
- debug_matrix = true;
- debug_keyboard = true;
- debug_mouse = true;
-
- mcp23018_status = init_mcp23018();
-
-
- unselect_rows();
- init_cols();
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- }
-
- matrix_init_quantum();
-}
-
-void matrix_power_up(void) {
- mcp23018_status = init_mcp23018();
-
- unselect_rows();
- init_cols();
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- }
-}
-
-uint8_t matrix_scan(void)
-{
- if (mcp23018_status) { // if there was an error
- if (++mcp23018_reset_loop == 0) {
- // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
- // this will be approx bit more frequent than once per second
- print("trying to reset mcp23018\n");
- mcp23018_status = init_mcp23018();
- if (mcp23018_status) {
- print("left side not responding\n");
- } else {
- print("left side attached\n");
- frenchdev_blink_all_leds();
- }
- }
- }
-
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- select_row(i);
- wait_us(30); // without this wait read unstable value.
- matrix_row_t cols = read_cols(i);
- if (matrix_debouncing[i] != cols) {
- matrix_debouncing[i] = cols;
- if (debouncing) {
- debug("bounce!: "); debug_hex(debouncing); debug("\n");
- }
- debouncing = DEBOUNCE;
- }
- unselect_rows();
- }
-
- if (debouncing) {
- if (--debouncing) {
- wait_us(1);
- // this should be wait_ms(1) but has been left as-is at EZ's request
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<<col));
-}
-
-inline
-matrix_row_t matrix_get_row(uint8_t row)
-{
- return matrix[row];
-}
-
-void matrix_print(void)
-{
- print("\nr/c 0123456789ABCDEF\n");
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- print_hex8(row); print(": ");
- print_bin_reverse16(matrix_get_row(row));
- print("\n");
- }
-}
-
-/* Column pin configuration
- *
- * Teensy
- * col: 0 1 2 3 4 5
- * pin: F0 F1 F4 F5 F6 F7
- *
- * MCP23018
- * col: 0 1 2 3 4 5
- * pin: B5 B4 B3 B2 B1 B0
- */
-static void init_cols(void)
-{
- // init on mcp23018
- // not needed, already done as part of init_mcp23018()
-
- // init on teensy
- // Input with pull-up(DDR:0, PORT:1)
- DDRF &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
- PORTF |= (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
-}
-
-static matrix_row_t read_cols(uint8_t row)
-{
- if (row < 8) {
- if (mcp23018_status) { // if there was an error
- return 0;
- } else {
- uint8_t data = 0;
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOB, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (mcp23018_status) goto out;
- data = i2c_read_nack(I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
- data = ~((uint8_t)mcp23018_status);
- mcp23018_status = I2C_STATUS_SUCCESS;
- out:
- i2c_stop();
- return data;
- }
- } else {
- // read from teensy
- return
- (PINF&(1<<0) ? 0 : (1<<0)) |
- (PINF&(1<<1) ? 0 : (1<<1)) |
- (PINF&(1<<4) ? 0 : (1<<2)) |
- (PINF&(1<<5) ? 0 : (1<<3)) |
- (PINF&(1<<6) ? 0 : (1<<4)) |
- (PINF&(1<<7) ? 0 : (1<<5)) ;
- }
-}
-
-/* Row pin configuration
- *
- * Teensy
- * row: 7 8 9 10 11 12 13
- * pin: B0 B1 B2 B3 D2 D3 C6
- *
- * MCP23018
- * row: 0 1 2 3 4 5 6
- * pin: A0 A1 A2 A3 A4 A5 A6
- */
-static void unselect_rows(void)
-{
- // unselect on mcp23018
- if (mcp23018_status) { // if there was an error
- // do nothing
- } else {
- // set all rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write( 0xFF & ~(0<<8), I2C_TIMEOUT); if (mcp23018_status) goto out;
- out:
- i2c_stop();
- }
-
- // unselect on teensy
- // Hi-Z(DDR:0, PORT:0) to unselect
- DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
- PORTB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
- DDRD &= ~(1<<2 | 1<<3);
- PORTD &= ~(1<<2 | 1<<3);
- DDRC &= ~(1<<6 | 1<<7);
- PORTC &= ~(1<<6 | 1<<7);
-}
-
-static void select_row(uint8_t row)
-{
- if (row < 8) {
- // select on mcp23018
- if (mcp23018_status) { // if there was an error
- // do nothing
- } else {
- // set active row low : 0
- // set other rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write( 0xFF & ~(1<<row) & ~(0<<8), I2C_TIMEOUT); if (mcp23018_status) goto out;
- out:
- i2c_stop();
- }
- } else {
- // select on teensy
- // Output low(DDR:1, PORT:0) to select
- switch (row) {
- case 8:
- DDRB |= (1<<0);
- PORTB &= ~(1<<0);
- break;
- case 9:
- DDRB |= (1<<1);
- PORTB &= ~(1<<1);
- break;
- case 10:
- DDRB |= (1<<2);
- PORTB &= ~(1<<2);
- break;
- case 11:
- DDRB |= (1<<3);
- PORTB &= ~(1<<3);
- break;
- case 12:
- DDRD |= (1<<2);
- PORTD &= ~(1<<3);
- break;
- case 13:
- DDRD |= (1<<3);
- PORTD &= ~(1<<3);
- break;
- case 14:
- DDRC |= (1<<6);
- PORTC &= ~(1<<6);
- break;
- case 15:
- DDRC |= (1<<7);
- PORTC &= ~(1<<7);
- break;
- }
- }
-}
diff --git a/keyboards/handwired/frenchdev/readme.md b/keyboards/handwired/frenchdev/readme.md
deleted file mode 100644
index 96825bb799..0000000000
--- a/keyboards/handwired/frenchdev/readme.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# Frenchdev : My take on a splitted keyboard for dev and french language
-Concept based on
- - [ergodox](https://ergodox-ez.com/)
- - [katy](https://deskthority.net/workshop-f7/katy-keyboard-or-k80cs-key80-contoured-split-t8524.html)
-
-with the added possibility to connect up to 6 external switches like pedals,
- and somewhat like the katy, not all keys are on the same level for easier reach.
-
-### Photos
-- [default layout](http://i.imgur.com/r2Nvr4p.png)
-- [editable layout on keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/4480e3ab8026eb7c710a7e22203ef4aa) (keys placement is NOT precise on this)
-- [the thing when finished](http://imgur.com/a/6FY8v)
-- [concept and cardboard mockup](http://imgur.com/a/R0vvs)
-
-## Build instructions
-
- docker run --rm -e keymap=default -e keyboard=frenchdev --rm -v D:/Repositories/qmk:/qmk:rw edasque/qmk_firmware
-
-## Laser-cuttable file
-There is intentionnaly no hole for the TRRS connector, you are supposed to use a drill for it.
-This way if you don't want to use the pedals you don't have a useless hole. Plus it's cleaner.
-
-## Side stickers
-You can find my original file here : http://qmk.fm/frenchdev/example_printable_stickers.svg
-
-I used it when training but now I use blanks and the layout is different.
-I still uploaded it because I think it can be a good jumpstart for any temporary stickers on the
-side of keycaps.
-
-## List of parts
-- I2C mcp23018
-- [teensy 2](https://www.pjrc.com/store/teensy.html)
-- 3 LED, 5mm tall with flat head
-- 3 330 ohm resistor
-- 2 470 ohm resistor
-- 2 TRRS connectors
-- 1 [micro usb breakout board](http://www.ebay.com/itm/-/201387922085?)
-- 88 cherry/gateron switchs
-- 94 4148 diodes
-- 34 R4 keys
-- 14 R3 keys
-- 20 R2 keys
-- 22 R1 keys
-
-If you fancy adding pedals :
-[these are good enough and cheap](https://www.amazon.fr/gp/product/B00V7WITKI/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1). You also need a RCA connector for each of those to replace the included cable
-
-If you (or your coworkers) find them too loud you can replace the switch inside them.
-For once we don't really care about what's inside :)
-
-## Various indications
-
-The PHYSICAL rows and columns are connected as such :
-
-on right hand (slave) :
-
- I2C mcp23018
- .------- --------.
- GND -| 1 VSS \_/ NC 28 |
- | 2 NC A7 27 |- C15
- R5 -| 3 B0 A6 26 |- C14
- R4 -| 4 B1 A5 25 |- C13
- R3 -| 5 B2 A4 24 |- C12
- R2 -| 6 B3 A3 23 |- C11
- R1 -| 7 B4 A2 22 |- C10
- R0 -| 8 B5 A1 21 |- C9
- | 9 B6 A0 20 |- C8
- | 10 B7 INTA 19 |
- VCC -| 11 VDD INTB 18 |
- SCL -| 12 SCL NC 17 |
- SDA -| 13 SDA RST 16 |- VCC
- | 14 NC ADDR 15 |- GND
- `------------------'
-
-and on left hand (main) :
-
- TEENSY
- .------------------.
- | GND VCC |
- C7 -| B0 F0 |- R5
- C6 -| B1 F1 |- R4
- C5 -| B2 F4 |- R3
- C4 -| B3 F5 |- R2
- LEDC -| B7 F6 |- R1
- SCL -| D0 F7 |- R0
- SDA -| D1 B6 |- LEDB
- C3 -| D2 B5 |- LEDA
- C2 -| D3 B4 |
- C1 -| C6 D7 |
- C0 -| C7 D6 |- GND
- | D5 D4 |
- | VCC RST |
- | E6 GND |
- `------------------'
-
-We use pull up resistor for SCL and VDA, see https://github.com/ErgoDox-EZ/docs/blob/master/ErgoDox%20EZ%20Schematic.pdf for example
-
-The connector is a standard TRRS (jack with audio + mic)
-
-Diode direction is row to column
-
diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk
deleted file mode 100644
index 88a48968f1..0000000000
--- a/keyboards/handwired/frenchdev/rules.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = halfkay
-
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
-CUSTOM_MATRIX = yes # Custom matrix file (taken and adapted from the ErgoDox EZ to handle custom number of columns)
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = no
-
-# project specific files
-SRC = i2c_master.c \
- matrix.c