diff options
author | Dan Hertz <daniel@dhertz.com> | 2018-05-29 04:22:43 +0100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-05-28 20:22:43 -0700 |
commit | 6009ca2d4a76cc3fa66fd9b1339ebe9b11775ffc (patch) | |
tree | 56ef4bdd129e29747f150be712fe8a194892d3b4 | |
parent | dfa7a708fef77ac1570face29d7e8413f3e725ee (diff) |
Update Canoe ps2avr board (#3066)
* Add Percent Canoe keyboard
* Fix row of nonus backslash
* Update info.json to be correct for canoe
* Change LAYOUT_ISO to LAYOUT_iso
* Remove bootloader key in info.json
-rw-r--r-- | keyboards/canoe/canoe.c | 28 | ||||
-rw-r--r-- | keyboards/canoe/canoe.h | 25 | ||||
-rw-r--r-- | keyboards/canoe/config.h | 20 | ||||
-rw-r--r-- | keyboards/canoe/info.json | 394 | ||||
-rw-r--r-- | keyboards/canoe/keymaps/iso/keymap.c | 29 | ||||
-rw-r--r-- | keyboards/canoe/readme.md | 2 |
6 files changed, 482 insertions, 16 deletions
diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c index 6a67562348..bc69df2e5e 100644 --- a/keyboards/canoe/canoe.c +++ b/keyboards/canoe/canoe.c @@ -16,14 +16,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "canoe.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "i2c.h" #include "rgblight.h" +#endif -#include <avr/pgmspace.h> +#ifdef BACKLIGHT_ENABLE +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } +} -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +#endif +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -43,3 +62,4 @@ __attribute__ ((weak)) void matrix_scan_user(void) { rgblight_task(); } +#endif diff --git a/keyboards/canoe/canoe.h b/keyboards/canoe/canoe.h index 157aabcf23..5658eb1b4a 100644 --- a/keyboards/canoe/canoe.h +++ b/keyboards/canoe/canoe.h @@ -18,10 +18,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef CANOE_H #define CANOE_H -#define KNO KC_NO - #include "quantum.h" +#define LAYOUT_iso( \ + K0D, K0C, K0B, K0A, K09, K08, K07, K06, K05, K04, K03, K02, K01, K00, K0E, \ + K1D, K1C, K1B, K1A, K19, K18, K17, K16, K15, K14, K13, K12, K11, K1E, \ + K2D, K2C, K2B, K2A, K29, K28, K27, K26, K25, K24, K23, K22, K10, K21, K2E, \ + K3D, K4A, K3C, K3B, K3A, K39, K38, K37, K36, K35, K34, K33, K32, K30, K3E, \ + K4D, K4C, K4B, K48, K44, K43, K42, K40, K4E \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, 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 }, \ +} + #define LAYOUT( \ KD0, KC0, KB0, KA0, K90, K80, K70, K60, K50, K40, K30, K20, K10, K00, KE0, \ KD1, KC1, KB1, KA1, K91, K81, K71, K61, K51, K41, K31, K21, K11, K01, KE1, \ @@ -31,9 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ){ \ { K00, K10, K20, K30, K40, K50, K60, K70, K80, K90, KA0, KB0, KC0, KD0, KE0 }, \ { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1 }, \ - { KNO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ - { K03, KNO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ - { K04, KNO, K24, K34, K44, KNO, KNO, KNO, K84, KNO, KNO, KB4, KC4, KD4, KE4 } \ + { KC_NO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ + { K03, KC_NO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ + { K04, KC_NO, K24, K34, K44, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KB4, KC4, KD4, KE4 } \ } #endif diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h index f8e368df25..0e70094ae8 100644 --- a/keyboards/canoe/config.h +++ b/keyboards/canoe/config.h @@ -15,22 +15,30 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BMINI_CONFIG_H -#define BMINI_CONFIG_H +#ifndef CANOE_CONFIG_H +#define CANOE_CONFIG_H #include "config_common.h" #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -#define MANUFACTURER percent -#define PRODUCT canoe +#define MANUFACTURER NotActuallyPercent +#define PRODUCT CANOE #define RGBLED_NUM 2 -/* matrix size */ -#define MATRIX_ROWS 5 +#define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json new file mode 100644 index 0000000000..ddabae88c4 --- /dev/null +++ b/keyboards/canoe/info.json @@ -0,0 +1,394 @@ +{ + "keyboard_name": "canoe", + "maintainer": "qmk", + "url": "", + "height": 8, + "width": 15, + "layouts": { + "LAYOUT_iso": { + "key_count": 68, + "layout": [ + { + "label": "Esc", + "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", + "w": 2, + "x": 13, + "y": 0 + }, + { + "label": "Insert", + "x": 15, + "y": 0 + }, + { + "label": "Tab", + "w": 1.5, + "x": 0, + "y": 1 + }, + { + "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 + }, + { + "ks": [ + [ + 0, + 0 + ], + [ + 1.5, + 0 + ], + [ + 1.5, + 2 + ], + [ + 0.25, + 2 + ], + [ + 0.25, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ], + "label": "Enter", + "x": 13.5, + "y": 1 + }, + { + "label": "Delete", + "x": 15, + "y": 1 + }, + { + "label": "Caps Lock", + "w": 1.75, + "x": 0, + "y": 2 + }, + { + "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": "\\", + "x": 12.75, + "y": 2 + }, + { + "label": "Home", + "x": 15, + "y": 2 + }, + { + "label": "Shift", + "w": 1.25, + "x": 0, + "y": 3 + }, + { + "label": "~", + "x": 1.25, + "y": 3 + }, + { + "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", + "w": 1.75, + "x": 12.25, + "y": 3 + }, + { + "label": "Up", + "x": 14, + "y": 3 + }, + { + "label": "Page Down", + "x": 14, + "y": 3 + }, + { + "label": "Control", + "w": 1.25, + "x": 0, + "y": 4 + }, + { + "label": "Win", + "w": 1.25, + "x": 1.25, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 2.5, + "y": 4 + }, + { + "w": 6.25, + "x": 3.75, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 10, + "y": 4 + }, + { + "label": "Fn0", + "w": 1.25, + "x": 11.25, + "y": 4 + }, + { + "label": "Left", + "x": 13, + "y": 4 + }, + { + "label": "Down", + "x": 14, + "y": 4 + }, + { + "label": "Right", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/canoe/keymaps/iso/keymap.c b/keyboards/canoe/keymaps/iso/keymap.c new file mode 100644 index 0000000000..89af719d12 --- /dev/null +++ b/keyboards/canoe/keymaps/iso/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2017 Luiz Ribeiro <luizribeiro@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] = { + [0] = LAYOUT_iso( + 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_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_NUBS, KC_ENT, KC_END, + KC_LSFT, KC_NUHS, 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_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), +}; + diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md index 96cd8007ce..fa2bfbb332 100644 --- a/keyboards/canoe/readme.md +++ b/keyboards/canoe/readme.md @@ -1,7 +1,7 @@ CANOE ======== -A 65% keyboard with RGB +A 65% keyboard with some RGB Keyboard Maintainer: QMK Community |