Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Bug fixes and improvements to PloopyCo devices #10573

Merged
merged 25 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add support for new revision of trackball
  • Loading branch information
drashna committed Oct 15, 2020
commit 08bebb7862459179f990a67f7d82be890619733e
20 changes: 1 addition & 19 deletions keyboards/ploopyco/trackball/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,6 @@
#define MATRIX_ROWS 1
#define MATRIX_COLS 5

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define DIRECT_PINS \
{ \
{ D4, D2, E6, B5, D7 } \
}

// These pins are not broken out, and cannot be used normally.
// They are set as output and pulled high, by default
#define UNUSED_PINS \
{ D1, D3, B4, B6, B7, D6, C7, F6, F5, F3, F7 }

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
Expand All @@ -75,4 +56,5 @@

#define ROTATIONAL_TRANSFORM_ANGLE 20

// If board has a debug LED, you can enable it by defining this
// #define DEBUG_LED_PIN F7
30 changes: 30 additions & 0 deletions keyboards/ploopyco/trackball/rev1/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* Copyright 2019 Sunjun Kim
* Copyright 2020 Ploopy Corporation
*
* 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 DIRECT_PINS \
{ \
{ D4, D2, E6, B5, D7 } \
}

#define UNUSED_PINS \
{ D1, D3, B4, B6, B7, D6, C7, F6, F5, F3 }

// If board has a debug LED, you can enable it by defining this
#define DEBUG_LED_PIN F7
21 changes: 21 additions & 0 deletions keyboards/ploopyco/trackball/rev1/rev1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* Copyright 2019 Sunjun Kim
* Copyright 2020 Ploopy Corporation
*
* 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 "trackball.h"
Empty file.
39 changes: 39 additions & 0 deletions keyboards/ploopyco/trackball/rev1_005/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* Copyright 2019 Sunjun Kim
* Copyright 2020 Ploopy Corporation
*
* 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

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define DIRECT_PINS \
{ \
{ D4, D2, E6, B6, D7 } \
}

// These pins are not broken out, and cannot be used normally.
// They are set as output and pulled high, by default
#define UNUSED_PINS \
{ D1, D3, B4, B5, B7, D6, C7, F6, F5, F3, F7 }
21 changes: 21 additions & 0 deletions keyboards/ploopyco/trackball/rev1_005/rev1_005.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* Copyright 2019 Sunjun Kim
* Copyright 2020 Ploopy Corporation
*
* 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 "trackball.h"
Empty file.
2 changes: 2 additions & 0 deletions keyboards/ploopyco/trackball/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ MOUSEKEY_ENABLE = no # Mouse keys

QUANTUM_LIB_SRC += analog.c spi_master.c
SRC += pmw3360.c opt_encoder.c

DEFAULT_FOLDER = ploopyco/trackball/rev1_005
2 changes: 1 addition & 1 deletion keyboards/ploopyco/trackball/trackball.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H
#include "trackball.h"

#ifndef OPT_DEBOUNCE
# define OPT_DEBOUNCE 5 // (ms) Time between scroll events
Expand Down
5 changes: 5 additions & 0 deletions keyboards/ploopyco/trackball/trackball.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#include "analog.h"
#include "opt_encoder.h"
#include "pointing_device.h"
#if defined(KEYBOARD_ploopyco_trackball_rev1)
# include "rev1.h"
#elif defined(KEYBOARD_ploopyco_trackball_rev1_005)
# include "rev1_005.h"
#endif

// Sensor defs
#define OPT_ENC1 F0
Expand Down