Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyverz committed Aug 14, 2016
2 parents e875067 + 6323f3d commit 1920c29
Show file tree
Hide file tree
Showing 50 changed files with 2,937 additions and 1,420 deletions.
2 changes: 1 addition & 1 deletion doc/TMK_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Third party libraries like LUFA, PJRC and V-USB have their own license respectiv

Build Firmware and Program Controller
-------------------------------------
See [doc/build.md](tmk_core/doc/build.md), or the readme in the particular keyboards/* folder.
See [build environment setup](/readme.md#build-environment-setup), or the readme in the particular keyboards/* folder.



Expand Down
2 changes: 1 addition & 1 deletion doc/keycode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Keycode Symbol Table
====================
Keycodes are defined in `common/keycode.h`.
Range of 00-A4 and E0-E7 are identical with HID Usage:
<http://www.usb.org/developers/devclass_docs/Hut1_11.pdf>
<http://www.usb.org/developers/hidpage/Hut1_12v2.pdf>
Virtual keycodes are defined out of above range to support special actions.


Expand Down
10 changes: 10 additions & 0 deletions keyboards/atreus/keymaps/xyverz/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_L1] = { /* LAYER 1 */
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 },
{KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_EQL },
<<<<<<< HEAD
{KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS},
=======
{KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS},
>>>>>>> upstream/master
{KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT }
},
[_L2] = { /* LAYER 2 */
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
<<<<<<< HEAD
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PLUS},
{KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 },
{KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET}
=======
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 },
{KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12 },
{KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET }
>>>>>>> upstream/master
}
};

Expand Down
2 changes: 1 addition & 1 deletion keyboards/clueboard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096


# Build Options
# comment out to disable the options.
# change to no to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
Expand Down
3 changes: 0 additions & 3 deletions keyboards/clueboard/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5

Expand Down
8 changes: 0 additions & 8 deletions keyboards/clueboard/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------------------------------------------------------'
*/
[_RS] = KEYMAP(
#ifdef RGBLIGHT_ENABLE
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI),
#else
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS),
#endif
};

enum function_id {
Expand Down
5 changes: 5 additions & 0 deletions keyboards/clueboard/keymaps/skully/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# skullY's Clueboard Layout

This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing.

The most notable change from the default layout is putting Ctrl on the Capslock key. I also swap Alt and Cmd because I mostly use a Mac day to day.
95 changes: 94 additions & 1 deletion keyboards/clueboard/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,97 @@
Clueboard keyboard firmware
======================

TODO: to be updated.
DIY/Assembled compact 66% keyboard by [Clueboard](http://clueboard.co).

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

## First Time Setup

Download or clone the whole firmware and navigate to the keyboards/clueboard directory. Once your dev env is setup, you'll be able to generate the default .hex:

```
$ make
```

You will see a lot of output and if everything worked correctly you will see something similar to this:

```
Size after:
text data bss dec hex filename
0 19992 0 19992 4e18 clueboard_rev2_default.hex
```

At this point you can press RESET on your Clueboard and flash your keyboard with this command:

```
$ make dfu
```

If you would like to use one of the alternative keymaps, or create your own, see below.

## Clueboard 1.0

If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `SUBPROJECT=rev1` to your make command, like this:

```
$ make SUBPROJECT=rev1
```

And when flashing your keyboard:

```
$ make SUBPROJECT=rev1 dfu
```

If you are flashing an alternative layout to your rev1, include both `SUBPROJECT=rev1` and `KEYMAP=<keymap>` in your command, for example when flashing max:

```
$ make SUBPROJECT=rev1 KEYMAP=max dfu
```

## Alternate Keymaps

There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `KEYMAP=<keymap>` to your command:

```
$ make KEYMAP=skully
```

And when flashing your keyboard, put `KEYMAP=<keymap>` between "make" and "dfu":

```
$ make KEYMAP=skully dfu
```

### Notable Layouts

These layouts are notable for one reason or another. If you are looking for ideas or inspiration you should look at these first:

* [keymaps/default](keymaps/default) - The default Clueboard layout
* [keymaps/max](keymaps/max) - A maximised layout that makes use of every key and feature of the Clueboard 2.0 PCB.
* [keymaps/skully](keymaps/skully) - The layout that @skullydazed uses on his own Clueboards.

## Create Your Own Keymap

There are a lot of possibilities when creating your own keymap, and the primary documentation for doing that is [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. As a way to get started, here is the procedure I recommend:

* Copy `[keymaps/default](keymaps/default/)` to `keymaps/<your_layout>`.
* Compile the firmware (`$ make KEYMAP=<your_layout>`)
* Flash the firmware (`$ make KEYMAP=<your_layout> dfu`)
* Make sure everything works like the default keyboard
* Modify `keymaps/<your_layout>/readme.md` to tell others about your layout.
* Modify `keymaps/<your_layout>/keymap.c` to reflect your desired layout.
* Compile your new custom firmware (`$ make KEYMAP=<your_layout>`)
** If you have warnings you may flash without fixing them, but something may not work right.
** If you have any errors you must fix them before continuing.
* Flash the firmware (`$ make KEYMAP=<your_layout> dfu`)

## Share Your Keymap

Got your layout dialed in? Please share it with the world so we can benefit from your work! Simply submit a pull request with your layout and we'll include it in the official repository. Please use the following guidelines when putting together your pull request:

* Include a readme.md that states what your primary keyboard use is, how your layout differs from the default, and highlights anything you think makes your layout particularly great.
* If your layout requires certain features (EG, RGB underlight or backlighting) ensure you have a Makefile and config.h that reflects that
* If your layout requires special hardware to be added, please describe that in the readme.md

TODO: Write up or link quick how-to on creating and submitting a PR. (Pull requests accepted. :)
2 changes: 1 addition & 1 deletion keyboards/clueboard/rev2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17

#endif
#endif
63 changes: 0 additions & 63 deletions keyboards/clueboard2/clueboard2.c

This file was deleted.

31 changes: 18 additions & 13 deletions keyboards/clueboard2/Makefile → keyboards/cluecard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,26 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096


# Build Options
# comment out to disable the options.
# change yes to no to disable
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # 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
RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality by default
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE ?= yes # Audio output on port C6

ifndef QUANTUM_DIR
include ../../Makefile
endif


98 changes: 98 additions & 0 deletions keyboards/cluecard/cluecard.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#include "cluecard.h"
#define BL_RED OCR1B
#define BL_GREEN OCR1A
#define BL_BLUE OCR1C

void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up

matrix_init_user();
}

void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)

matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware

return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

led_set_user(usb_led);
}

void backlight_init_ports(void)
{
// Set B5, B6, and B7 as output
DDRB |= (1<<7)|(1<<6)|(1<<5);

// Setup PWM
ICR1 = 0xFFFF;
TCCR1A = 0b10101010;
TCCR1B = 0b00011001;

BL_RED = 0xFFFF;
BL_GREEN = 0xFFFF;
BL_BLUE = 0xFFFF;
}

void backlight_set(uint8_t level)
{
// Set the RGB color
switch (level)
{
case 0:
// Off
BL_RED = 0xFFFF;
BL_GREEN = 0xFFFF;
BL_BLUE = 0xFFFF;
break;
case 1:
// Red
BL_RED = 0x0000;
BL_GREEN = 0xFFFF;
BL_BLUE = 0xFFFF;
break;
case 2:
// Green
BL_RED = 0xFFFF;
BL_GREEN = 0x0000;
BL_BLUE = 0xFFFF;
break;
case 3:
// Blue
BL_RED = 0xFFFF;
BL_GREEN = 0xFFFF;
BL_BLUE = 0x0000;
break;
case 4:
// Magenta
BL_RED = 0x4000;
BL_GREEN = 0x4000;
BL_BLUE = 0x4000;
break;
case 5:
// Purple
BL_RED = 0x0000;
BL_GREEN = 0xFFFF;
BL_BLUE = 0x0000;
break;
case 6:
// Yellow
BL_RED = 0x0000;
BL_GREEN = 0x0000;
BL_BLUE = 0xFFFF;
break;
default:
xprintf("Unknown level: %d\n", level);
}
}
Loading

0 comments on commit 1920c29

Please sign in to comment.