Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jackhumbert/qmk_firmware into wu5y7
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Nov 29, 2016
2 parents 7edac21 + 1585fc4 commit 6e0f994
Show file tree
Hide file tree
Showing 22 changed files with 1,415 additions and 56 deletions.
1 change: 1 addition & 0 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ endif
VPATH += $(KEYBOARD_PATH)
VPATH += $(COMMON_VPATH)

include $(TMK_PATH)/protocol.mk

include $(TMK_PATH)/common.mk
SRC += $(TMK_COMMON_SRC)
Expand Down
3 changes: 3 additions & 0 deletions keyboards/handwired/promethium/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../../Makefile
endif
162 changes: 162 additions & 0 deletions keyboards/handwired/promethium/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
/*
Copyright 2012 Jun Wako <wakojun@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/>.
*/

#ifndef CONFIG_H
#define CONFIG_H

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6660
#define DEVICE_VER 0x0001
#define MANUFACTURER Priyadi
#define PRODUCT Promethium Keyboard
#define DESCRIPTION Promethium Keyboard

/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 6

/* default pin-out */
#define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 }
#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 }
#define UNUSED_PINS

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

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

/* number of backlight levels */
#define BACKLIGHT_LEVELS 3

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

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \
)

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

/* PS/2 mouse */
#ifdef PS2_USE_BUSYWAIT
# define PS2_CLOCK_PORT PORTD
# define PS2_CLOCK_PIN PIND
# define PS2_CLOCK_DDR DDRD
# define PS2_CLOCK_BIT 1
# define PS2_DATA_PORT PORTD
# define PS2_DATA_PIN PIND
# define PS2_DATA_DDR DDRD
# define PS2_DATA_BIT 2
#endif

/* PS/2 mouse interrupt version */
#ifdef PS2_USE_INT
/* uses INT1 for clock line(ATMega32U4) */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 3
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 2

#define PS2_INT_INIT() do { \
EICRA |= ((1<<ISC31) | \
(0<<ISC30)); \
} while (0)
#define PS2_INT_ON() do { \
EIMSK |= (1<<INT3); \
} while (0)
#define PS2_INT_OFF() do { \
EIMSK &= ~(1<<INT3); \
} while (0)
#define PS2_INT_VECT INT3_vect
#endif

/* PS/2 mouse USART version */
#ifdef PS2_USE_USART
/* XCK for clock line and RXD for data line */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 5
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 2

/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
#define PS2_USART_INIT() do { \
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
UCSR1C = ((1 << UMSEL10) | \
(3 << UPM10) | \
(0 << USBS1) | \
(3 << UCSZ10) | \
(0 << UCPOL1)); \
UCSR1A = 0; \
UBRR1H = 0; \
UBRR1L = 0; \
} while (0)
#define PS2_USART_RX_INT_ON() do { \
UCSR1B = ((1 << RXCIE1) | \
(1 << RXEN1)); \
} while (0)
#define PS2_USART_RX_POLL_ON() do { \
UCSR1B = (1 << RXEN1); \
} while (0)
#define PS2_USART_OFF() do { \
UCSR1C = 0; \
UCSR1B &= ~((1 << RXEN1) | \
(1 << TXEN1)); \
} while (0)
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
#define PS2_USART_RX_DATA UDR1
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
#define PS2_USART_RX_VECT USART1_RX_vect
#endif


#endif
28 changes: 28 additions & 0 deletions keyboards/handwired/promethium/keymaps/priyadi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@


# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes

# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

ifndef QUANTUM_DIR
include ../../../../../Makefile
endif

17 changes: 17 additions & 0 deletions keyboards/handwired/promethium/keymaps/priyadi/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H

#include "../../config.h"

/* bootmagic salt key */
#define BOOTMAGIC_KEY_SALT KC_ESC

/* skip bootmagic and eeconfig */
#define BOOTMAGIC_KEY_SKIP KC_SPACE

#define PREVENT_STUCK_MODIFIERS

#define RGB_DI_PIN B5
#define RGBSPS_NUM 57

#endif
3 changes: 3 additions & 0 deletions keyboards/handwired/promethium/keymaps/priyadi/flash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex
Loading

0 comments on commit 6e0f994

Please sign in to comment.