Skip to content

Commit

Permalink
Added WS2812 support for KC60 (qmk#419)
Browse files Browse the repository at this point in the history
* Added WS2812 support for KC60

* Reorganized WS2812 support into its own keymap

* Fixed relative link in README

* Moved WS2812 mention in README to the bottom

* Fixed titling in WS2812 README

* Reverted KC60 Makefile and default keymap back

* Moved RGB specific config.h to ws2812 keymap folder
  • Loading branch information
stanleylai authored and jackhumbert committed Jun 20, 2016
1 parent 3f6fac4 commit 3302258
Show file tree
Hide file tree
Showing 14 changed files with 3,792 additions and 1,458 deletions.
3 changes: 1 addition & 2 deletions keyboard/kc60/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
# (must have Atmel FLIP installed).
#
# make debug = Start either simulavr or avarice as specified for debugging,
# make debug = Start either simulavr or avarice as specified for debugging,
# with avr-gdb or avr-insight as the front end for debugging.
#
# make filename.s = Just compile filename.c into the assembler code only.
Expand Down Expand Up @@ -111,4 +111,3 @@ AUDIO_ENABLE ?= no # Audio output on port C6
ifndef QUANTUM_DIR
include ../../Makefile
endif

9 changes: 6 additions & 3 deletions keyboard/kc60/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ KC60 (version 2.0) keyboard firmware
======================

## Quantum MK Firmware

For the full Quantum feature list, see [the parent README.md](/README.md).

## Building

Download or clone the whole firmware and navigate to the keyboard/kc60 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
Download or clone the whole firmware and navigate to the keyboard/kc60 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.

Depending on which keymap you would like to use, you will have to compile slightly differently.

Expand All @@ -22,3 +20,8 @@ To build the firmware binary hex file with a keymap just do `make` with `KEYMAP`
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

## WS2812 Support
![Image of KC60 with RGB Underglow](keymaps/ws2812/ws2812_example.jpg)

Build with WS2812 Support by running `make KEYMAP=ws2812`.
2 changes: 1 addition & 1 deletion keyboard/kc60/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

// Possible pins for columns include: F1 F0 E6 D7 D6 D4 C7 C6 B7 B5 B4 B3 B1 B0
// Pins for rows include: D0 D1 F6 F7 D5
// KC60 Version 2
// KC60 Version 2
#define MATRIX_ROW_PINS { D0, D1, F6, F7, D5 }
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
#define UNUSED_PINS
Expand Down
4 changes: 2 additions & 2 deletions keyboard/kc60/kc60.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void backlight_init_ports()
DDRB |= (1<<6);
PORTB &= ~(1<<6);

// Use full 16-bit resolution.
// Use full 16-bit resolution.
ICR1 = 0xFFFF;

// I could write a wall of text here to explain... but TL;DW
Expand Down Expand Up @@ -99,7 +99,7 @@ void backlight_set(uint8_t level)
// Set the brightness
CHANNEL = 0xFFFF;
}
else
else
{
// Turn on PWM control of PB6
TCCR1A |= _BV(COM1B1);
Expand Down
Loading

0 comments on commit 3302258

Please sign in to comment.