Skip to content

Commit

Permalink
Backlight abstraction and other changes (qmk#439)
Browse files Browse the repository at this point in the history
* redoes matrix pins, abstracts backlight code for B5,6,7

* slimming down keyboard stuff, backlight breathing implemented

* don't call backlight init when no pin

* cleans up user/kb/quantum calls, keyboard files

* fix pvc atomic

* replaces CHANNEL with correct var in breathing

* removes .hexs, updates readmes, updates template

* cleans-up clueboards, readmes to lowercase

* updates readme
  • Loading branch information
jackhumbert authored Jun 24, 2016
1 parent ba116ce commit 13bb6b4
Show file tree
Hide file tree
Showing 239 changed files with 1,146 additions and 139,888 deletions.
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
keyboards/planck/dfu-programmer.exe
.dep
*.o
*.eep
*.elf
/*.hex
/keyboards/**/*.hex
/keyboards/**/keymaps/**/*.hex
!/keyboards/**/keymaps/**/compiled.hex
*.hex
!util/bootloader.hex
!quantum/tools/eeprom_reset.hex
*.log
*.lss
*.lst
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ SRC += $(KEYBOARD_FILE) \
$(KEYMAP_FILE) \
$(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap.c \
$(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/led.c
$(QUANTUM_DIR)/keycode_config.c

ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c
Expand Down
7 changes: 3 additions & 4 deletions doc/BUILD_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build Guide
# This guide has now been included in the main readme - please reference that one instead.

## Build Environment Setup

Expand Down Expand Up @@ -40,7 +40,7 @@ If you have any problems building the firmware, you can try using a tool called
## Verify Your Installation
1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `README.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.

## Customizing, Building, and Deploying Your Firmware
Expand All @@ -49,7 +49,7 @@ If you have any problems building the firmware, you can try using a tool called

The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). You can run `make` from the root (`/`), your keyboard folder (`/keyboards/<keyboard>/`), or your keymap folder (`/keyboards/<keyboard>/keymaps/<keymap>/`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)).

By default, this will generate a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests. Your .hex file will also be copied into your keymap folder as `compiled.hex`, which isn't ignored by git - this is included in case first-time users are having trouble compiling, and just want to flash a layout via `make dfu-no-build` or using the Teensy loader.
By default, this will generate a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests.

* The "root" (`/`) folder is the qmk_firmware folder, in which are `doc`, `keyboard`, `quantum`, etc.
* The "keyboard" folder is any keyboard project's folder, like `/keyboards/planck`.
Expand All @@ -63,7 +63,6 @@ Below is a list of the useful `make` commands in QMK:
* `make quick` - skips the clean step (cannot be used immediately after modifying config.h or Makefiles)
* `make dfu` - (requires dfu-programmer) builds and flashes the keymap to your keyboard once placed in reset/dfu mode (button or press `KC_RESET`). This does not work for Teensy-based keyboards like the ErgoDox EZ.
* `keyboard=` and `keymap=` are compatible with this
* `make dfu-no-build` - (requires dfu-programmer) same as `make dfu`, but doesn't build and uses the included `compiled.hex` to flash the keyboard
* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root)
* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root)
* `make all-keymaps [keyboard=<keyboard>]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `<keyboard>`
Expand Down
2 changes: 1 addition & 1 deletion doc/HAND_WIRE.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ If you've done all of these things, keep in mind that sometimes you might have h

Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.

There are a lot of possibilities inside the firmware - check out the [README](https://github.com/jackhumbert/qmk_firmware/blob/master/README.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)

## Trouble-shooting compiling

Expand Down
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 [doc/build.md](tmk_core/doc/build.md), or the readme in the particular keyboards/* folder.



Expand Down
2 changes: 1 addition & 1 deletion doc/VAGRANT_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Other than having Vagrant and Virtualbox installed and possibly a restart of you

Build Firmware and Program Controller
-------------------------------------
See [/doc/BUIDE_GUIDE.md](/doc/BUILD_GUIDE.md), or the README in the particular keyboards/* folder.
See [/doc/BUIDE_GUIDE.md](/doc/BUILD_GUIDE.md), or the readme in the particular keyboards/* folder.

Change your keymap
------------------
Expand Down
15 changes: 1 addition & 14 deletions keyboards/alps64/alps64.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)

__attribute__ ((weak))
void matrix_init_user(void) {

}

__attribute__ ((weak))
void matrix_scan_user(void) {

}

void matrix_init_kb(void) {
LED_ON();
_delay_ms(500);
LED_OFF();

matrix_init_user();
}

void matrix_scan_kb(void) {
matrix_scan_user();
}
}
Loading

0 comments on commit 13bb6b4

Please sign in to comment.