Skip to content

Commit

Permalink
[Keyboard] Adds Elongate Revision Delta PCB support (qmk#15498)
Browse files Browse the repository at this point in the history
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
  • Loading branch information
4 people committed Jan 29, 2022
1 parent db56db2 commit bd8e257
Show file tree
Hide file tree
Showing 25 changed files with 533 additions and 63 deletions.
17 changes: 17 additions & 0 deletions keyboards/acheron/elongate/beta/beta.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright 2020 Gondolindrim
*
* 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 "beta.h"
44 changes: 44 additions & 0 deletions keyboards/acheron/elongate/beta/beta.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Copyright 2020 Gondolindrim
*
* 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"

/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the Keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/

#define KNO KC_NO

#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K49, K41, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, K1C, K4A, K42, \
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4B, K44, \
K30, K31, K32, K34, K37, K3A, K3B, K3C, K3D, K4C, K47 \
)\
{\
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KNO, K1B, K1C }, \
{ K20, KNO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
{ K30, K31, K32, KNO, K34, KNO, KNO, K37, KNO, K3A, K3B, K3C, K3D }, \
{ KNO, K41, K42, KNO, K44, KNO, KNO, K47, KNO, K49, K4A, K4B, K4C } \
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0

#define LED_NUM_LOCK_PIN D2
#define LED_CAPS_LOCK_PIN D1
#define LED_SCROLL_LOCK_PIN D0
File renamed without changes.
43 changes: 43 additions & 0 deletions keyboards/acheron/elongate/beta/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Acheron Elongate rev. Beta QMK firmware repository

![](https://i.imgur.com/G9LESkUh.jpg)

* Keyboard Maintainer: [Gondolindrim](https://github.com/Gondolindrim)
* Hardware Supported: [open-source PCB](https://github.com/AcheronProject/Elongate) powered by STM32F072 microcontroller
* Hardware Availability: the revision beta of Elongate was never publicly sold.

## Introduction

This is the QMK firmware repository for the Elongate PCB revision Beta and pre-revision Beta versions, which was the initial revision PCB for this keyboard; hence it was never sold publicly.

The Elongate PCB is an Open-Hardware-guideline-compliant PCB which files can be found at [this repository](https://github.com/AcheronProject/Elongate). Its designer and maintainer is [Gondolindrim](https://github.com/Gondolindrim).

## How to flash

### Enter bootloader

The DFU state in the bootloader can be accessed in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: press the button on the front of the PCB.
* **Keycode in layout**: Press the key mapped to `RESET` if it is available.

## Compile firmware

You can build the default layout firwmare for Elongate after setting up your build environment by using:

make acheron/elongate/beta:default

After entering DFU state in your PCB, you can download the binary file generated through `dfu-util` or a GUI like QMK Toolbox.

To directly flash the PCB after it is put into a DFU state, use

make acheron/elongate/beta:default:flash

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

## PCB Documentation

See the [AcheronDocs](https://acheronproject.com/pcbs/elongate/) page for the ElongatePCB full documentation. You can also check the KiCad PCB files at the [Elongate GitHub repository](https://github.com/AcheronProject/Elongate).

Before using the files for personal or commercial use, please read the [Acheron Open-Hardware License V1.4](https://acheronproject.com/AOHL14/) under which the Elongate PCB is published.
File renamed without changes.
25 changes: 25 additions & 0 deletions keyboards/acheron/elongate/delta/chconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2020 QMK
*
* 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

#define CH_CFG_ST_FREQUENCY 10000

#define CH_CFG_OPTIMIZE_SPEED FALSE

#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE

#include_next <chconf.h>
81 changes: 81 additions & 0 deletions keyboards/acheron/elongate/delta/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
Copyright 2020 Gondolindrim
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"

/* USB Device descriptor parameter */
#define VENDOR_ID 0x4150 //AP for AcheronProject
#define PRODUCT_ID 0x454D // EL+1 for Elongate revision Delta
#define DEVICE_VER 0x0002
#define MANUFACTURER Acheron Project
#define PRODUCT Elongate

#define MATRIX_ROWS 5
#define MATRIX_COLS 15

#define MATRIX_COL_PINS { A10, A9, A8, B14, B12, B11, B10, B2, B1, A7, A5, B9, B8, B7, B6 }
#define MATRIX_ROW_PINS { B3, A15, B0, B4, B5 }

#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN A6
#define BACKLIGHT_PWM_DRIVER PWMD3
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 1
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 20
#define BACKLIGHT_DEFAULT_LEVEL 10
#define BREATHING_PERIOD 3

#define RGB_DI_PIN B15
#define RGBLED_NUM 16
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_SLEEP
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE

#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5)

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST

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

// Elongate has six indicator LEDs. These def's are the indicator pin defs. The LEDs are distributed in two clusters: one next to the numpad and another between spacebars; LEDs are numbered top-to-bottom.

#define LED1_PIN A2
#define LED2_PIN A1
#define LED3_PIN A0
#define LED4_PIN A4
#define LED5_PIN A3
#define LED6_PIN F1
78 changes: 78 additions & 0 deletions keyboards/acheron/elongate/delta/delta.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/* Copyright 2021 Gondolindrim
*
* 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 "delta.h"

#define LED_PIN_ON_STATE 1
// Inits all indicator LEDs as push-pull outputs
void led_init_ports(void) {
palSetLineMode(LED1_PIN, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LED2_PIN, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LED3_PIN, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LED4_PIN, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LED5_PIN, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LED6_PIN, PAL_MODE_OUTPUT_PUSHPULL);
}

// This function updates LEDs 1, 2 and 3 according to num, caps and scroll lock states
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(LED1_PIN, !led_state.num_lock);
writePin(LED2_PIN, !led_state.caps_lock);
writePin(LED3_PIN, !led_state.scroll_lock);
}
return res;
}

// Turns off all bottom LEDs
void turn_off_bottom_leds(void){
writePin(LED4_PIN, 1);
writePin(LED5_PIN, 1);
writePin(LED6_PIN, 1);
}

/*
Here the bottom LEDs get updated. The idea being that LED4 is lit when the default layer is active, LED5 when layer 1 is active and LED6 when layer 2.
Before updating, however, all bottom LEDs are turned off.
*/
layer_state_t layer_state_set_kb(layer_state_t state) {
turn_off_bottom_leds();
switch (get_highest_layer(state)) {
// The base layer, or layer zero, will be handled by the default case.
case 1:
writePin(LED4_PIN, 1);
writePin(LED5_PIN, 0);
writePin(LED6_PIN, 1);
break;
case 2:
writePin(LED4_PIN, 1);
writePin(LED5_PIN, 1);
writePin(LED6_PIN, 0);
break;
default:
writePin(LED4_PIN, 0);
writePin(LED5_PIN, 1);
writePin(LED6_PIN, 1);
break;
}
return state;
}

// Since the keyboard starts at layer 0, the init function starts LED4 as lit up.
void keyboard_post_init_kb(void){
writePin(LED4_PIN, 0);
}
34 changes: 34 additions & 0 deletions keyboards/acheron/elongate/delta/delta.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Copyright 2021 Gondolindrim
*
* 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 ___ KC_NO

#define LAYOUT_all( \
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, K1B, K1C, K1D, K1E, \
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K4B, K4C, K4D, K4E, \
K30, K31, K32, K34, K37, K39, K3A, K3B, K3C, K3D, K3E \
) { \
{ 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, ___, K1B, K1C, K1D, K1E }, \
{ K20, ___, K22, K23, K24, K25, K26, K27, K28, K29, K2A, ___, ___, ___, ___ }, \
{ K30, K31, K32, ___, K34, ___, ___, K37, ___, K39, K3A, K3B, K3C, K3D, K3E }, \
{ ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, K4B, K4C, K4D, K4E } \
}
23 changes: 23 additions & 0 deletions keyboards/acheron/elongate/delta/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* Copyright 2020 QMK
*
* 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

#define HAL_USE_PWM TRUE

#define HAL_USE_SPI TRUE

#include_next <halconf.h>
Loading

0 comments on commit bd8e257

Please sign in to comment.