Skip to content

Commit

Permalink
Merge pull request #10 from sadekbaroudi/issue_008_ffkb_v3
Browse files Browse the repository at this point in the history
Issue #8: add ffkb v3 support
  • Loading branch information
sadekbaroudi authored Sep 25, 2022
2 parents ff7530a + a713657 commit 42ea5dd
Show file tree
Hide file tree
Showing 42 changed files with 3,064 additions and 404 deletions.
51 changes: 2 additions & 49 deletions keyboards/fingerpunch/ffkb_byomcu/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.


/* USB Device descriptor parameter */
#define DEVICE_VER 0x0001
// #define DEVICE_VER 0x0001 // now defined in vx/config.h
#define VENDOR_ID 0xFEFE
#define PRODUCT_ID 0xFFBB
#define MANUFACTURER sadekbaroudi
#define PRODUCT sadekbaroudi ffkb_byomcu

/* key matrix size */
/* Rows are doubled up */
#define MATRIX_ROWS 6
#define MATRIX_COLS 8

// wiring
#define MATRIX_ROW_PINS \
{ D2, F4, F5, F6, F7, B1 }
#define MATRIX_COL_PINS \
{ B5, B4, E6, D7, C6, D4, B2, B3 }

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

Expand Down Expand Up @@ -108,46 +97,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

#define ENCODERS_PAD_A {D5, B6, D1}
#define ENCODERS_PAD_B {B7, F1, D0}

#ifdef FP_EVQ_UNDER_PALMS
#define ENCODERS_A_REVERSE
#define ENCODERS_B_REVERSE
#endif

#ifdef FP_EC11_UNDER_PALMS
#define ENCODERS_C_REVERSE
#endif

#if defined(OLED_ENABLE) || defined(PIMORONI_TRACKBALL_ENABLE)
#undef ENCODERS_PAD_A
#define ENCODERS_PAD_A {D5, B6}
#undef ENCODERS_PAD_B
#define ENCODERS_PAD_B {B7, F1}
#endif

#define ENCODER_RESOLUTION 2

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

#ifdef PIMORONI_TRACKBALL_ENABLE
#define PIMORONI_TRACKBALL_ROTATE
#define PIMORONI_TRACKBALL_CLICK
#endif

// cirque trackpad config
#define CIRQUE_PINNACLE_ADDR 0x2A
#define POINTING_DEVICE_ROTATION_90
#define CIRQUE_PINNACLE_TAP_ENABLE
#define POINTING_DEVICE_TASK_THROTTLE_MS 5
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2

// If using encoder type 2, uncomment this
// #define ENCODERS_B_REVERSE

// For via/vial only
#define DYNAMIC_KEYMAP_LAYER_COUNT 5
37 changes: 8 additions & 29 deletions keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2021 Sadek Baroudi <[email protected]>
/* Copyright 2022 Sadek Baroudi <[email protected]>
*
* 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
Expand All @@ -17,31 +17,10 @@

#include "quantum.h"

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

// 1-40 are the keyswitches, and 50 and 51 are the rotary encoders
#define LAYOUT_ffkb( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K32, K34, K35, K36, K37, K38, K39, K3B, \
K3A \
) \
{ \
{ K01, K02, K03, K04, K05, K06, K07, K08 }, \
{ K11, K12, K13, K14, K15, K16, K17, K18 }, \
{ K21, K22, K23, K24, K25, K26, K27, K28 }, \
{ KC_NO, KC_NO, K19, K2A, K0A, K1B, K2B, K0C }, \
{ KC_NO, K3A, K29, K09, K1A, K0B, K2C, K1C }, \
{ K3B, K32, K39, K34, K35, K36, K37, K38 } \
}


// KC_NO, K32, KC_NO, K34, K35, K36, K37, K38
#if defined(KEYBOARD_fingerpunch_ffkb_byomcu_v1)
# include "v1.h"
#elif defined(KEYBOARD_fingerpunch_ffkb_byomcu_v2)
# include "v2.h"
#elif defined(KEYBOARD_fingerpunch_ffkb_byomcu_v3)
# include "v3.h"
#endif
69 changes: 69 additions & 0 deletions keyboards/fingerpunch/ffkb_byomcu/v1/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
Copyright 2021 Sadek Baroudi <[email protected]>
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 DEVICE_VER 0x0001

/* key matrix size */
/* Rows are doubled up */
#define MATRIX_ROWS 6
#define MATRIX_COLS 8

// wiring
#define MATRIX_ROW_PINS \
{ D2, F4, F5, F6, F7, B1 }
#define MATRIX_COL_PINS \
{ B5, B4, E6, D7, C6, D4, B2, B3 }

#define ENCODERS_PAD_A {D5, B6, D1}
#define ENCODERS_PAD_B {B7, F1, D0}

#ifdef FP_EVQ_UNDER_PALMS
#define ENCODERS_A_REVERSE
#define ENCODERS_B_REVERSE
#endif

#ifdef FP_EC11_UNDER_PALMS
#define ENCODERS_C_REVERSE
#endif

#if defined(OLED_ENABLE) || defined(PIMORONI_TRACKBALL_ENABLE)
#undef ENCODERS_PAD_A
#define ENCODERS_PAD_A {D5, B6}
#undef ENCODERS_PAD_B
#define ENCODERS_PAD_B {B7, F1}
#endif

#define ENCODER_RESOLUTION 2

#ifdef PIMORONI_TRACKBALL_ENABLE
#define PIMORONI_TRACKBALL_ROTATE
#define PIMORONI_TRACKBALL_CLICK
#endif

#ifdef CIRQUE_ENABLE
// cirque trackpad config
#define CIRQUE_PINNACLE_ADDR 0x2A
#define POINTING_DEVICE_ROTATION_90
#define CIRQUE_PINNACLE_TAP_ENABLE
#define POINTING_DEVICE_TASK_THROTTLE_MS 5
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
#endif
27 changes: 27 additions & 0 deletions keyboards/fingerpunch/ffkb_byomcu/v1/fp_build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"type" : "one-of",
"names" : [ "RGBLIGHT_ENABLE", "RGB_MATRIX_ENABLE" ],
"user_input": "No RGB, RGB light, RGB matrix?"
},
{
"type" : "single",
"name" : "OLED_ENABLE",
"user_input": "Do you have an OLED?"
},
{
"type" : "single",
"name" : "FP_EC11_CENTER",
"user_input": "Do you have an EC11 in the center?"
},
{
"type" : "one-of",
"names" : [ "FP_EC11_UNDER_PALMS", "FP_EVQ_UNDER_PALMS" ],
"user_input": "No under palm encoders, EC11, or EVQ?"
},
{
"type" : "single",
"name" : "PIMORONI_TRACKBALL_ENABLE",
"user_input": "Do you have a pimoroni trackball?"
}
]
27 changes: 27 additions & 0 deletions keyboards/fingerpunch/ffkb_byomcu/v1/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ffkb

An ergonomic 30% keyboard

* Keyboard Maintainer: [sadekbaroudi](https://github.com/sadekbaroudi)

Faux fox keyboard (ffkb)

Make example for this keyboard (after setting up your build environment):
```
make fingerpunch/ffkb_byomcu:default RGBLIGHT_ENABLE=yes FP_EC11_UNDER_PALMS=yes CIRQUE_ENABLE=yes OLED_ENABLE=yes
```

Don't forget to add ```CONVERT_TO=stemcell``` if using a stemcell controller.

Options are:
```
RGBLIGHT_ENABLE=yes
RGB_MATRIX_ENABLE=yes
OLED_ENABLE=yes
FP_EC11_CENTER=yes
FP_EC11_UNDER_PALMS=yes
FP_EVQ_UNDER_PALMS=yes
PIMORONI_TRACKBALL_ENABLE=yes
```

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).
64 changes: 64 additions & 0 deletions keyboards/fingerpunch/ffkb_byomcu/v1/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu

# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality

# Either do RGBLIGHT_ENABLE or RGB_MATRIX_ENABLE and RGB_MATRIX_DRIVER
RGBLIGHT_ENABLE = no
RGB_MATRIX_ENABLE = no
RGB_MATRIX_DRIVER = WS2812

MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
ENCODER_ENABLE = no
OLED_ENABLE = no # this can be yes or no depending on if you have an OLED
EXTRAFLAGS += -flto # macros disabled, as a lot of barobord features require more space, can move this line into all the individual rules.mk, only where needed
# for instance, if you build "no_features", it's very unlikely you'll need to disable macros
MOUSEKEY_ENABLE = no

PIMORONI_TRACKBALL_ENABLE = no

ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
POINTING_DEVICE_DRIVER := pimoroni_trackball
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif

ifeq ($(strip $(FP_EC11_CENTER)), yes)
ENCODER_ENABLE := yes
OPT_DEFS += -DFP_EC11_CENTER
endif

ifeq ($(strip $(FP_EC11_UNDER_PALMS)), yes)
ENCODER_ENABLE := yes
OPT_DEFS += -DFP_EC11_UNDER_PALMS
endif

ifeq ($(strip $(FP_EVQ_UNDER_PALMS)), yes)
ENCODER_ENABLE := yes
OPT_DEFS += -DFP_EVQ_UNDER_PALMS
endif
34 changes: 34 additions & 0 deletions keyboards/fingerpunch/ffkb_byomcu/v1/v1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Copyright 2021-2022 Sadek Baroudi <[email protected]>
*
* 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 LAYOUT_ffkb( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K32, K34, K35, K36, K37, K38, K39, K3B, \
K3A \
) \
{ \
{ K01, K02, K03, K04, K05, K06, K07, K08 }, \
{ K11, K12, K13, K14, K15, K16, K17, K18 }, \
{ K21, K22, K23, K24, K25, K26, K27, K28 }, \
{ KC_NO, KC_NO, K19, K2A, K0A, K1B, K2B, K0C }, \
{ KC_NO, K3A, K29, K09, K1A, K0B, K2C, K1C }, \
{ K3B, K32, K39, K34, K35, K36, K37, K38 } \
}
Loading

0 comments on commit 42ea5dd

Please sign in to comment.