X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=docs%2Fhardware_avr.md;h=7c28ab6dbcc5d20dfdfb239d057e5868df5bc310;hb=3538955778c253e68779605cc67c27e15d195729;hp=12a0059c3fe89eb5017ef19c2472d416101d2f12;hpb=fc069869896c279f175d2d5acf1ef545278c7102;p=qmk_firmware.git diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 12a0059c3..7c28ab6db 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -6,14 +6,26 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_ ## Adding Your AVR Keyboard to QMK -QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script: - -```bash -$ util/new_project.sh my_awesome_keyboard -###################################################### -# /keyboards/my_awesome_keyboard project created. To start -# working on things, cd into keyboards/my_awesome_keyboard -###################################################### +QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run the `util/new_keyboard.sh` script: + +``` +$ ./util/new_keyboard.sh +Generating a new QMK keyboard directory + +Keyboard Name: mycoolkb +Keyboard Type [avr]: +Your Name [John Smith]: + +Copying base template files... done +Copying avr template files... done +Renaming keyboard files... done +Replacing %KEYBOARD% with mycoolkb... done +Replacing %YOUR_NAME% with John Smith... done + +Created a new keyboard called mycoolkb. + +To start working on things, cd into keyboards/mycoolkb, +or open the directory in your favourite text editor. ``` This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. @@ -93,6 +105,24 @@ Finally, you can specify the direction your diodes point. This can be `COL2ROW` #define DIODE_DIRECTION COL2ROW ``` +#### Direct Pin Matrix +To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. + +```c +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F1, E6, B0, B2, B3 }, \ + { F5, F0, B1, B7, D2 }, \ + { F6, F7, C7, D5, D3 }, \ + { B5, C6, B6, NO_PIN, NO_PIN } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION +``` + ### Backlight Configuration By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).