mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 05:12:33 +01:00 
			
		
		
		
	initial files
This commit is contained in:
		
							parent
							
								
									e76bf17d36
								
							
						
					
					
						commit
						50fa02ad58
					
				
							
								
								
									
										0
									
								
								keyboards/clockworkpi_keypad/clockworkpi_keypad.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								keyboards/clockworkpi_keypad/clockworkpi_keypad.c
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										15
									
								
								keyboards/clockworkpi_keypad/clockworkpi_keypad.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								keyboards/clockworkpi_keypad/clockworkpi_keypad.h
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| 
 | ||||
| 
 | ||||
| #define k_ KC_NO | ||||
| 
 | ||||
| #define LAYOUT_keymap( \ | ||||
|     kMN, kSH,    kSL, kST, \ | ||||
|        kUP,        KY, \ | ||||
|     kLF, kRH,    kX, kB, \ | ||||
|        kDN,        kA, \ | ||||
|   kL1, kL2, kL3, kL4, kL5 \ | ||||
| ) { \ | ||||
|   { kUP, kLF, kDN, kRH, kY,  kX, kA, kB }, \ | ||||
|   { kMN, kSH, kSL, kST, k_,  k_, k_, k_ }, \ | ||||
|   { kL1, kL2, kL3, kL4, kL5, k_, k_, k_ }, \ | ||||
| } | ||||
							
								
								
									
										38
									
								
								keyboards/clockworkpi_keypad/config.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								keyboards/clockworkpi_keypad/config.h
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,38 @@ | ||||
| /*
 | ||||
| Copyright 2019 Jack Humbert <jack.humb@gmail.com> | ||||
| 
 | ||||
| This program is free software: you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | ||||
| the Free Software Foundation, either version 2 of the License, or | ||||
| (at your option) any later version. | ||||
| 
 | ||||
| This program is distributed in the hope that it will be useful, | ||||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
| GNU General Public License for more details. | ||||
| 
 | ||||
| You should have received a copy of the GNU General Public License | ||||
| along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
| */ | ||||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| /* USB Device descriptor parameter */ | ||||
| #define VENDOR_ID       0xFEED | ||||
| #define PRODUCT_ID      0xD901 | ||||
| #define DEVICE_VER      0x0001 | ||||
| #define MANUFACTURER    clockworkpi | ||||
| #define PRODUCT         keypad | ||||
| #define DESCRIPTION | ||||
| 
 | ||||
| #define MATRIX_ROWS 3 | ||||
| #define MATRIX_COLS 8 | ||||
| 
 | ||||
| #define TAPPING_TOGGLE 3 | ||||
| 
 | ||||
| #define NO_UART 1 | ||||
| 
 | ||||
| /* key combination for command */ | ||||
| #define IS_COMMAND() ( \ | ||||
|     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||||
| ) | ||||
							
								
								
									
										20
									
								
								keyboards/clockworkpi_keypad/keymaps/default/keymap.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								keyboards/clockworkpi_keypad/keymaps/default/keymap.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | ||||
| 
 | ||||
| [0] = LAYOUT_keypad( | ||||
|   KC_ESC,  MO(1),       KC_SPC, KC_ENT, | ||||
| 
 | ||||
|        KC_UP                 KC_I, | ||||
|   KC_LEFT, KC_RIGHT,    KC_U,    KC_K, | ||||
|        KC_DOWN,              KC_J, | ||||
| 
 | ||||
|   KC_HOME, KC_PGUP, MO(1), KC_PGDN, KC_END | ||||
| ), | ||||
| 
 | ||||
| [1] = LAYOUT_keypad( | ||||
|   KC_BSPC, MO(1),       KC_PMNS, KC_PPLS, | ||||
| 
 | ||||
|        KC_UP                 KC_O, | ||||
|   KC_LEFT, KC_RIGHT,    KC_Y,    KC_L, | ||||
|        KC_DOWN,              KC_H | ||||
| 
 | ||||
|   KC_H,    KC_Y,    MO(1), KC_O,    KC_L | ||||
| ) | ||||
							
								
								
									
										65
									
								
								keyboards/clockworkpi_keypad/matrix.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								keyboards/clockworkpi_keypad/matrix.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,65 @@ | ||||
| // 0 DO
 | ||||
| // 1 D1
 | ||||
| // 2 D2
 | ||||
| // 3 D3
 | ||||
| // 4 D4
 | ||||
| // 5 D5
 | ||||
| // 6 D6
 | ||||
| // 7 D7
 | ||||
| // 8 B0
 | ||||
| // 9 B1
 | ||||
| // 10 B2
 | ||||
| // 11 B3
 | ||||
| // 12 B4
 | ||||
| // 13 B5
 | ||||
| // 14 C0
 | ||||
| // 15 C1
 | ||||
| // 16 C2
 | ||||
| // 17 C3
 | ||||
| // 18 C4
 | ||||
| // 19 C5
 | ||||
| 
 | ||||
| // UP D3
 | ||||
| // LF D6
 | ||||
| // DN D7
 | ||||
| // RH B0
 | ||||
| 
 | ||||
| // A  B1 Y
 | ||||
| // B  B2 X
 | ||||
| // C  B3 A
 | ||||
| // D  B4 B
 | ||||
| 
 | ||||
| // MN C0
 | ||||
| // SH C1
 | ||||
| // SL C2
 | ||||
| // ST B5
 | ||||
| 
 | ||||
| // L1 C3
 | ||||
| // L2 C4
 | ||||
| // L3 C5
 | ||||
| // L4 C6
 | ||||
| // L5 D7
 | ||||
| 
 | ||||
| matrix[0] = ( | ||||
|   (readPin(D3) << 0) | | ||||
|   (readPin(D6) << 1) | | ||||
|   (readPin(D7) << 2) | | ||||
|   (readPin(B0) << 3) | | ||||
|   (readPin(B1) << 4) | | ||||
|   (readPin(B2) << 5) | | ||||
|   (readPin(B3) << 6) | | ||||
|   (readPin(B4) << 7) | ||||
|   ); | ||||
| matrix[1] = ( | ||||
|   (readPin(C0) << 0) | | ||||
|   (readPin(C1) << 1) | | ||||
|   (readPin(C2) << 2) | | ||||
|   (readPin(B5) << 3) | ||||
|   ); | ||||
| matrix[2] = ( | ||||
|   (readPin(C3) << 0) | | ||||
|   (readPin(C4) << 1) | | ||||
|   (readPin(C5) << 2) | | ||||
|   (readPin(C6) << 3) | | ||||
|   (readPin(D7) << 4) | ||||
|   ); | ||||
							
								
								
									
										52
									
								
								keyboards/clockworkpi_keypad/rules.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								keyboards/clockworkpi_keypad/rules.mk
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,52 @@ | ||||
| # Copyright 2019 Jack Humbert <jack.humb@gmail.com>
 | ||||
| #
 | ||||
| # This program is free software: you can redistribute it and/or modify
 | ||||
| # it under the terms of the GNU General Public License as published by
 | ||||
| # the Free Software Foundation, either version 2 of the License, or
 | ||||
| # (at your option) any later version.
 | ||||
| #
 | ||||
| # This program is distributed in the hope that it will be useful,
 | ||||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | ||||
| # GNU General Public License for more details.
 | ||||
| #
 | ||||
| # You should have received a copy of the GNU General Public License
 | ||||
| # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
| 
 | ||||
| # MCU name
 | ||||
| MCU = atmega328p | ||||
| PROTOCOL = VUSB | ||||
| 
 | ||||
| # unsupported features for now
 | ||||
| NO_UART = yes | ||||
| NO_SUSPEND_POWER_DOWN = yes | ||||
| 
 | ||||
| # processor frequency
 | ||||
| F_CPU = 16000000 | ||||
| 
 | ||||
| # Bootloader
 | ||||
| #     This definition is optional, and if your keyboard supports multiple bootloaders of
 | ||||
| #     different sizes, comment this out, and the correct address will be loaded
 | ||||
| #     automatically (+60). See bootloader.mk for all options.
 | ||||
| # BOOTLOADER = usbasp
 | ||||
| PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex | ||||
| 
 | ||||
| # build options
 | ||||
| BOOTMAGIC_ENABLE = no | ||||
| MOUSEKEY_ENABLE = yes | ||||
| EXTRAKEY_ENABLE = yes | ||||
| CONSOLE_ENABLE = no | ||||
| COMMAND_ENABLE = yes | ||||
| KEY_LOCK_ENABLE = no | ||||
| NKRO_ENABLE = no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||||
| AUDIO_ENABLE = no | ||||
| 
 | ||||
| # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 | ||||
| SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend | ||||
| 
 | ||||
| OPT_DEFS = -DDEBUG_LEVEL=0 | ||||
| OPT_DEFS += -DBOOTLOADER_SIZE=2048 | ||||
| 
 | ||||
| # custom matrix setup
 | ||||
| CUSTOM_MATRIX = yes | ||||
| SRC = matrix.c | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jack Humbert
						Jack Humbert