diff options
author | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-04-26 11:21:40 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-04-26 11:21:40 -0700 |
commit | ffd10d41168a7bf3eb2631490c61fb7a552fa6a6 (patch) | |
tree | 03ab98994cbcc0973ca182c7fe2a022149670910 | |
parent | 90cd383d4622b7d4603e05ad101916df47775d7c (diff) | |
download | qmk_firmware-ffd10d41168a7bf3eb2631490c61fb7a552fa6a6.tar.gz |
[Keyboard] Eagle/Viper V2 Cleanups (#5709)
* cleanup matrix of unused row and column, and add more documentation
* update matrix notes
* update readmes
* update readmes
* fix comments E2 to E3
-rw-r--r-- | keyboards/duck/eagle_viper/readme.md | 6 | ||||
-rw-r--r-- | keyboards/duck/eagle_viper/v2/matrix.c | 60 | ||||
-rw-r--r-- | keyboards/duck/eagle_viper/v2/readme.md | 2 |
3 files changed, 31 insertions, 37 deletions
diff --git a/keyboards/duck/eagle_viper/readme.md b/keyboards/duck/eagle_viper/readme.md index 3fec11bc0..63623940b 100644 --- a/keyboards/duck/eagle_viper/readme.md +++ b/keyboards/duck/eagle_viper/readme.md @@ -2,10 +2,6 @@ Non official firmware for custom Korean keyboard with 60% key layout made by Duck. -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. - Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127) -Make example for this keyboard (after setting up your build environment): - - make duck/eagle_viper/v2:default +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c index a6bc56342..b705ae49f 100644 --- a/keyboards/duck/eagle_viper/v2/matrix.c +++ b/keyboards/duck/eagle_viper/v2/matrix.c @@ -123,31 +123,27 @@ void matrix_print(void) { } } -/* Row pin configuration - * row: 0 1 2 3 4 5 - * pin: PB7 PD0 PD1 PD2 PD3 PD5 +/* Row pin configuration - diode connected + * row: 0 1 2 3 4 + * pin: PD0 PD1 PD2 PD3 PD5 * - * Esc uses its own pin PE2 + * Caps Lock uses its own pin PE2 on the column pin, row pin is grounded */ static void init_rows(void) { DDRD &= ~0b00101111; PORTD &= ~0b00101111; - DDRB &= ~0b10000000; - PORTB &= ~0b10000000; - DDRE &= ~0b00000100; PORTE |= 0b00000100; } static uint8_t read_rows(uint8_t col) { - return (PIND&(1<<0) ? (1<<0) : 0) | + return (PIND&(1<<0) ? (1<<0) : 0) | (PIND&(1<<1) ? (1<<1) : 0) | (PIND&(1<<2) ? (1<<2) : 0) | (PIND&(1<<3) ? (1<<3) : 0) | (PIND&(1<<5) ? (1<<4) : 0) | - (PINB&(1<<7) ? (1<<5) : 0) | (col==0 ? ((PINE&(1<<2) ? 0 : (1<<2))) : 0); } @@ -158,24 +154,31 @@ uint8_t read_fwkey(void) } /* Columns 0 - 15 + * + * atmega32u4 decoder pin + * PC6 U1 E3 + * PB6 U2 E3 + * PF0 U1, U2 A0 + * PF1 U1, U2 A1 + * PC7 U1, U2 A2 + * * These columns uses two 74HC237D 3 to 8 bit demultiplexers. - * col / pin: PC6 PB6 PF0 PF1 PC7 - * 0: 1 0 0 0 0 - * 1: 1 0 1 0 0 - * 2: 1 0 0 1 0 - * 3: 1 0 1 1 0 - * 4: 1 0 0 0 1 - * 5: 1 0 1 0 1 - * 6: 1 0 0 1 1 - * 7: 1 0 1 1 1 - * 8: 0 1 0 0 0 - * 9: 0 1 1 0 0 - * 10: 0 1 0 1 0 - * 11: 0 1 1 1 0 - * 12: 0 1 0 0 1 - * 13: 0 1 1 0 1 - * 14: 0 1 0 1 1 - * 15: 0 1 1 1 1 + * col / pin: PC6 PB6 PF0 PF1 PC7 Decoder Pin + * 0: 1 0 0 0 0 U1 Y0 + * 1: 1 0 1 0 0 U1 Y1 + * 2: 1 0 0 1 0 U1 Y2 + * 3: 1 0 1 1 0 U1 Y3 + * 4: 1 0 0 0 1 U1 Y4 + * 5: 1 0 1 0 1 U1 Y5 + * 6: 1 0 0 1 1 U1 Y6 + * 7: 1 0 1 1 1 U1 Y7 + * 8: 0 1 0 0 0 U2 Y0 + * 9: 0 1 1 0 0 U2 Y1 + * 10: 0 1 0 1 0 U2 Y2 + * 11: 0 1 1 1 0 U2 Y3 + * 12: 0 1 0 0 1 U2 Y4 + * 13: 0 1 1 0 1 U2 Y5 + * 14: 0 1 0 1 1 U2 Y6 * */ static void unselect_cols(void) { @@ -251,10 +254,5 @@ static void select_col(uint8_t col) { PORTF |= 0b00000010; PORTC |= 0b10000000; break; - case 15: - PORTB |= 0b01000000; - PORTF |= 0b00000011; - PORTC |= 0b10000000; - break; } } diff --git a/keyboards/duck/eagle_viper/v2/readme.md b/keyboards/duck/eagle_viper/v2/readme.md index 31f70b93b..2dca0b5b7 100644 --- a/keyboards/duck/eagle_viper/v2/readme.md +++ b/keyboards/duck/eagle_viper/v2/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): **Reset Key:** To put the Eagle/Viper V2 into reset, hold caps lock key (`K2A`) while plugging in. -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). ## Hardware Notes |