start left
This commit is contained in:
		
							parent
							
								
									d9ef323f8a
								
							
						
					
					
						commit
						45f1fccd3b
					
				
					 5 changed files with 259 additions and 0 deletions
				
			
		
							
								
								
									
										71
									
								
								keyboards/moonlander/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								keyboards/moonlander/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,71 @@
 | 
			
		|||
/*
 | 
			
		||||
Copyright 2018 Jack Humbert <jack.humb@gmail.com>
 | 
			
		||||
 | 
			
		||||
This program is free software: you can redistribute it and/or modify
 | 
			
		||||
it under the terms of the GNU General Public License as published by
 | 
			
		||||
the Free Software Foundation, either version 2 of the License, or
 | 
			
		||||
(at your option) any later version.
 | 
			
		||||
 | 
			
		||||
This program is distributed in the hope that it will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
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/>.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "config_common.h"
 | 
			
		||||
 | 
			
		||||
/* USB Device descriptor parameter */
 | 
			
		||||
#define VENDOR_ID       0xFEED
 | 
			
		||||
#define PRODUCT_ID      0x6060
 | 
			
		||||
#define MANUFACTURER    ZSA
 | 
			
		||||
#define PRODUCT         Moonlander
 | 
			
		||||
#define DESCRIPTION     A keyboard
 | 
			
		||||
#define DEVICE_VER      0x0001
 | 
			
		||||
 | 
			
		||||
/* key matrix size */
 | 
			
		||||
#define MATRIX_ROWS 6
 | 
			
		||||
#define MATRIX_COLS 7
 | 
			
		||||
 | 
			
		||||
/* Planck PCB default pin-out */
 | 
			
		||||
#define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 }
 | 
			
		||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6 }
 | 
			
		||||
#define UNUSED_PINS
 | 
			
		||||
 | 
			
		||||
/* COL2ROW or ROW2COL */
 | 
			
		||||
#define DIODE_DIRECTION ROW2COL
 | 
			
		||||
 | 
			
		||||
/* Set 0 if debouncing isn't needed */
 | 
			
		||||
#define DEBOUNCING_DELAY 5
 | 
			
		||||
 | 
			
		||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 | 
			
		||||
#define LOCKING_SUPPORT_ENABLE
 | 
			
		||||
/* Locking resynchronize hack */
 | 
			
		||||
#define LOCKING_RESYNC_ENABLE
 | 
			
		||||
 | 
			
		||||
/* key combination for command */
 | 
			
		||||
#define IS_COMMAND() ( \
 | 
			
		||||
    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Feature disable options
 | 
			
		||||
 *  These options are also useful to firmware size reduction.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* disable debug print */
 | 
			
		||||
//#define NO_DEBUG
 | 
			
		||||
 | 
			
		||||
/* disable print */
 | 
			
		||||
//#define NO_PRINT
 | 
			
		||||
 | 
			
		||||
/* disable action features */
 | 
			
		||||
//#define NO_ACTION_LAYER
 | 
			
		||||
//#define NO_ACTION_TAPPING
 | 
			
		||||
//#define NO_ACTION_ONESHOT
 | 
			
		||||
//#define NO_ACTION_MACRO
 | 
			
		||||
//#define NO_ACTION_FUNCTION
 | 
			
		||||
							
								
								
									
										31
									
								
								keyboards/moonlander/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								keyboards/moonlander/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
/*
 | 
			
		||||
Copyright 2018 Jack Humbert <jack.humb@gmail.com>
 | 
			
		||||
 | 
			
		||||
This program is free software: you can redistribute it and/or modify
 | 
			
		||||
it under the terms of the GNU General Public License as published by
 | 
			
		||||
the Free Software Foundation, either version 2 of the License, or
 | 
			
		||||
(at your option) any later version.
 | 
			
		||||
 | 
			
		||||
This program is distributed in the hope that it will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
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/>.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include "moonlander.h"
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
 | 
			
		||||
[0] = LAYOUT_moonlander(
 | 
			
		||||
  KC_GRV, KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   KC_6,
 | 
			
		||||
  KC_TAB, KC_Q,   KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,
 | 
			
		||||
  KC_ESC, KC_A,   KC_S,   KC_D,   KC_F,   KC_G,   KC_H,
 | 
			
		||||
  KC_LSFT,KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,
 | 
			
		||||
  KC_RSFT,KC_LCTL,KC_LALT,KC_LGUI,KC_RALT,
 | 
			
		||||
  KC_BSPC,KC_SPC, KC_ENT
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										97
									
								
								keyboards/moonlander/moonlander.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								keyboards/moonlander/moonlander.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,97 @@
 | 
			
		|||
/*
 | 
			
		||||
Copyright 2018 Jack Humbert <jack.humb@gmail.com>
 | 
			
		||||
 | 
			
		||||
This program is free software: you can redistribute it and/or modify
 | 
			
		||||
it under the terms of the GNU General Public License as published by
 | 
			
		||||
the Free Software Foundation, either version 2 of the License, or
 | 
			
		||||
(at your option) any later version.
 | 
			
		||||
 | 
			
		||||
This program is distributed in the hope that it will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
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/>.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include "moonlander.h"
 | 
			
		||||
 | 
			
		||||
void matrix_init_kb(void) {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void matrix_scan_kb(void) {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint32_t layer_state_set_user(uint32_t state) {
 | 
			
		||||
  ergodox_board_led_off();
 | 
			
		||||
  ergodox_right_led_1_off();
 | 
			
		||||
  ergodox_right_led_2_off();
 | 
			
		||||
  ergodox_right_led_3_off();
 | 
			
		||||
 | 
			
		||||
  uint8_t layer = biton32(state);
 | 
			
		||||
  switch (layer) {
 | 
			
		||||
      case 0:
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_0
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
 | 
			
		||||
        #else
 | 
			
		||||
        #ifdef RGBLIGHT_ENABLE
 | 
			
		||||
          rgblight_init();
 | 
			
		||||
        #endif
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 1:
 | 
			
		||||
        ergodox_right_led_1_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_1
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 2:
 | 
			
		||||
        ergodox_right_led_2_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_2
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 3:
 | 
			
		||||
        ergodox_right_led_3_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_3
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 4:
 | 
			
		||||
        ergodox_right_led_1_on();
 | 
			
		||||
        ergodox_right_led_2_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_4
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 5:
 | 
			
		||||
        ergodox_right_led_1_on();
 | 
			
		||||
        ergodox_right_led_3_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_5
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 6:
 | 
			
		||||
        ergodox_right_led_2_on();
 | 
			
		||||
        ergodox_right_led_3_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_6
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      case 7:
 | 
			
		||||
        ergodox_right_led_1_on();
 | 
			
		||||
        ergodox_right_led_2_on();
 | 
			
		||||
        ergodox_right_led_3_on();
 | 
			
		||||
        #ifdef RGBLIGHT_COLOR_LAYER_7
 | 
			
		||||
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7);
 | 
			
		||||
        #endif
 | 
			
		||||
        break;
 | 
			
		||||
      default:
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  return state;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										37
									
								
								keyboards/moonlander/moonlander.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								keyboards/moonlander/moonlander.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,37 @@
 | 
			
		|||
/*
 | 
			
		||||
Copyright 2018 Jack Humbert <jack.humb@gmail.com>
 | 
			
		||||
 | 
			
		||||
This program is free software: you can redistribute it and/or modify
 | 
			
		||||
it under the terms of the GNU General Public License as published by
 | 
			
		||||
the Free Software Foundation, either version 2 of the License, or
 | 
			
		||||
(at your option) any later version.
 | 
			
		||||
 | 
			
		||||
This program is distributed in the hope that it will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
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/>.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "quantum.h"
 | 
			
		||||
 | 
			
		||||
#define LAYOUT_moonlander( \
 | 
			
		||||
    k00, k01, k02, k03, k04, k05, k06, \
 | 
			
		||||
    k10, k11, k12, k13, k14, k15, k16, \
 | 
			
		||||
    k20, k21, k22, k23, k24, k25, k26, \
 | 
			
		||||
    k30, k31, k32, k33, k34, k35, \
 | 
			
		||||
    k40, k41, k42, k43, k44, \
 | 
			
		||||
    k50, k51, k52 \
 | 
			
		||||
) \
 | 
			
		||||
{ \
 | 
			
		||||
    { k00, k01, k02, k03, k04, k05, k06 }, \
 | 
			
		||||
    { k10, k11, k12, k13, k14, k15, k16 }, \
 | 
			
		||||
    { k20, k21, k22, k23, k24, k25, k26 }, \
 | 
			
		||||
    { k30, k31, k32, k33, k34, k35, KC_NO }, \
 | 
			
		||||
    { k40, k41, k42, k43, k44, KC_NO, KC_NO }, \
 | 
			
		||||
    { k50, k51, k52, KC_NO, KC_NO, KC_NO, KC_NO } \
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								keyboards/moonlander/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								keyboards/moonlander/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
# project specific files
 | 
			
		||||
#SRC =	matrix.c
 | 
			
		||||
#LAYOUTS += ortho_4x12
 | 
			
		||||
 | 
			
		||||
# Cortex version
 | 
			
		||||
MCU  = STM32F303
 | 
			
		||||
 | 
			
		||||
# Build Options
 | 
			
		||||
#   comment out to disable the options.
 | 
			
		||||
#
 | 
			
		||||
BACKLIGHT_ENABLE = no
 | 
			
		||||
BOOTMAGIC_ENABLE = yes	# Virtual DIP switch configuration
 | 
			
		||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
 | 
			
		||||
MOUSEKEY_ENABLE = yes	# Mouse keys
 | 
			
		||||
EXTRAKEY_ENABLE = yes	# Audio control and System control
 | 
			
		||||
CONSOLE_ENABLE = yes	# Console for debug
 | 
			
		||||
COMMAND_ENABLE = yes    # Commands for debug and configuration
 | 
			
		||||
#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
 | 
			
		||||
NKRO_ENABLE = yes	    # USB Nkey Rollover
 | 
			
		||||
#CUSTOM_MATRIX = yes # Custom matrix file
 | 
			
		||||
AUDIO_ENABLE = no
 | 
			
		||||
RGBLIGHT_ENABLE = no
 | 
			
		||||
# SERIAL_LINK_ENABLE = yes
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue