summaryrefslogtreecommitdiffstats
path: root/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/atomic/Makefile4
-rw-r--r--keyboard/atomic/atomic.c295
-rw-r--r--keyboard/atomic/atomic.h21
-rw-r--r--keyboard/atomic/backlight.c63
-rw-r--r--keyboard/atomic/keymaps/pvc/config.h6
-rw-r--r--keyboard/atomic/keymaps/pvc/keymap.c352
-rw-r--r--keyboard/atomic/keymaps/pvc/makefile.mk2
-rw-r--r--keyboard/atreus/config.h2
-rw-r--r--keyboard/clueboard1/Makefile137
-rw-r--r--keyboard/clueboard1/clueboard1.c23
-rw-r--r--keyboard/clueboard1/clueboard1.h52
-rw-r--r--keyboard/clueboard1/config.h96
-rw-r--r--keyboard/clueboard1/keymaps/keymap_default.c184
-rw-r--r--keyboard/clueboard1/led.c32
-rw-r--r--keyboard/clueboard2/Makefile141
-rw-r--r--keyboard/clueboard2/backlight.c41
-rw-r--r--keyboard/clueboard2/clueboard2.c44
-rw-r--r--keyboard/clueboard2/clueboard2.h57
-rw-r--r--keyboard/clueboard2/config.h100
-rw-r--r--keyboard/clueboard2/keymaps/keymap_default.c183
-rw-r--r--keyboard/clueboard2/keymaps/keymap_max.c147
-rw-r--r--keyboard/clueboard2/keymaps/keymap_skully.c108
-rw-r--r--keyboard/clueboard2/led.c36
-rw-r--r--keyboard/cluepad/Makefile136
-rw-r--r--keyboard/cluepad/backlight.c54
-rw-r--r--keyboard/cluepad/cluepad.c39
-rw-r--r--keyboard/cluepad/cluepad.h41
-rw-r--r--keyboard/cluepad/config.h102
-rw-r--r--keyboard/cluepad/keymaps/keymap_default.c122
-rw-r--r--keyboard/ergodox_ez/Makefile16
-rw-r--r--keyboard/ergodox_ez/keymaps/ab/ab.hex1146
-rw-r--r--keyboard/ergodox_ez/keymaps/ab/keyboard-layout.json385
-rw-r--r--keyboard/ergodox_ez/keymaps/ab/keyboard-layout.pngbin0 -> 79440 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/ab/keymap.c140
-rw-r--r--keyboard/ergodox_ez/keymaps/ab/readme.md21
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/config_user.h8
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/erez_experimental.hex2275
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c112
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/makefile.mk5
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/readme.md17
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/keymap.c706
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-base.pngbin99031 -> 99605 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-base.txt4
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.pngbin121014 -> 124144 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.txt20
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-special.pngbin0 -> 63065 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-special.txt27
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.pngbin103401 -> 103735 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.txt8
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex2380
-rw-r--r--keyboard/ergodox_ez/keymaps/ordinary/readme.md37
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/keymap.c45
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/readme.md28
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/romanzolotarev-norman-osx.hex1092
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/romanzolotarev-norman-osx.pngbin0 -> 96954 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/keymap.c73
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/readme.md34
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/romanzolotarev-norman-qwerty-osx.hex1139
-rw-r--r--keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/romanzolotarev-norman-qwerty-osx.pngbin0 -> 100627 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/sneako/README.md6
-rw-r--r--keyboard/ergodox_ez/keymaps/sneako/keymap.c187
-rw-r--r--keyboard/ergodox_ez/keymaps/sneako/sneako.hex1152
-rw-r--r--keyboard/ergodox_ez/keymaps/techtomas/keymap.c231
-rw-r--r--keyboard/ergodox_ez/keymaps/techtomas/readme.md36
-rw-r--r--keyboard/ergodox_ez/keymaps/techtomas/techtomas.hex1166
-rw-r--r--keyboard/ergodox_ez/keymaps/twey/keymap.c108
-rw-r--r--keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c187
-rw-r--r--keyboard/ergodox_ez/keymaps/zweihander-osx/readme.markdown45
-rw-r--r--keyboard/ergodox_ez/keymaps/zweihander-osx/zweihander-osx.hex1152
-rw-r--r--keyboard/ergodox_ez/readme.md2
-rw-r--r--keyboard/gh60_rev_c/Makefile140
-rw-r--r--keyboard/gh60_rev_c/README.md60
-rw-r--r--keyboard/gh60_rev_c/config.h157
-rw-r--r--keyboard/gh60_rev_c/gh60.c67
-rw-r--r--keyboard/gh60_rev_c/gh60.h81
-rw-r--r--keyboard/gh60_rev_c/gh60revc.jpgbin0 -> 1424987 bytes
-rw-r--r--keyboard/gh60_rev_c/keymaps/default.c69
-rw-r--r--keyboard/gh60_rev_c/pinout.txt18
-rw-r--r--keyboard/planck/Makefile4
-rw-r--r--keyboard/planck/backlight.c61
-rw-r--r--keyboard/planck/keymaps/default/keymap.c15
-rw-r--r--keyboard/planck/keymaps/experimental/README.md2
-rw-r--r--keyboard/planck/keymaps/experimental/keymap.c383
-rw-r--r--keyboard/planck/keymaps/experimental/makefile.mk2
-rw-r--r--keyboard/planck/keymaps/pvc/config.h88
-rw-r--r--keyboard/planck/keymaps/pvc/keymap.c547
-rw-r--r--keyboard/planck/keymaps/pvc/makefile.mk17
-rw-r--r--keyboard/planck/keymaps/pvc_planck.c179
-rw-r--r--keyboard/planck/planck.c270
-rw-r--r--keyboard/planck/planck.h19
-rw-r--r--keyboard/planck/planck_pcb_r4.hex3159
-rw-r--r--keyboard/planck/planck_pcb_r4_w_bootloader.hex3159
-rw-r--r--keyboard/preonic/Makefile5
-rw-r--r--keyboard/preonic/backlight.c61
-rw-r--r--keyboard/preonic/keymaps/default/keymap.c2
-rw-r--r--keyboard/preonic/preonic.c63
-rw-r--r--keyboard/preonic/preonic.h1
-rw-r--r--keyboard/preonic/preonic_pcb_r1.hex3328
-rw-r--r--keyboard/preonic/preonic_pcb_r1_w_bootloader.hex3071
99 files changed, 21945 insertions, 9693 deletions
diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile
index 1d91c34b7f..c1a0a6db42 100644
--- a/keyboard/atomic/Makefile
+++ b/keyboard/atomic/Makefile
@@ -171,10 +171,6 @@ endif
endif
-ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
- SRC := backlight.c $(SRC)
-endif
-
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
diff --git a/keyboard/atomic/atomic.c b/keyboard/atomic/atomic.c
index 5e31264e68..b4b2614572 100644
--- a/keyboard/atomic/atomic.c
+++ b/keyboard/atomic/atomic.c
@@ -2,27 +2,27 @@
__attribute__ ((weak))
void matrix_init_user(void) {
- // leave this function blank - it can be defined in a keymap file
+ // leave this function blank - it can be defined in a keymap file
};
__attribute__ ((weak))
void matrix_scan_user(void) {
- // leave this function blank - it can be defined in a keymap file
+ // leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak))
void process_action_user(keyrecord_t *record) {
- // leave this function blank - it can be defined in a keymap file
+ // leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {
- // leave this function blank - it can be defined in a keymap file
+ // leave this function blank - it can be defined in a keymap file
}
void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
@@ -35,25 +35,290 @@ void matrix_init_kb(void) {
DDRE |= (1<<6);
PORTE |= (1<<6);
- matrix_init_user();
+ matrix_init_user();
}
void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
- matrix_scan_user();
+ matrix_scan_user();
}
void process_action_kb(keyrecord_t *record) {
- // put your per-action keyboard code here
- // runs for every action, just before processing by the firmware
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
- process_action_user(record);
+ process_action_user(record);
}
void led_set_kb(uint8_t usb_led) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- led_set_user(usb_led);
+ led_set_user(usb_led);
}
+
+#ifdef BACKLIGHT_ENABLE
+#define CHANNEL OCR1C
+#define BREATHING_NO_HALT 0
+#define BREATHING_HALT_OFF 1
+#define BREATHING_HALT_ON 2
+
+static uint8_t breath_intensity;
+static uint8_t breath_speed;
+static uint16_t breathing_index;
+static uint8_t breathing_halt;
+
+void backlight_init_ports()
+{
+
+ // Setup PB7 as output and output low.
+ DDRB |= (1<<7);
+ PORTB &= ~(1<<7);
+
+ // Use full 16-bit resolution.
+ ICR1 = 0xFFFF;
+
+ // I could write a wall of text here to explain... but TL;DW
+ // Go read the ATmega32u4 datasheet.
+ // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
+
+ // Pin PB7 = OCR1C (Timer 1, Channel C)
+ // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
+ // (i.e. start high, go low when counter matches.)
+ // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
+ // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
+
+ TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
+ TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
+
+ backlight_init();
+ breathing_defaults();
+}
+
+void backlight_set(uint8_t level)
+{
+ // Prevent backlight blink on lowest level
+ PORTB &= ~(_BV(PORTB7));
+
+ if ( level == 0 )
+ {
+ // Turn off PWM control on PB7, revert to output low.
+ TCCR1A &= ~(_BV(COM1C1));
+
+ // Set the brightness to 0
+ CHANNEL = 0x0;
+ }
+ else if ( level >= BACKLIGHT_LEVELS )
+ {
+ // Turn on PWM control of PB7
+ TCCR1A |= _BV(COM1C1);
+
+ // Set the brightness to max
+ CHANNEL = 0xFFFF;
+ }
+ else
+ {
+ // Turn on PWM control of PB7
+ TCCR1A |= _BV(COM1C1);
+
+ // Set the brightness
+ CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
+ }
+ breathing_intensity_default();
+}
+
+
+void breathing_enable(void)
+{
+ if (get_backlight_level() == 0)
+ {
+ breathing_index = 0;
+ }
+ else
+ {
+ // Set breathing_index to be at the midpoint (brightest point)
+ breathing_index = 0x20 << breath_speed;
+ }
+
+ breathing_halt = BREATHING_NO_HALT;
+
+ // Enable breathing interrupt
+ TIMSK1 |= _BV(OCIE1A);
+}
+
+void breathing_pulse(void)
+{
+ if (get_backlight_level() == 0)
+ {
+ breathing_index = 0;
+ }
+ else
+ {
+ // Set breathing_index to be at the midpoint + 1 (brightest point)
+ breathing_index = 0x21 << breath_speed;
+ }
+
+ breathing_halt = BREATHING_HALT_ON;
+
+ // Enable breathing interrupt
+ TIMSK1 |= _BV(OCIE1A);
+}
+
+void breathing_disable(void)
+{
+ // Disable breathing interrupt
+ TIMSK1 &= ~_BV(OCIE1A);
+ backlight_set(get_backlight_level());
+}
+
+void breathing_self_disable(void)
+{
+ if (get_backlight_level() == 0)
+ {
+ breathing_halt = BREATHING_HALT_OFF;
+ }
+ else
+ {
+ breathing_halt = BREATHING_HALT_ON;
+ }
+
+ //backlight_set(get_backlight_level());
+}
+
+void breathing_toggle(void)
+{
+ if (!is_breathing())
+ {
+ if (get_backlight_level() == 0)
+ {
+ breathing_index = 0;
+ }
+ else
+ {
+ // Set breathing_index to be at the midpoint + 1 (brightest point)
+ breathing_index = 0x21 << breath_speed;
+ }
+
+ breathing_halt = BREATHING_NO_HALT;
+ }
+
+ // Toggle breathing interrupt
+ TIMSK1 ^= _BV(OCIE1A);
+
+ // Restore backlight level
+ if (!is_breathing())
+ {
+ backlight_set(get_backlight_level());
+ }
+}
+
+bool is_breathing(void)
+{
+ return (TIMSK1 && _BV(OCIE1A));
+}
+
+void breathing_intensity_default(void)
+{
+ //breath_intensity = (uint8_t)((uint16_t)100 * (uint16_t)get_backlight_level() / (uint16_t)BACKLIGHT_LEVELS);
+ breath_intensity = ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2));
+}
+
+void breathing_intensity_set(uint8_t value)
+{
+ breath_intensity = value;
+}