summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/hadron/config.h10
-rw-r--r--keyboards/hadron/hadron.c24
-rw-r--r--keyboards/hadron/hadron.h4
-rw-r--r--keyboards/hadron/keymaps/default/config.h20
-rw-r--r--keyboards/hadron/keymaps/default/rules.mk24
-rw-r--r--keyboards/hadron/keymaps/side_numpad/config.h20
-rw-r--r--keyboards/hadron/readme.md4
-rw-r--r--keyboards/hadron/rules.mk73
-rw-r--r--keyboards/hadron/ver2/config.h11
-rw-r--r--keyboards/hadron/ver2/keymaps/default/config.h9
-rw-r--r--keyboards/hadron/ver2/keymaps/default/keymap.c (renamed from keyboards/hadron/keymaps/default/keymap.c)103
-rw-r--r--keyboards/hadron/ver2/keymaps/default/readme.md (renamed from keyboards/hadron/keymaps/default/readme.md)0
-rw-r--r--keyboards/hadron/ver2/keymaps/readme.md (renamed from keyboards/hadron/keymaps/readme.md)0
-rw-r--r--keyboards/hadron/ver2/keymaps/side_numpad/config.h8
-rw-r--r--keyboards/hadron/ver2/keymaps/side_numpad/keymap.c (renamed from keyboards/hadron/keymaps/side_numpad/keymap.c)20
-rw-r--r--keyboards/hadron/ver2/keymaps/side_numpad/readme.md (renamed from keyboards/hadron/keymaps/side_numpad/readme.md)0
-rw-r--r--keyboards/hadron/ver2/keymaps/side_numpad/rules.mk (renamed from keyboards/hadron/keymaps/side_numpad/rules.mk)0
-rw-r--r--keyboards/hadron/ver2/rules.mk77
-rw-r--r--keyboards/hadron/ver2/ver2.c27
-rw-r--r--keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c126
-rw-r--r--keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.h1187
-rw-r--r--keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.mk5
-rw-r--r--keyboards/hadron/ver3/bootloader_defs.h7
-rw-r--r--keyboards/hadron/ver3/chconf.h520
-rw-r--r--keyboards/hadron/ver3/config.h192
-rw-r--r--keyboards/hadron/ver3/halconf.h388
-rw-r--r--keyboards/hadron/ver3/keymaps/default/config.h1
-rw-r--r--keyboards/hadron/ver3/keymaps/default/keymap.c295
-rw-r--r--keyboards/hadron/ver3/keymaps/default/readme.md2
-rw-r--r--keyboards/hadron/ver3/keymaps/readme.md23
-rw-r--r--keyboards/hadron/ver3/matrix.c195
-rw-r--r--keyboards/hadron/ver3/mcuconf.h257
-rw-r--r--keyboards/hadron/ver3/rev3.h21
-rw-r--r--keyboards/hadron/ver3/rules.mk57
-rw-r--r--keyboards/hadron/ver3/ver3.c196
-rw-r--r--keyboards/hadron/ver3/ver3.h21
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/rules.mk25
37 files changed, 3663 insertions, 289 deletions
diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h
index 9111ad7279..d54d2c5437 100644
--- a/keyboards/hadron/config.h
+++ b/keyboards/hadron/config.h
@@ -24,7 +24,7 @@ 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
@@ -46,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() ( \
@@ -70,7 +70,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-#define NO_ACTION_MACRO
-#define NO_ACTION_FUNCTION
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
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 09922b61bc..0000000000
--- a/keyboards/hadron/keymaps/default/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-#define LEADER_TIMEOUT 300
-//#define BACKLIGHT_BREATHING
-
-#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 4c6d04f1e5..0000000000
--- a/keyboards/hadron/keymaps/default/rules.mk
+++ /dev/null
@@ -1,24 +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 = no # 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.
-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
diff --git a/keyboards/hadron/keymaps/side_numpad/config.h b/keyboards/hadron/keymaps/side_numpad/config.h
deleted file mode 100644
index 09922b61bc..0000000000
--- a/keyboards/hadron/keymaps/side_numpad/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-#define LEADER_TIMEOUT 300
-//#define BACKLIGHT_BREATHING
-
-#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 2a8b780450..bd1633f619 100644
--- a/keyboards/hadron/rules.mk
+++ b/keyboards/hadron/rules.mk
@@ -1,75 +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
-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 = 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
-
-EXTRAFLAGS += -flto
diff --git a/keyboards/hadron/ver2/config.h b/keyboards/hadron/ver2/config.h
index 5ee3f931ff..e051db209c 100644
--- a/keyboards/hadron/ver2/config.h
+++ b/keyboards/hadron/ver2/config.h
@@ -29,4 +29,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS
+#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 687c285bdb..687c285bdb 100644
--- a/keyboards/hadron/keymaps/side_numpad/rules.mk
+++ b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk
diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk
index 521493b3d3..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
+# 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/hadron/ver2/ver2.c
+++ b/keyboards/hadron/ver2/ver2.c
@@ -1 +1,26 @@
-#include "ver2.h" \ No newline at end of file
+#include "ver2.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/ver3/boards/GENERIC_STM32_F303XC/board.c b/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c
new file mode 100644
index 0000000000..4331155df4
--- /dev/null
+++ b/keyboards/hadron/ver3/boards/GENERIC_STM32_F303XC/board.c
@@ -0,0 +1,126 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+#if STM32_HAS_GPIOA
+ {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
+ VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
+#endif
+#if STM32_HAS_GPIOB
+ {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
+ VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
+#endif
+#if STM32_HAS_GPIOC
+ {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
+ VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
+#endif
+#if STM32_HAS_GPIOD
+ {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
+ VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
+#endif
+#if STM32_HAS_GPIOE
+ {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
+ VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
+#endif
+#if STM32_HAS_GPIOF
+ {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
+ VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
+#endif
+#if STM32_HAS_GPIOG
+ {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
+ VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
+#endif
+#if STM32_HAS_GPIOH
+ {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
+ VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
+#endif
+#if STM32_HAS_GPIOI
+ {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
+#endif
+};
+#endif
+
+void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ stm32_clock_init();
+}
+
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+