summaryrefslogtreecommitdiffstats
path: root/keyboard
diff options
context:
space:
mode:
authorIBNobody <ibnobody@gmail.com>2016-05-24 17:55:46 -0500
committerIBNobody <ibnobody@gmail.com>2016-05-24 17:55:46 -0500
commit76e36a787a58ad0e72fac579e4a02aa66ce26be1 (patch)
tree22eb10d93b95cfb52560a91450a29bd9aabdbc61 /keyboard
parent35d7081899df3a486b9b5785c7e8ec9481195848 (diff)
parentd66aa0abf96b5e887250cf0a7fa5e575f18c5a91 (diff)
Merge remote-tracking branch 'remotes/jackhumbert/master'
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/atomic/atomic.c265
-rw-r--r--keyboard/atomic/atomic.h24
-rw-r--r--keyboard/atomic/keymaps/pvc/config.h6
-rw-r--r--keyboard/atomic/keymaps/pvc/keymap.c386
-rw-r--r--keyboard/atomic/keymaps/pvc/makefile.mk2
-rw-r--r--keyboard/atreus/config.h2
-rw-r--r--keyboard/ergodox_ez/Makefile16
-rw-r--r--keyboard/ergodox_ez/keymaps/adnw/k_o_y/k_o_y.hex1152
-rw-r--r--keyboard/ergodox_ez/keymaps/adnw/k_o_y/keymap.c185
-rw-r--r--keyboard/ergodox_ez/keymaps/adnw/k_o_y/readme.md7
-rw-r--r--keyboard/ergodox_ez/keymaps/default_osx/keymap.c6
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/config_user.h8
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/erez_experimental.hex2243
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c109
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/makefile.mk5
-rw-r--r--keyboard/ergodox_ez/keymaps/erez_experimental/readme.md8
-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/osx_de_experimental/keymap.c239
-rw-r--r--keyboard/ergodox_ez/keymaps/osx_de_experimental/osx_de_experimental.hex1247
-rw-r--r--keyboard/ergodox_ez/keymaps/osx_de_experimental/osx_de_experimental_highres.pngbin289029 -> 303904 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/osx_de_experimental/readme.md22
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/config.h92
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/keymap.c285
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/makefile.mk4
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/readme.md77
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/townk_osx.hex1166
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/townk_osx_base.pngbin0 -> 785859 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/townk_osx_fn.pngbin0 -> 390041 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/townk_osx/townk_osx_keypad.pngbin0 -> 424425 bytes
-rw-r--r--keyboard/ergodox_ez/keymaps/twey/keymap.c40
-rw-r--r--keyboard/ergodox_ez/keymaps/twey/readme.md12
-rw-r--r--keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c23
-rw-r--r--keyboard/gh60_rev_c/gh60.c7
-rw-r--r--keyboard/gh60_rev_c/gh60.h2
-rw-r--r--keyboard/planck/keymaps/alexey/alexey.c (renamed from keyboard/planck/keymaps/alexey.c)0
-rw-r--r--keyboard/planck/keymaps/angerthosenear/angerthosenear.c (renamed from keyboard/planck/keymaps/angerthosenear.c)0
-rw-r--r--keyboard/planck/keymaps/austin/austin.c (renamed from keyboard/planck/keymaps/austin.c)0
-rw-r--r--keyboard/planck/keymaps/bone2planck/bone2planck.c (renamed from keyboard/planck/keymaps/bone2planck.c)0
-rw-r--r--keyboard/planck/keymaps/brandon/brandon.c (renamed from keyboard/planck/keymaps/brandon.c)0
-rw-r--r--keyboard/planck/keymaps/charlie/charlie.c (renamed from keyboard/planck/keymaps/charlie.c)0
-rw-r--r--keyboard/planck/keymaps/daniel/daniel.c (renamed from keyboard/planck/keymaps/daniel.c)0
-rw-r--r--keyboard/planck/keymaps/david/david.c (renamed from keyboard/planck/keymaps/david.c)0
-rw-r--r--keyboard/planck/keymaps/default/keymap.c106
-rw-r--r--keyboard/planck/keymaps/dzobert/dzobert.c (renamed from keyboard/planck/keymaps/dzobert.c)0
-rw-r--r--keyboard/planck/keymaps/experimental/README.md2
-rw-r--r--keyboard/planck/keymaps/experimental/keymap.c333
-rw-r--r--keyboard/planck/keymaps/experimental/makefile.mk5
-rw-r--r--keyboard/planck/keymaps/gabriel/gabriel.c (renamed from keyboard/planck/keymaps/gabriel.c)0
-rw-r--r--keyboard/planck/keymaps/jacob/Keyboard Layout.PNGbin0 -> 17292 bytes
-rw-r--r--keyboard/planck/keymaps/jacob/keymap.c56
-rw-r--r--keyboard/planck/keymaps/jacob/readme.md1
-rw-r--r--keyboard/planck/keymaps/joe/joe.c (renamed from keyboard/planck/keymaps/joe.c)0
-rw-r--r--keyboard/planck/keymaps/kyle/kyle.c (renamed from keyboard/planck/keymaps/kyle.c)0
-rw-r--r--keyboard/planck/keymaps/leo/leo.c (renamed from keyboard/planck/keymaps/leo.c)0
-rw-r--r--keyboard/planck/keymaps/lucas/lucas.c (renamed from keyboard/planck/keymaps/lucas.c)0
-rw-r--r--keyboard/planck/keymaps/lukas/lukas.c (renamed from keyboard/planck/keymaps/lukas.c)0
-rw-r--r--keyboard/planck/keymaps/max/max.c (renamed from keyboard/planck/keymaps/max.c)0
-rw-r--r--keyboard/planck/keymaps/mollat/mollat.c (renamed from keyboard/planck/keymaps/mollat.c)0
-rw-r--r--keyboard/planck/keymaps/monkey/monkey.c (renamed from keyboard/planck/keymaps/monkey.c)0
-rw-r--r--keyboard/planck/keymaps/nico/nico.c (renamed from keyboard/planck/keymaps/nico.c)0
-rw-r--r--keyboard/planck/keymaps/numpad/numpad.c (renamed from keyboard/planck/keymaps/numpad.c)0
-rw-r--r--keyboard/planck/keymaps/pete/README.md14
-rw-r--r--keyboard/planck/keymaps/pete/keymap.c223
-rw-r--r--keyboard/planck/keymaps/pete/makefile.mk2
-rw-r--r--keyboard/planck/keymaps/pvc/config.h2
-rw-r--r--keyboard/planck/keymaps/pvc/keymap.c17
-rw-r--r--keyboard/planck/keymaps/pvc/makefile.mk7
-rw-r--r--keyboard/planck/keymaps/tak3over/tak3over.c (renamed from keyboard/planck/keymaps/tak3over.c)0
-rw-r--r--keyboard/planck/keymaps/unicode/keymap.c326
-rw-r--r--keyboard/planck/keymaps/unicode/makefile.mk1
-rw-r--r--keyboard/planck/planck.c229
-rw-r--r--keyboard/planck/planck.h34
-rw-r--r--keyboard/preonic/keymaps/default/keymap.c93
-rw-r--r--keyboard/preonic/preonic.c8
-rw-r--r--keyboard/preonic/preonic.h16
85 files changed, 9090 insertions, 3207 deletions
diff --git a/keyboard/atomic/atomic.c b/keyboard/atomic/atomic.c
index 3996497161..fa218a48f3 100644
--- a/keyboard/atomic/atomic.c
+++ b/keyboard/atomic/atomic.c
@@ -2,27 +2,28 @@
__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
+bool process_action_user(keyrecord_t *record) {
+ // leave this function blank - it can be defined in a keymap file
+ return true;
}
__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,31 +36,39 @@ 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
+bool process_action_kb(keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
- process_action_user(record);
+ return 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()
{
@@ -67,54 +76,250 @@ void backlight_init_ports()
// Setup PB7 as output and output low.
DDRB |= (1<<7);
PORTB &= ~(1<<7);
-
- // Use full 16-bit resolution.
+
+ // 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;
- // Prevent backlight blink on lowest level
- PORTB &= ~(_BV(PORTB7));
}
- else if ( level == BACKLIGHT_LEVELS )
+ else if ( level >= BACKLIGHT_LEVELS )
{
- // Prevent backlight blink on lowest level
- PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
- // Set the brightness
+
+ // Set the brightness to max
CHANNEL = 0xFFFF;
}
- else
+ else
{
- // Prevent backlight blink on lowest level
- PORTB &= ~(_BV(PORTB7));
// 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;
+}
+
+void breathing_speed_default(void)
+{
+ breath_speed = 4;
+}
+
+void breathing_speed_set(uint8_t value)
+{
+ bool is_breathing_now = is_breathing();
+ uint8_t old_breath_speed = breath_speed;
+
+ if (is_breathing_now)
+ {
+ // Disable breathing interrupt
+ TIMSK1 &= ~_BV(OCIE1A);
+ }
+
+ breath_speed = value;
+
+ if (is_breathing_now)
+ {
+ // Adjust index to account for new speed
+ breathing_index = (( (uint8_t)( (breathing_index) >> old_breath_speed ) ) & 0x3F) << breath_speed;
+
+ // Enable breathing interrupt
+ TIMSK1 |= _BV(OCIE1A);
+ }
+
+}
+
+void breathing_speed_inc(uint8_t value)
+{
+ if ((uint16_t)(breath_speed - value) > 10 )
+ {
+ breathing_speed_set(0);
+ }
+ else
+ {
+ breathing_speed_set(breath_speed - value);
+ }
+}
+
+void breathing_speed_dec(uint8_t value)
+{
+ if ((uint16_t)(breath_speed + value) > 10 )
+ {
+ breathing_speed_set(10);
+ }
+ else
+ {
+ breathing_speed_set(breath_speed + value);
+ }
+}
+
+void breathing_defaults(void)
+{
+ breathing_intensity_default();
+ breathing_speed_default();
+ breathing_halt = BREATHING_NO_HALT;
+}
+
+/* Breathing Sleep LED brighness(PWM On period) table
+ * (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle
+ *
+ * http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63
+ * (0..63).each {|x| p ((sin(x/64.0*PI)**8)*255).to_i }
+ */
+static const uint8_t breathing_table[64] PROGMEM = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 10,
+ 15, 23, 32, 44, 58, 74, 93, 113, 135, 157, 179, 199, 218, 233, 245, 252,
+255, 252, 245, 233, 218, 199, 179, 157, 135, 113, 93, 74, 58, 44, 32, 23,
+ 15, 10, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+ISR(TIMER1_COMPA_vect)
+{
+ // CHANNEL = (pgm_read_byte(&breathing_table[ ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F ] )) * breath_intensity;
+
+
+ uint8_t local_index = ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F;
+
+ if (((breathing_halt == BREATHING_HALT_ON) && (local_index == 0x20)) || ((breathing_halt == BREATHING_HALT_OFF) && (local_index == 0x3F)))
+ {
+ // Disable breathing interrupt
+ TIMSK1 &= ~_BV(OCIE1A);
+ }
+
+ CHANNEL = (uint16_t)(((uint16_t)pgm_read_byte(&breathing_table[local_index]) * 257)) >> breath_intensity;
+
}
+
+
#endif \ No newline at end of file
diff --git a/keyboard/atomic/atomic.h b/keyboard/atomic/atomic.h
index 0c7aeb1cc8..456c3fbdf8 100644
--- a/keyboard/atomic/atomic.h
+++ b/keyboard/atomic/atomic.h
@@ -1,11 +1,7 @@
#ifndef ATOMIC_H
#define ATOMIC_H
-#include "matrix.h"
-#include "keymap_common.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include "quantum.h"
#include <stddef.h>
#include <avr/io.h>
@@ -29,8 +25,24 @@
void matrix_init_user(void);
void matrix_scan_user(void);
-void process_action_user(keyrecord_t *record);
+bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led);
void backlight_init_ports(void);
+void breathing_enable(void);
+void breathing_pulse(void);
+void breathing_disable(void);
+void breathing_self_disable(void);
+void breathing_toggle(void);
+bool is_breathing(void);
+
+
+void breathing_defaults(void);
+void breathing_intensity_default(void);
+void breathing_speed_default(void);
+void breathing_speed_set(uint8_t value);
+void breathing_speed_inc(uint8_t value);
+void breathing_speed_dec(uint8_t value);
+
+
#endif \ No newline at end of file
diff --git a/keyboard/atomic/keymaps/pvc/config.h b/keyboard/atomic/keymaps/pvc/config.h
index cc92634646..5e956286b5 100644
--- a/keyboard/atomic/keymaps/pvc/config.h
+++ b/keyboard/atomic/keymaps/pvc/config.h
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x6060
+#define PRODUCT_ID 0x0419
#define DEVICE_VER 0x0001
#define MANUFACTURER Ortholinear Keyboards
#define PRODUCT The Atomic Keyboard
@@ -158,4 +158,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+
+//#define VIBRATO_ENABLE
+//#define VIBRATO_STRENGTH_ENABLE
+
#endif
diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c
index e17c41e23d..8431654d7d 100644
--- a/keyboard/atomic/keymaps/pvc/keymap.c
+++ b/k