diff options
Diffstat (limited to 'keyboards/knops/mini')
-rw-r--r-- | keyboards/knops/mini/config.h | 20 | ||||
-rw-r--r-- | keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c | 42 | ||||
-rw-r--r-- | keyboards/knops/mini/keymaps/default/keymap.c | 106 | ||||
-rw-r--r-- | keyboards/knops/mini/keymaps/knops/keymap.c | 14 | ||||
-rw-r--r-- | keyboards/knops/mini/keymaps/mverteuil/keymap.c | 4 | ||||
-rw-r--r-- | keyboards/knops/mini/rules.mk | 3 |
6 files changed, 84 insertions, 105 deletions
diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 000a9c6232..cf603fbf6c 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -157,24 +157,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c index 68c96fc192..3851719f19 100644 --- a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c @@ -203,27 +203,7 @@ void set_layer_led(int layerId) { } } -void matrix_init_user(void) { - led_init_ports(); - - PORTB |= (1 << 7); - DDRB &= ~(1<<7); - - PORTD |= (1<<7); - PORTC |= (1<<6); - PORTC |= (1<<7); - PORTD |= (1<<4); - PORTE |= (1<<6); - PORTB |= (1<<4); - PORTD |= (1<<6); - - set_layer_led(0); -} - -void matrix_scan_user(void) { -} - -void led_init_ports() { +void led_init_ports_user(void) { // led voor switch #1 DDRD |= (1<<7); PORTD &= ~(1<<7); @@ -276,6 +256,26 @@ void led_init_ports() { //led_set_layer(0); } +void matrix_init_user(void) { + led_init_ports_user(); + + PORTB |= (1 << 7); + DDRB &= ~(1<<7); + + PORTD |= (1<<7); + PORTC |= (1<<6); + PORTC |= (1<<7); + PORTD |= (1<<4); + PORTE |= (1<<6); + PORTB |= (1<<4); + PORTD |= (1<<6); + + set_layer_led(0); +} + +void matrix_scan_user(void) { +} + void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c index 859f07aa07..ee6a0741ca 100644 --- a/keyboards/knops/mini/keymaps/default/keymap.c +++ b/keyboards/knops/mini/keymaps/default/keymap.c @@ -129,72 +129,52 @@ void set_layer_led(int layerId) { } } -void matrix_init_user(void) { - led_init_ports(); - - PORTB |= (1 << 7); - DDRB &= ~(1<<7); - - PORTD |= (1<<7); - PORTC |= (1<<6); - PORTC |= (1<<7); - PORTD |= (1<<4); - PORTE |= (1<<6); - PORTB |= (1<<4); - PORTD |= (1<<6); - - set_layer_led(0); -} - -void matrix_scan_user(void) { -} - -void led_init_ports() { +void led_init_ports_user(void) { // led voor switch #1 DDRD |= (1<<7); PORTD &= ~(1<<7); - + // led voor switch #2 DDRC |= (1<<6); DDRC |= (1<<7); PORTC &= ~(1<<6); PORTC &= ~(1<<7); - + // led voor switch #3 DDRD |= (1<<4); PORTD &= ~(1<<4); - + // led voor switch #4 DDRE |= (1<<6); PORTE &= ~(1<<6); - + // led voor switch #5 DDRB |= (1<<4); PORTB &= ~(1<<4); - + // led voor switch #6 DDRD |= (1<<6); PORTD &= ~(1<<6); - + /* DDRD |= (1<<7); PORTD |= (1<<7); - + DDRC |= (1<<6); PORTC |= (1<<6); - + DDRD |= (1<<4); PORTD |= (1<<4); - + DDRE |= (1<<6); PORTE |= (1<<6); - + DDRB |= (1<<4); PORTB |= (1<<4); - + DDRD |= (1<<6); PORTD |= (1<<6); - // */ + // */ DDRD |= (1<<5); DDRB |= (1<<6); @@ -202,42 +182,62 @@ void led_init_ports() { //led_set_layer(0); } +void matrix_init_user(void) { + led_init_ports_user(); + + PORTB |= (1 << 7); + DDRB &= ~(1<<7); + + PORTD |= (1<<7); + PORTC |= (1<<6); + PORTC |= (1<<7); + PORTD |= (1<<4); + PORTE |= (1<<6); + PORTB |= (1<<4); + PORTD |= (1<<6); + + set_layer_led(0); +} + +void matrix_scan_user(void) { +} + void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { - + } else { - + } if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - + } else { - + } if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - + } else { - + } if (usb_led & (1 << USB_LED_COMPOSE)) { - + } else { - + } if (usb_led & (1 << USB_LED_KANA)) { - + } else { - + } } -/* +/* * NOTE: * * In case you don't understand this coding stuff, please @@ -257,11 +257,11 @@ void led_set_user(uint8_t usb_led) { * | | | | | | | set_switch_led( [1-6], [true/false]); * | 4 | | 5 | | 6 | <--- * |_____| |_____| |_____| -* +* * < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs' * To turn one of them on, use: * set_layer_led( [0-2] ); -* +* */ /* @@ -272,14 +272,14 @@ void led_set_user(uint8_t usb_led) { */ void led_set_layer(int layer) { switch(layer) { - + /** * Here is an example to turn LEDs on and of. By default: * - the LEDs are turned on in layer 0 * - the LEDs are turned off in layer 1 * - the LEDs don't change from state for layer 2 - */ - + */ + case 0: set_layer_led(0); // Turn on only the first/left layer indicator set_switch_led(1, true); @@ -289,7 +289,7 @@ void led_set_layer(int layer) { set_switch_led(5, true); set_switch_led(6, true); break; - + case 1: set_layer_led(1); // Turn on only the second/middle layer indicator set_switch_led(1, false); @@ -299,12 +299,12 @@ void led_set_layer(int layer) { set_switch_led(5, false); set_switch_led(6, false); break; - + case 2: set_layer_led(2); // Turn on only the third/right layer indicator - + // Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE) - + break; } } diff --git a/keyboards/knops/mini/keymaps/knops/keymap.c b/keyboards/knops/mini/keymaps/knops/keymap.c index 7bc7fbe43d..15d9e5bc11 100644 --- a/keyboards/knops/mini/keymaps/knops/keymap.c +++ b/keyboards/knops/mini/keymaps/knops/keymap.c @@ -82,10 +82,10 @@ void set_led_state(int ledId, bool state) { } } -void led_init_ports() { +void led_init_ports_user(void) { PORTB |= (1 << 7); DDRB &= ~(1<<7); - + DDRD |= (1<<7); DDRC |= (1<<6); DDRC |= (1<<7); @@ -106,10 +106,10 @@ void led_set_layer(int layer) { } void matrix_init_user(void) { - led_init_ports(); - + led_init_ports_user(); + led_set_layer(1); - + /*KNOPS_INIT*/ } @@ -132,11 +132,11 @@ void led_set_user(uint8_t usb_led) { } bool process_record_user (uint16_t keycode, keyrecord_t *record) { - + /*KNOPS_PROCESS_STATE*/ return NULL; - + } diff --git a/keyboards/knops/mini/keymaps/mverteuil/keymap.c b/keyboards/knops/mini/keymaps/mverteuil/keymap.c index 5ecba0d5a1..12afb57da2 100644 --- a/keyboards/knops/mini/keymaps/mverteuil/keymap.c +++ b/keyboards/knops/mini/keymaps/mverteuil/keymap.c @@ -270,7 +270,7 @@ void led_set_layer(int layer) { /* * Prepare all LED ports for output */ -void led_init_ports() { +void led_init_ports_user(void) { setPinOutput(D7); // Switch 1 LED setPinOutput(C6); // Switch 2 LED Pin1 setPinOutput(C7); // Switch 2 LED Pin2 @@ -291,7 +291,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); led_init_animation(); } diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk index c0abf739e7..4ee7fa222c 100644 --- a/keyboards/knops/mini/rules.mk +++ b/keyboards/knops/mini/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 |