diff options
author | Alex Ong <the.onga@gmail.com> | 2019-01-04 19:39:14 +1100 |
---|---|---|
committer | Alex Ong <the.onga@gmail.com> | 2019-01-04 19:39:14 +1100 |
commit | 47c91fc7f75ae0a477e55b687aa0fc30da0a283c (patch) | |
tree | 65ad39452748ff2e6d4a83ce54ede6ca22c9ada9 /keyboards/hadron | |
parent | ac9b88e8ccbbf38762871504cd827ff0d941c426 (diff) | |
parent | 563ce3f225d981ce460c12ca5130dfe47af41df0 (diff) |
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'keyboards/hadron')
39 files changed, 3913 insertions, 287 deletions
diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h index 0c19d6c791..d54d2c5437 100644 --- a/keyboards/hadron/config.h +++ b/keyboards/hadron/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -25,12 +24,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT_ID 0x6060 #define MANUFACTURER ishtob #define PRODUCT Hadron Keyboard -#define DESCRIPTION A cherry ML ortholinear keyboard +#define DESCRIPTION A low profile ortholinear keyboard -//#define AUDIO_VOICES +//#define AUDIO_VOICES //#define BACKLIGHT_PIN B7 @@ -47,9 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +//#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +//#define LOCKING_RESYNC_ENABLE /* key combination for command */ #define IS_COMMAND() ( \ @@ -73,11 +72,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#ifdef SUBPROJECT_ver0 - #include "ver0/config.h" -#endif -#ifdef SUBPROJECT_ver2 - #include "ver2/config.h" -#endif - -#endif + + diff --git a/keyboards/hadron/hadron.c b/keyboards/hadron/hadron.c index ca5b20e894..fa5065b327 100644 --- a/keyboards/hadron/hadron.c +++ b/keyboards/hadron/hadron.c @@ -1,26 +1,2 @@ #include "hadron.h" - -void matrix_init_kb(void) { - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -}
\ No newline at end of file diff --git a/keyboards/hadron/hadron.h b/keyboards/hadron/hadron.h index a165f4c5c9..426face6f4 100644 --- a/keyboards/hadron/hadron.h +++ b/keyboards/hadron/hadron.h @@ -7,7 +7,9 @@ #ifdef SUBPROJECT_ver2 #include "ver2.h" #endif - +#ifdef SUBPROJECT_ver3 + #include "ver3.h" +#endif #include "quantum.h" diff --git a/keyboards/hadron/keymaps/default/config.h b/keyboards/hadron/keymaps/default/config.h deleted file mode 100644 index 0f349ad932..0000000000 --- a/keyboards/hadron/keymaps/default/config.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#define LEADER_TIMEOUT 300 -//#define BACKLIGHT_BREATHING -#define PREVENT_STUCK_MODIFIERS - -#define USE_I2C -#define SSD1306OLED -#define OLED_ROTATE180 - -/* ws2812 RGB LED*/ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#endif diff --git a/keyboards/hadron/keymaps/default/rules.mk b/keyboards/hadron/keymaps/default/rules.mk deleted file mode 100644 index 1f3975255a..0000000000 --- a/keyboards/hadron/keymaps/default/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ - - -# 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 = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# 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
\ No newline at end of file diff --git a/keyboards/hadron/keymaps/side_numpad/config.h b/keyboards/hadron/keymaps/side_numpad/config.h deleted file mode 100644 index 0f349ad932..0000000000 --- a/keyboards/hadron/keymaps/side_numpad/config.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#define LEADER_TIMEOUT 300 -//#define BACKLIGHT_BREATHING -#define PREVENT_STUCK_MODIFIERS - -#define USE_I2C -#define SSD1306OLED -#define OLED_ROTATE180 - -/* ws2812 RGB LED*/ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#endif diff --git a/keyboards/hadron/readme.md b/keyboards/hadron/readme.md index ebebab9e69..13ef6c66ab 100644 --- a/keyboards/hadron/readme.md +++ b/keyboards/hadron/readme.md @@ -2,10 +2,10 @@ ![Hadron](https://i.imgur.com/aFbvV08.jpg) -A low-profile Cherry ML ortholinear build. +A low-profile ortholinear build. Keyboard Maintainer: [ishtob](https://github.com/ishtob), [QMK](https://github.com/qmk) -Hardware Supported: Hadron PCB rev0, rev2 +Hardware Supported: Hadron PCB rev0, rev2, rev3 Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/hadron/rules.mk b/keyboards/hadron/rules.mk index 66a900825a..bd1633f619 100644 --- a/keyboards/hadron/rules.mk +++ b/keyboards/hadron/rules.mk @@ -1,73 +1,2 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - -# 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 ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -NKRO_ENABLE ?= no # 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. -API_SYSEX_ENABLE = 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 - -SRC = i2c.c \ - ssd1306.c - -DEFAULT_FOLDER = hadron/ver2
\ No newline at end of file +DEFAULT_FOLDER = hadron/ver2 diff --git a/keyboards/hadron/ver0/config.h b/keyboards/hadron/ver0/config.h index 039d4f1c71..2157a52cee 100644 --- a/keyboards/hadron/ver0/config.h +++ b/keyboards/hadron/ver0/config.h @@ -14,10 +14,7 @@ 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 VER0_CONFIG_H -#define VER0_CONFIG_H - -#include "../config.h" +#pragma once /* USB Device descriptor parameter */ #define DEVICE_VER 0x0001 @@ -32,4 +29,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define UNUSED_PINS -#endif + diff --git a/keyboards/hadron/ver2/config.h b/keyboards/hadron/ver2/config.h index 71a0ab5b3f..e051db209c 100644 --- a/keyboards/hadron/ver2/config.h +++ b/keyboards/hadron/ver2/config.h @@ -14,10 +14,7 @@ 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 VER2_CONFIG_H -#define VER2_CONFIG_H - -#include "../config.h" +#pragma once /* USB Device descriptor parameter */ #define DEVICE_VER 0x0002 @@ -32,4 +29,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define UNUSED_PINS -#endif +#define USE_I2C +#define SSD1306OLED +#define OLED_ROTATE180 + +/* ws2812 RGB LED*/ +#define RGB_DI_PIN D4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + + diff --git a/keyboards/hadron/ver2/keymaps/default/config.h b/keyboards/hadron/ver2/keymaps/default/config.h new file mode 100644 index 0000000000..e1fdd6dd3e --- /dev/null +++ b/keyboards/hadron/ver2/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND) \ + } + +#define LEADER_TIMEOUT 300 +//#define BACKLIGHT_BREATHING + diff --git a/keyboards/hadron/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index de5979c1d2..cc79f52671 100644 --- a/keyboards/hadron/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif @@ -215,29 +214,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - // define variables for reactive RGB bool RGB_INIT = false; bool TOG_STATUS = false; int RGB_current_mode; - - -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { rgblight_mode(RGB_current_mode); @@ -251,19 +232,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; @@ -337,53 +312,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{cc - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif /* * Macro definition @@ -404,6 +333,32 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; } + +//Functions for ver2 +#ifdef KEYBOARD_hadron_ver2 +#include "LUFA/Drivers/Peripheral/TWI.h" +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif +} + void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { if (memcmp(dest->display, source->display, sizeof(dest->display))) { @@ -411,7 +366,6 @@ void matrix_update(struct CharacterMatrix *dest, dest->dirty = true; } } - //assign the right code to your layers for OLED display #define L_BASE 0 #define L_LOWER 8 @@ -491,3 +445,4 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } +#endif
\ No newline at end of file diff --git a/keyboards/hadron/keymaps/default/readme.md b/keyboards/hadron/ver2/keymaps/default/readme.md index de9680b498..de9680b498 100644 --- a/keyboards/hadron/keymaps/default/readme.md +++ b/keyboards/hadron/ver2/keymaps/default/readme.md diff --git a/keyboards/hadron/keymaps/readme.md b/keyboards/hadron/ver2/keymaps/readme.md index 54fb5f6d9e..54fb5f6d9e 100644 --- a/keyboards/hadron/keymaps/readme.md +++ b/keyboards/hadron/ver2/keymaps/readme.md diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/config.h b/keyboards/hadron/ver2/keymaps/side_numpad/config.h new file mode 100644 index 0000000000..409279a95f --- /dev/null +++ b/keyboards/hadron/ver2/keymaps/side_numpad/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND)\ + } + +#define LEADER_TIMEOUT 300 +//#define BACKLIGHT_BREATHING + diff --git a/keyboards/hadron/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c index fa42c79ea0..248bb7ca66 100644 --- a/keyboards/hadron/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c @@ -218,15 +218,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - // define variables for reactive RGB bool RGB_INIT = false; bool TOG_STATUS = false; @@ -234,12 +225,6 @@ bool NUMLAY_STATUS = false; int RGB_current_mode; - -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { rgblight_mode(RGB_current_mode); @@ -253,10 +238,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; diff --git a/keyboards/hadron/keymaps/side_numpad/readme.md b/keyboards/hadron/ver2/keymaps/side_numpad/readme.md index de9680b498..de9680b498 100644 --- a/keyboards/hadron/keymaps/side_numpad/readme.md +++ b/keyboards/hadron/ver2/keymaps/side_numpad/readme.md diff --git a/keyboards/hadron/keymaps/side_numpad/rules.mk b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk index d9fabc1acc..687c285bdb 100644 --- a/keyboards/hadron/keymaps/side_numpad/rules.mk +++ b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk @@ -15,7 +15,7 @@ MIDI_ENABLE = yes # 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index a3952a5d33..c47bdb1af9 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -1 +1,76 @@ -#AUDIO_ENABLE ?= yes # Audio output on port C6
\ No newline at end of file +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = halfkay + +# 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 = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = yes # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = yes +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + +EXTRAFLAGS += -flto + + +SRC = i2c.c \ + ssd1306.c
\ No newline at end of file diff --git a/keyboards/hadron/ver2/ver2.c b/keyboards/hadron/ver2/ver2.c index bc0917746a..739f06567a 100644 --- a/keyboards/had |