diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-07-28 10:56:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-28 10:56:35 -0700 |
| commit | c9424eb8d7586ccc2d72014df7b2223cb2645588 (patch) | |
| tree | 533212fe003d5b7529d5075e87cc12fb2a2beb56 | |
| parent | bbdc82dd36a95c6bb8dafca6ca87c9e87d5bc315 (diff) | |
| download | qmk_firmware-c9424eb8d7586ccc2d72014df7b2223cb2645588.tar.gz qmk_firmware-c9424eb8d7586ccc2d72014df7b2223cb2645588.zip | |
[Keyboard] Fix up and clean Corne Keyboard code (#6284)
* Fix corne communication issues with LTO
* Fix up other issues with corne code
* Fix indentation
* Clang Format rev1 file for Corne
| -rw-r--r-- | keyboards/crkbd/crkbd.c | 1 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/default/config.h | 16 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/default/keymap.c | 7 | ||||
| -rw-r--r-- | keyboards/crkbd/pro_micro.h | 358 | ||||
| -rw-r--r-- | keyboards/crkbd/rev1/config.h | 2 | ||||
| -rw-r--r-- | keyboards/crkbd/rev1/rev1.c | 23 | ||||
| -rw-r--r-- | keyboards/crkbd/rev1/rev1.h | 26 | ||||
| -rw-r--r-- | keyboards/crkbd/rev1/rules.mk | 6 | ||||
| -rw-r--r-- | keyboards/crkbd/rules.mk | 7 |
9 files changed, 33 insertions, 413 deletions
diff --git a/keyboards/crkbd/crkbd.c b/keyboards/crkbd/crkbd.c index d420ccda2..7417ad604 100644 --- a/keyboards/crkbd/crkbd.c +++ b/keyboards/crkbd/crkbd.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "crkbd.h" | 1 | #include "crkbd.h" |
| 2 | #include "ssd1306.h" | ||
| 3 | 2 | ||
| 4 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | 3 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { |
| 5 | #ifdef SSD1306OLED | 4 | #ifdef SSD1306OLED |
diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h index 644e81365..899fde008 100644 --- a/keyboards/crkbd/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/default/config.h | |||
| @@ -35,10 +35,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 35 | #define TAPPING_FORCE_HOLD | 35 | #define TAPPING_FORCE_HOLD |
| 36 | #define TAPPING_TERM 100 | 36 | #define TAPPING_TERM 100 |
| 37 | 37 | ||
| 38 | #undef RGBLED_NUM | 38 | #ifdef RGBLIGHT_ENABLE |
| 39 | #define RGBLIGHT_ANIMATIONS | 39 | #undef RGBLED_NUM |
| 40 | #define RGBLED_NUM 27 | 40 | #define RGBLIGHT_ANIMATIONS |
| 41 | #define RGBLIGHT_LIMIT_VAL 120 | 41 | #define RGBLED_NUM 27 |
| 42 | #define RGBLIGHT_HUE_STEP 10 | 42 | #define RGBLIGHT_LIMIT_VAL 120 |
| 43 | #define RGBLIGHT_SAT_STEP 17 | 43 | #define RGBLIGHT_HUE_STEP 10 |
| 44 | #define RGBLIGHT_VAL_STEP 17 | 44 | #define RGBLIGHT_SAT_STEP 17 |
| 45 | #define RGBLIGHT_VAL_STEP 17 | ||
| 46 | #endif | ||
diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 348da2c76..40bf9b658 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c | |||
| @@ -1,11 +1,4 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | #ifdef PROTOCOL_LUFA | ||
| 3 | #include "lufa.h" | ||
| 4 | #include "split_util.h" | ||
| 5 | #endif | ||
| 6 | #ifdef SSD1306OLED | ||
| 7 | #include "ssd1306.h" | ||
| 8 | #endif | ||
| 9 | 2 | ||
| 10 | extern keymap_config_t keymap_config; | 3 | extern keymap_config_t keymap_config; |
| 11 | 4 | ||
diff --git a/keyboards/crkbd/pro_micro.h b/keyboards/crkbd/pro_micro.h deleted file mode 100644 index 366633372..000000000 --- a/keyboards/crkbd/pro_micro.h +++ /dev/null | |||
| @@ -1,358 +0,0 @@ | |||
| 1 | /* | ||
| 2 | pins_arduino.h - Pin definition functions for Arduino | ||
| 3 | Part of Arduino - http://www.arduino.cc/ | ||
| 4 | |||
| 5 | Copyright (c) 2007 David A. Mellis | ||
| 6 | |||
| 7 | This library is free software; you can redistribute it and/or | ||
| 8 | modify it under the terms of the GNU Lesser General Public | ||
| 9 | License as published by the Free Software Foundation; either | ||
| 10 | version 2.1 of the License, or (at your option) any later version. | ||
| 11 | |||
| 12 | This library is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | Lesser General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU Lesser General | ||
| 18 | Public License along with this library; if not, write to the | ||
| 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, | ||
| 20 | Boston, MA 02111-1307 USA | ||
| 21 | |||
| 22 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ | ||
| 23 | */ | ||
| 24 | #pragma once | ||
| 25 | |||
| 26 | #include <avr/pgmspace.h> | ||
| 27 | |||
| 28 | // Workaround for wrong definitions in "iom32u4.h". | ||
| 29 | // This should be fixed in the AVR toolchain. | ||
| 30 | #undef UHCON | ||
| 31 | #undef UHINT | ||
| 32 | #undef UHIEN | ||
| 33 | #undef UHADDR | ||
| 34 | #undef UHFNUM | ||
| 35 | #undef UHFNUML | ||
| 36 | #undef UHFNUMH | ||
| 37 | #undef UHFLEN | ||
| 38 | #undef UPINRQX | ||
| 39 | #undef UPINTX | ||
| 40 | #undef UPNUM | ||
| 41 | #undef UPRST | ||
| 42 | #undef UPCONX | ||
| 43 | #undef UPCFG0X | ||
| 44 | #undef UPCFG1X | ||
| 45 | #undef UPSTAX | ||
| 46 | #undef UPCFG2X | ||
| 47 | #undef UPIENX | ||
| 48 | #undef UPDATX | ||
| 49 | #undef TCCR2A | ||
| 50 | #undef WGM20 | ||
| 51 | #undef WGM21 | ||
| 52 | #undef COM2B0 | ||
| 53 | #undef COM2B1 | ||
| 54 | #undef COM2A0 | ||
| 55 | #undef COM2A1 | ||
| 56 | #undef TCCR2B | ||
| 57 | #undef CS20 | ||
| 58 | #undef CS21 | ||
| 59 | #undef CS22 | ||
| 60 | #undef WGM22 | ||
| 61 | #undef FOC2B | ||
| 62 | #undef FOC2A | ||
| 63 | #undef TCNT2 | ||
| 64 | #undef TCNT2_0 | ||
| 65 | #undef TCNT2_1 | ||
| 66 | #undef TCNT2_2 | ||
| 67 | #undef TCNT2_3 | ||
| 68 | #undef TCNT2_4 | ||
| 69 | #undef TCNT2_5 | ||
| 70 | #undef TCNT2_6 | ||
| 71 | #undef TCNT2_7 | ||
| 72 | #undef OCR2A | ||
| 73 | #undef OCR2_0 | ||
| 74 | #undef OCR2_1 | ||
| 75 | #undef OCR2_2 | ||
| 76 | #undef OCR2_3 | ||
| 77 | #undef OCR2_4 | ||
| 78 | #undef OCR2_5 | ||
| 79 | #undef OCR2_6 | ||
| 80 | #undef OCR2_7 | ||
| 81 | #undef OCR2B | ||
| 82 | #undef OCR2_0 | ||
| 83 | #undef OCR2_1 | ||
| 84 | #undef OCR2_2 | ||
| 85 | #undef OCR2_3 | ||
| 86 | #undef OCR2_4 | ||
| 87 | #undef OCR2_5 | ||
| 88 | #undef OCR2_6 | ||
| 89 | #undef OCR2_7 | ||
| 90 | |||
| 91 | #define NUM_DIGITAL_PINS 30 | ||
| 92 | #define NUM_ANALOG_INPUTS 12 | ||
| 93 | |||
| 94 | #define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) | ||
| 95 | #define TXLED0 PORTD |= (1<<5) | ||
| 96 | #define TXLED1 PORTD &= ~(1<<5) | ||
| 97 | #define RXLED0 PORTB |= (1<<0) | ||
| 98 | #define RXLED1 PORTB &= ~(1<<0) | ||
| 99 | |||
| 100 | static const uint8_t SDA = 2; | ||
| 101 | static const uint8_t SCL = 3; | ||
| 102 | #define LED_BUILTIN 13 | ||
| 103 | |||
| 104 | // Map SPI port to 'new' pins D14..D17 | ||
| 105 | static const uint8_t SS = 17; | ||
| 106 | static const uint8_t MOSI = 16; | ||
| 107 | static const uint8_t MISO = 14; | ||
| 108 | static const uint8_t SCK = 15; | ||
| 109 | |||
| 110 | // Mapping of analog pins as digital I/O | ||
| 111 | // A6-A11 share with digital pins | ||
| 112 | static const uint8_t ADC0 = 18; | ||
| 113 | static const uint8_t ADC1 = 19; | ||
| 114 | static const uint8_t ADC2 = 20; | ||
| 115 | static const uint8_t ADC3 = 21; | ||
| 116 | static const uint8_t ADC4 = 22; | ||
| 117 | static const uint8_t ADC5 = 23; | ||
| 118 | static const uint8_t ADC6 = 24; // D4 | ||
| 119 | static const uint8_t ADC7 = 25; // D6 | ||
| 120 | static const uint8_t ADC8 = 26; // D8 | ||
| 121 | static const uint8_t ADC9 = 27; // D9 | ||
| 122 | static const uint8_t ADC10 = 28; // D10 | ||
| 123 | static const uint8_t ADC11 = 29; // D12 | ||
| 124 | |||
| 125 | #define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) | ||
| 126 | #define digitalPinToPCICRbit(p) 0 | ||
| 127 | #define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) | ||
| 128 | #define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) | ||
| 129 | |||
| 130 | // __AVR_ATmega32U4__ has an unusual mapping of pins to channels | ||
| 131 | extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; | ||
| 132 | #define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) | ||
| 133 | |||
| 134 | #define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) | ||
| 135 | |||
| 136 | #ifdef ARDUINO_MAIN | ||
| 137 | |||
| 138 | // On the Arduino board, digital pins are also used | ||
| 139 | // for the analog output (software PWM). Analog input | ||
| 140 | // pins are a separate set. | ||
| 141 | |||
| 142 | // ATMEL ATMEGA32U4 / ARDUINO LEONARDO | ||
| 143 | // | ||
| 144 | // D0 PD2 RXD1/INT2 | ||
| 145 | // D1 PD3 TXD1/INT3 | ||
| 146 | // D2 PD1 SDA SDA/INT1 | ||
| 147 | // D3# PD0 PWM8/SCL OC0B/SCL/INT0 | ||
| 148 | // D4 A6 PD4 ADC8 | ||
| 149 | // D5# PC6 ??? OC3A/#OC4A | ||
| 150 | // D6# A7 PD7 FastPWM #OC4D/ADC10 | ||
| 151 | // D7 PE6 INT6/AIN0 | ||
| 152 | // | ||
| 153 | // D8 A8 PB4 ADC11/PCINT4 | ||
| 154 | // D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 | ||
| 155 | // D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 | ||
| 156 | // D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 | ||
| 157 | // D12 A11 PD6 T1/#OC4D/ADC9 | ||
| 158 | // D13# PC7 PWM10 CLK0/OC4A | ||
| 159 | // | ||
| 160 | // A0 D18 PF7 ADC7 | ||
| 161 | // A1 D19 PF6 ADC6 | ||
| 162 | // A2 D20 PF5 ADC5 | ||
| 163 | // A3 D21 PF4 ADC4 | ||
| 164 | // A4 D22 PF1 ADC1 | ||
| 165 | // A5 D23 PF0 ADC0 | ||
| 166 | // | ||
| 167 | // New pins D14..D17 to map SPI port to digital pins | ||
| 168 | // | ||
| 169 | // MISO D14 PB3 MISO,PCINT3 | ||
| 170 | // SCK D15 PB1 SCK,PCINT1 | ||
| 171 | // MOSI D16 PB2 MOSI,PCINT2 | ||
| 172 | // SS D17 PB0 RXLED,SS/PCINT0 | ||
| 173 | // | ||
| 174 | // Connected LEDs on board for TX and RX | ||
| 175 | // TXLED D24 PD5 XCK1 | ||
| 176 | // RXLED D17 PB0 | ||
| 177 | // HWB PE2 HWB | ||
| 178 | |||
| 179 | // these arrays map port names (e.g. port B) to the | ||
| 180 | // appropriate addresses for various functions (e.g. reading | ||
| 181 | // and writing) | ||
| 182 | const uint16_t PROGMEM port_to_mode_PGM[] = { | ||
| 183 | NOT_A_PORT, | ||
| 184 | NOT_A_PORT, | ||
| 185 | (uint16_t) &DDRB, | ||
| 186 | (uint16_t) &DDRC, | ||
| 187 | (uint16_t) &DDRD, | ||
| 188 | (uint16_t) &DDRE, | ||
| 189 | (uint16_t) &DDRF, | ||
| 190 | }; | ||
| 191 | |||
| 192 | const uint16_t PROGMEM port_to_output_PGM[] = { | ||
| 193 | NOT_A_PORT, | ||
| 194 | NOT_A_PORT, | ||
| 195 | (uint16_t) &PORTB, | ||
| 196 | (uint16_t) &PORTC, | ||
| 197 | (uint16_t) &PORTD, | ||
| 198 | (uint16_t) &PORTE, | ||
| 199 | (uint16_t) &PORTF, | ||
| 200 | }; | ||
| 201 | |||
| 202 | const uint16_t PROGMEM port_to_input_PGM[] = { | ||
| 203 | NOT_A_PORT, | ||
| 204 | NOT_A_PORT, | ||
| 205 | (uint16_t) &PINB, | ||
| 206 | (uint16_t) &PINC, | ||
| 207 | (uint16_t) &PIND, | ||
| 208 | (uint16_t) &PINE, | ||
| 209 | (uint16_t) &PINF, | ||
| 210 | }; | ||
| 211 | |||
| 212 | const uint8_t PROGMEM digital_pin_to_port_PGM[] = { | ||
| 213 | PD, // D0 - PD2 | ||
| 214 | PD, // D1 - PD3 | ||
| 215 | PD, // D2 - PD1 | ||
| 216 | PD, // D3 - PD0 | ||
| 217 | PD, // D4 - PD4 | ||
| 218 | PC, // D5 - PC6 | ||
| 219 | PD, // D6 - PD7 | ||
| 220 | PE, // D7 - PE6 | ||
| 221 | |||
| 222 | PB, // D8 - PB4 | ||
| 223 | PB, // D9 - PB5 | ||
| 224 | PB, // D10 - PB6 | ||
| 225 | PB, // D11 - PB7 | ||
| 226 | PD, // D12 - PD6 | ||
| 227 | PC, // D13 - PC7 | ||
| 228 | |||
| 229 | PB, // D14 - MISO - PB3 | ||
| 230 | PB, // D15 - SCK - PB1 | ||
| 231 | PB, // D16 - MOSI - PB2 | ||
| 232 | PB, // D17 - SS - PB0 | ||
| 233 | |||
| 234 | PF, // D18 - A0 - PF7 | ||
| 235 | PF, // D19 - A1 - PF6 | ||
| 236 | PF, // D20 - A2 - PF5 | ||
| 237 | PF, // D21 - A3 - PF4 | ||
| 238 | PF, // D22 - A4 - PF1 | ||
| 239 | PF, // D23 - A5 - PF0 | ||
| 240 | |||
| 241 | PD, // D24 - PD5 | ||
| 242 | PD, // D25 / D6 - A7 - PD7 | ||
| 243 | PB, // D26 / D8 - A8 - PB4 | ||
| 244 | PB, // D27 / D9 - A9 - PB5 | ||
| 245 | PB, // D28 / D10 - A10 - PB6 | ||
| 246 | PD, // D29 / D12 - A11 - PD6 | ||
| 247 | }; | ||
| 248 | |||
| 249 | const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { | ||
| 250 | _BV(2), // D0 - PD2 | ||
| 251 | _BV(3), // D1 - PD3 | ||
| 252 | _BV(1), // D2 - PD1 | ||
| 253 | _BV(0), // D3 - PD0 | ||
| 254 | _BV(4), // D4 - PD4 | ||
| 255 | _BV(6), // D5 - PC6 | ||
| 256 | _BV(7), // D6 - PD7 | ||
| 257 | _BV(6), // D7 - PE6 | ||
| 258 | |||
| 259 | _BV(4), // D8 - PB4 | ||
| 260 | _BV(5), // D9 - PB5 | ||
| 261 | _BV(6), // D10 - PB6 | ||
| 262 | _BV(7), // D11 - PB7 | ||
| 263 | _BV(6), // D12 - PD6 | ||
| 264 | _BV(7), // D13 - PC7 | ||
| 265 | |||
| 266 | _BV(3), // D14 - MISO - PB3 | ||
| 267 | _BV(1), // D15 - SCK - PB1 | ||
| 268 | _BV(2), // D16 - MOSI - PB2 | ||
| 269 | _BV(0), // D17 - SS - PB0 | ||
| 270 | |||
| 271 | _BV(7), // D18 - A0 - PF7 | ||
| 272 | _BV(6), // D19 - A1 - PF6 | ||
| 273 | _BV(5), // D20 - A2 - PF5 | ||
| 274 | _BV(4), // D21 - A3 - PF4 | ||
| 275 | _BV(1), // D22 - A4 - PF1 | ||
| 276 | _BV(0), // D23 - A5 - PF0 | ||
| 277 | |||
| 278 | _BV(5), // D24 - PD5 | ||
| 279 | _BV(7), // D25 / D6 - A7 - PD7 | ||
| 280 | _BV(4), // D26 / D8 - A8 - PB4 | ||
| 281 | _BV(5), // D27 / D9 - A9 - PB5 | ||
| 282 | _BV(6), // D28 / D10 - A10 - PB6 | ||
| 283 | _BV(6), // D29 / D12 - A11 - PD6 | ||
| 284 | }; | ||
| 285 | |||
| 286 | const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { | ||
| 287 | NOT_ON_TIMER, | ||
| 288 | NOT_ON_TIMER, | ||
| 289 | NOT_ON_TIMER, | ||
| 290 | TIMER0B, /* 3 */ | ||
| 291 | NOT_ON_TIMER, | ||
| 292 | TIMER3A, /* 5 */ | ||
| 293 | TIMER4D, /* 6 */ | ||
| 294 | NOT_ON_TIMER, | ||
| 295 | |||
| 296 | NOT_ON_TIMER, | ||
| 297 | TIMER1A, /* 9 */ | ||
| 298 | TIMER1B, /* 10 */ | ||
| 299 | TIMER0A, /* 11 */ | ||
| 300 | |||
| 301 | NOT_ON_TIMER, | ||
| 302 | TIMER4A, /* 13 */ | ||
| 303 | |||
| 304 | NOT_ON_TIMER, | ||
| 305 | NOT_ON_TIMER, | ||
| 306 | NOT_ON_TIMER, | ||
| 307 | NOT_ON_TIMER, | ||
| 308 | NOT_ON_TIMER, | ||
| 309 | NOT_ON_TIMER, | ||
| 310 | |||
| 311 | NOT_ON_TIMER, | ||
| 312 | NOT_ON_TIMER, | ||
| 313 | NOT_ON_TIMER, | ||
| 314 | NOT_ON_TIMER, | ||
| 315 | NOT_ON_TIMER, | ||
| 316 | NOT_ON_TIMER, | ||
| 317 | NOT_ON_TIMER, | ||
| 318 | NOT_ON_TIMER, | ||
| 319 | NOT_ON_TIMER, | ||
| 320 | NOT_ON_TIMER, | ||
| 321 | }; | ||
| 322 | |||
| 323 | const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { | ||
| 324 | 7, // A0 PF7 ADC7 | ||
| 325 | 6, // A1 PF6 ADC6 | ||
| 326 | 5, // A2 PF5 ADC5 | ||
| 327 | 4, // A3 PF4 ADC4 | ||
| 328 | 1, // A4 PF1 ADC1 | ||
| 329 | 0, // A5 PF0 ADC0 | ||
| 330 | 8, // A6 D4 PD4 ADC8 | ||
| 331 | 10, // A7 D6 PD7 ADC10 | ||
| 332 | 11, // A8 D8 PB4 ADC11 | ||
| 333 | 12, // A9 D9 PB5 ADC12 | ||
| 334 | 13, // A10 D10 PB6 ADC13 | ||
| 335 | 9 // A11 D12 PD6 ADC9 | ||
| 336 | }; | ||
| 337 | |||
| 338 | #endif /* ARDUINO_MAIN */ | ||
| 339 | |||
| 340 | // These serial port names are intended to allow libraries and architecture-neutral | ||
| 341 | // sketches to automatically default to the correct port name for a particular type | ||
| 342 | // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, | ||
| 343 | // the first hardware serial port whose RX/TX pins are not dedicated to another use. | ||
| 344 | // | ||
| 345 | // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor | ||
| 346 | // | ||
| 347 | // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial | ||
| 348 | // | ||
| 349 | // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library | ||
| 350 | // | ||
| 351 | // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. | ||
| 352 | // | ||
| 353 | // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX | ||
| 354 | // pins are NOT connected to anything by default. | ||
| 355 | #define SERIAL_PORT_MONITOR Serial | ||
| 356 | #define SERIAL_PORT_USBVIRTUAL Serial | ||
| 357 | #define SERIAL_PORT_HARDWARE Serial1 | ||
| 358 | #define SERIAL_PORT_HARDWARE_OPEN Serial1 | ||
diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 4ea8ff38c..200923db5 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h | |||
| @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 23 | #define PRODUCT_ID 0x3060 | 23 | #define PRODUCT_ID 0x3060 |
| 24 | #define DEVICE_VER 0x0001 | 24 | #define DEVICE_VER 0x0001 |
| 25 | #define MANUFACTURER foostan | 25 | #define MANUFACTURER foostan |
| 26 | #define PRODUCT Crkbd | 26 | #define PRODUCT Corne Keyboard (crkbd) |
| 27 | #define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 3 thumb keys | 27 | #define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 3 thumb keys |
| 28 | 28 | ||
| 29 | /* key matrix size */ | 29 | /* key matrix size */ |
diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index b969b5e28..24800358d 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c | |||
| @@ -1,11 +1,6 @@ | |||
| 1 | #include "crkbd.h" | 1 | #include "crkbd.h" |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | #ifdef AUDIO_ENABLE | ||
| 5 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
| 6 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 7 | #endif | ||
| 8 | |||
| 9 | #ifdef RGB_MATRIX_ENABLE | 4 | #ifdef RGB_MATRIX_ENABLE |
| 10 | 5 | ||
| 11 | // Logical Layout | 6 | // Logical Layout |
| @@ -104,22 +99,4 @@ led_config_t g_led_config = { { | |||
| 104 | 4, 4, 1, 1, 1 | 99 | 4, 4, 1, 1, 1 |
| 105 | } }; | 100 | } }; |
| 106 | #endif | 101 | #endif |
| 107 | |||
| 108 | #endif | 102 | #endif |
| 109 | void matrix_init_kb(void) { | ||
| 110 | |||
| 111 | #ifdef AUDIO_ENABLE | ||
| 112 | _delay_ms(20); // gets rid of tick | ||
| 113 | PLAY_SONG(tone_startup); | ||
| 114 | #endif | ||
| 115 | |||
| 116 | matrix_init_user(); | ||
| 117 | }; | ||
| 118 | |||
| 119 | void shutdown_kb(void) { | ||
| 120 | #ifdef AUDIO_ENABLE | ||
| 121 | PLAY_SONG(tone_goodbye); | ||
| 122 | _delay_ms(150); | ||
| 123 | stop_all_notes(); | ||
| 124 | #endif | ||
| 125 | } | ||
diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index cdd61d2bf..9023248e2 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h | |||
| @@ -1,23 +1,28 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include "../crkbd.h" | 3 | #include "crkbd.h" |
| 4 | 4 | ||
| 5 | //void promicro_bootloader_jmp(bool program); | 5 | // void promicro_bootloader_jmp(bool program); |
| 6 | #include "quantum.h" | 6 | #include "quantum.h" |
| 7 | 7 | ||
| 8 | #ifdef RGBLIGHT_ENABLE | 8 | #ifdef PROTOCOL_LUFA |
| 9 | //rgb led driver | 9 | #include "lufa.h" |
| 10 | #include "ws2812.h" | 10 | #include "split_util.h" |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | #ifdef USE_I2C | 13 | #ifdef SSD1306OLED |
| 14 | #include <stddef.h> | 14 | #include "ssd1306.h" |
| 15 | #ifdef __AVR__ | ||
| 16 | #include <avr/io.h> | ||
| 17 | #include <avr/interrupt.h> | ||
| 18 | #endif | 15 | #endif |
| 16 | |||
| 17 | #ifdef USE_I2C | ||
| 18 | #include <stddef.h> | ||
| 19 | #ifdef __AVR__ | ||
| 20 | #include <avr/interrupt.h> | ||
| 21 | #include <avr/io.h> | ||
| 22 | #endif | ||
| 19 | #endif | 23 | #endif |
| 20 | 24 | ||
| 25 | // clang-format off | ||
| 21 | //void promicro_bootloader_jmp(bool program); | 26 | //void promicro_bootloader_jmp(bool program); |
| 22 | #define LAYOUT( \ | 27 | #define LAYOUT( \ |
| 23 | L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ | 28 | L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ |
| @@ -48,3 +53,4 @@ | |||
| 48 | KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ | 53 | KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ |
| 49 | KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \ | 54 | KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \ |
| 50 | ) | 55 | ) |
| 56 | // clang-format on | ||
diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index f12849f98..307786375 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk | |||
| @@ -4,6 +4,6 @@ ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) | |||
| 4 | OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT | 4 | OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT |
| 5 | endif | 5 | endif |
| 6 | 6 | ||
| 7 | SRC += rev1/matrix.c | 7 | SRC += matrix.c \ |
| 8 | SRC += rev1/split_util.c | 8 | split_util.c \ |
| 9 | SRC += rev1/split_scomm.c | 9 | split_scomm.c |
diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 73efe23d0..950000a7e 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | SRC += i2c.c | 1 | QUANTUM_LIB_SRC += i2c.c \ |
| 2 | SRC += serial.c | 2 | serial.c |
| 3 | SRC += ssd1306.c | 3 | SRC += ssd1306.c |
| 4 | 4 | ||
| 5 | # if firmware size over limit, try this option | 5 | # if firmware size over limit, try this option |
| @@ -64,7 +64,8 @@ MIDI_ENABLE = no # MIDI controls | |||
| 64 | AUDIO_ENABLE = no # Audio output on port C6 | 64 | AUDIO_ENABLE = no # Audio output on port C6 |
| 65 | UNICODE_ENABLE = no # Unicode | 65 | UNICODE_ENABLE = no # Unicode |
| 66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 67 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 67 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
| 68 | |||
| 68 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 69 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 70 | 71 | ||
