Skip to content

Commit

Permalink
[Keyboard] Add Cordillera PCB (#10711)
Browse files Browse the repository at this point in the history
* Add initial Cordillera config

* Update readme

* Update info.json layouts

* Update preview image

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Remove extra rules

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update bootmagic rule

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
  • Loading branch information
3 people committed Oct 23, 2020
1 parent 870cc37 commit 225af5d
Show file tree
Hide file tree
Showing 12 changed files with 2,034 additions and 0 deletions.
714 changes: 714 additions & 0 deletions keyboards/coarse/cordillera/chconf.h

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions keyboards/coarse/cordillera/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
Copyright 2020 coarse <coarsekeys@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

/* USB Device descriptor parameter */
#define VENDOR_ID 0x434B // CK for Coarse Keys
#define PRODUCT_ID 0x1401 // '20 - 001
#define DEVICE_VER 0x0001 // Revision prototype
#define MANUFACTURER Coarse
#define PRODUCT Cordillera

/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16

#define MATRIX_ROW_PINS { A13, B9, F1, A10, A9 }
#define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B8, B7, B6, B5, B4, B3, A15, A14 }
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN A8
#define BACKLIGHT_PWM_DRIVER PWMD1
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 1
#define BACKLIGHT_LEVELS 6
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 6

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

/* 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.
*/

/* 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
38 changes: 38 additions & 0 deletions keyboards/coarse/cordillera/cordillera.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2020 coarse <coarsekeys@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 "cordillera.h"

void keyboard_pre_init_kb(void) {
led_init_ports();
keyboard_pre_init_user();
}

void led_init_ports(void) {
setPinOutput(B0);
setPinOutput(A1);
setPinOutput(A0);
}

bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
writePin(B0, led_state.num_lock);
writePin(A1, led_state.caps_lock);
writePin(A0, led_state.scroll_lock);
}
return true;
}
90 changes: 90 additions & 0 deletions keyboards/coarse/cordillera/cordillera.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
Copyright 2020 coarse <coarsekeys@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 "quantum.h"

#define XXX KC_NO

// Full backspace
// Split right shift
#define LAYOUT_alice( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \
k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \
k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \
k41, k43, k45, k46, k49, k4b, k4f \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \
{ k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \
{ k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \
{ XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \
{ XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \
}

// Split backspace
// Split right shift
#define LAYOUT_alice_split_bs( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \
k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \
k41, k43, k45, k46, k49, k4b, k4f \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \
{ k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \
{ k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \
{ XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \
{ XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \
}

// Split backspace
// Full right shift
#define LAYOUT_alice_split_bs_full_rshift( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \
k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k41, k43, k45, k46, k49, k4b, k4f \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \
{ k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \
{ k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \
{ XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \
{ XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \
}

// Full backspace
// Full right shift
#define LAYOUT_alice_full_rshift( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \
k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \
k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k41, k43, k45, k46, k49, k4b, k4f \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \
{ k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \
{ k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \
{ XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \
{ XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \
}
Loading

0 comments on commit 225af5d

Please sign in to comment.