Skip to content

Commit

Permalink
[Keyboard] Panc60 Refactor (qmk#5559)
Browse files Browse the repository at this point in the history
* remove unneeded uart setting

* use pragma once everywhere

* remove custom matrix support

* fixup readme

* set bootmagic to lite

* remove dependency on custom i2c code

* use the right header files and function calls
  • Loading branch information
mechmerlin authored and drashna committed Apr 7, 2019
1 parent 4109844 commit 5c1ef2b
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 296 deletions.
2 changes: 0 additions & 2 deletions keyboards/panc60/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS

#define NO_UART 1
106 changes: 0 additions & 106 deletions keyboards/panc60/i2c.c

This file was deleted.

27 changes: 0 additions & 27 deletions keyboards/panc60/i2c.h

This file was deleted.

145 changes: 0 additions & 145 deletions keyboards/panc60/matrix.c

This file was deleted.

4 changes: 2 additions & 2 deletions keyboards/panc60/panc60.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <avr/pgmspace.h>

#include "action_layer.h"
#include "i2c.h"
#include "i2c_master.h"
#include "quantum.h"

__attribute__ ((weak))
Expand All @@ -44,7 +44,7 @@ void rgblight_set(void) {
}

i2c_init();
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif

Expand Down
5 changes: 1 addition & 4 deletions keyboards/panc60/panc60.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http:https://www.gnu.org/licenses/>.
*/
#ifndef PANC60_H
#define PANC60_H
#pragma once

#include "quantum.h"

Expand Down Expand Up @@ -67,5 +66,3 @@
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, KC_NO, KC_NO } \
}

#endif
8 changes: 5 additions & 3 deletions keyboards/panc60/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Make example for this keyboard (after setting up your build environment):

Flashing

**Reset Key:** Hold down the key located at `K40`, commonly programmed as left control while plugging in the keyboard. You may also hold down the key located at `K00`, commonly programmed as the `Esc` key.

ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.

To put the panc60 into reset, hold left control while plugging in.
Expand All @@ -36,9 +38,9 @@ macOS:
```
3. Install the following packages:
```
brew install python
brew install pyusb
brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
brew install python3
pip3 install pyusb
brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
Expand Down
5 changes: 2 additions & 3 deletions keyboards/panc60/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID

# build options
BOOTMAGIC_ENABLE = yes
BOOTMAGIC_ENABLE = lite
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
Expand All @@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0

# custom matrix setup
CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c
SRC = i2c_master.c

# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
Expand Down
5 changes: 1 addition & 4 deletions keyboards/panc60/usbconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/

#ifndef __usbconfig_h_included__
#define __usbconfig_h_included__
#pragma once

#include "config.h"

Expand Down Expand Up @@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect

#endif /* __usbconfig_h_included__ */

0 comments on commit 5c1ef2b

Please sign in to comment.