Skip to content

Commit

Permalink
[Keyboard] Update ZSA Moonlander (qmk#23911)
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored Aug 19, 2024
1 parent 48d3edd commit e9cb9f4
Show file tree
Hide file tree
Showing 7 changed files with 360 additions and 326 deletions.
45 changes: 0 additions & 45 deletions keyboards/zsa/moonlander/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,15 @@

#pragma once


#define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com"

/* key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 7

/* PCB default pin-out */
// #define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 }
// #define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 }

// #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 }
// #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 }

// #define MCP23_LED_R GPB7
// #define MCP23_LED_G GPB6
// #define MCP23_LED_B GPA7

#define EEPROM_I2C_24LC128

// Not needed, is default address:
// #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL

/*
* 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 IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC

#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 400
#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL
#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED
#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX

#define MUSIC_MAP

#define FIRMWARE_VERSION_SIZE 17
Expand Down
84 changes: 84 additions & 0 deletions keyboards/zsa/moonlander/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"bootmagic": true,
"command": true,
"console": true,
"deferred_exec": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
Expand All @@ -37,6 +38,13 @@
"eeprom": {
"driver": "i2c"
},
"mousekey": {
"delay": 0,
"interval": 20,
"max_speed": 7,
"time_to_max": 60,
"wheel_delay": 400
},
"rgb_matrix": {
"animations": {
"alphas_mods": true,
Expand Down Expand Up @@ -85,6 +93,82 @@
},
"center_point": [120, 36],
"driver": "is31fl3731",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 4, "flags": 1},
{"matrix": [1, 0], "x": 0, "y": 20, "flags": 1},
{"matrix": [2, 0], "x": 0, "y": 36, "flags": 1},
{"matrix": [3, 0], "x": 0, "y": 52, "flags": 1},
{"matrix": [4, 0], "x": 0, "y": 68, "flags": 1},
{"matrix": [0, 1], "x": 16, "y": 3, "flags": 4},
{"matrix": [1, 1], "x": 16, "y": 19, "flags": 4},
{"matrix": [2, 1], "x": 16, "y": 35, "flags": 4},
{"matrix": [3, 1], "x": 16, "y": 51, "flags": 4},
{"matrix": [4, 1], "x": 16, "y": 67, "flags": 1},
{"matrix": [0, 2], "x": 32, "y": 1, "flags": 4},
{"matrix": [1, 2], "x": 32, "y": 17, "flags": 4},
{"matrix": [2, 2], "x": 32, "y": 33, "flags": 4},
{"matrix": [3, 2], "x": 32, "y": 49, "flags": 4},
{"matrix": [4, 2], "x": 32, "y": 65, "flags": 1},
{"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
{"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
{"matrix": [2, 3], "x": 48, "y": 32, "flags": 4},
{"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
{"matrix": [4, 3], "x": 48, "y": 64, "flags": 1},
{"matrix": [0, 4], "x": 64, "y": 1, "flags": 4},
{"matrix": [1, 4], "x": 64, "y": 17, "flags": 4},
{"matrix": [2, 4], "x": 64, "y": 33, "flags": 4},
{"matrix": [3, 4], "x": 64, "y": 49, "flags": 4},
{"matrix": [4, 4], "x": 64, "y": 65, "flags": 1},
{"matrix": [0, 5], "x": 80, "y": 3, "flags": 4},
{"matrix": [1, 5], "x": 80, "y": 19, "flags": 4},
{"matrix": [2, 5], "x": 80, "y": 35, "flags": 4},
{"matrix": [3, 5], "x": 80, "y": 51, "flags": 4},
{"matrix": [0, 6], "x": 96, "y": 4, "flags": 1},
{"matrix": [1, 6], "x": 96, "y": 20, "flags": 1},
{"matrix": [2, 6], "x": 96, "y": 36, "flags": 1},
{"matrix": [5, 0], "x": 88, "y": 69, "flags": 1},
{"matrix": [5, 1], "x": 100, "y": 80, "flags": 1},
{"matrix": [5, 2], "x": 112, "y": 91, "flags": 1},
{"matrix": [5, 3], "x": 108, "y": 69, "flags": 1},
{"matrix": [6, 6], "x": 240, "y": 4, "flags": 1},
{"matrix": [7, 6], "x": 240, "y": 20, "flags": 1},
{"matrix": [8, 6], "x": 240, "y": 36, "flags": 1},
{"matrix": [9, 6], "x": 240, "y": 52, "flags": 1},
{"matrix": [10, 6], "x": 240, "y": 68, "flags": 1},
{"matrix": [6, 5], "x": 224, "y": 3, "flags": 4},
{"matrix": [7, 5], "x": 224, "y": 19, "flags": 4},
{"matrix": [8, 5], "x": 224, "y": 35, "flags": 4},
{"matrix": [9, 5], "x": 224, "y": 51, "flags": 4},
{"matrix": [10, 5], "x": 224, "y": 67, "flags": 1},
{"matrix": [6, 4], "x": 208, "y": 1, "flags": 4},
{"matrix": [7, 4], "x": 208, "y": 17, "flags": 4},
{"matrix": [8, 4], "x": 208, "y": 33, "flags": 4},
{"matrix": [9, 4], "x": 208, "y": 49, "flags": 4},
{"matrix": [10, 4], "x": 208, "y": 65, "flags": 1},
{"matrix": [6, 3], "x": 192, "y": 0, "flags": 4},
{"matrix": [7, 3], "x": 192, "y": 16, "flags": 4},
{"matrix": [8, 3], "x": 192, "y": 32, "flags": 4},
{"matrix": [9, 3], "x": 192, "y": 48, "flags": 4},
{"matrix": [10, 3], "x": 192, "y": 64, "flags": 1},
{"matrix": [6, 2], "x": 176, "y": 1, "flags": 4},
{"matrix": [7, 2], "x": 176, "y": 17, "flags": 4},
{"matrix": [8, 2], "x": 176, "y": 33, "flags": 4},
{"matrix": [9, 2], "x": 176, "y": 49, "flags": 4},
{"matrix": [10, 2], "x": 176, "y": 65, "flags": 1},
{"matrix": [6, 1], "x": 160, "y": 3, "flags": 4},
{"matrix": [7, 1], "x": 160, "y": 19, "flags": 4},
{"matrix": [8, 1], "x": 160, "y": 35, "flags": 4},
{"matrix": [9, 1], "x": 160, "y": 51, "flags": 4},
{"matrix": [6, 0], "x": 144, "y": 4, "flags": 1},
{"matrix": [7, 0], "x": 144, "y": 20, "flags": 1},
{"matrix": [8, 0], "x": 144, "y": 36, "flags": 1},
{"matrix": [11, 6], "x": 152, "y": 69, "flags": 1},
{"matrix": [11, 5], "x": 140, "y": 80, "flags": 1},
{"matrix": [11, 4], "x": 128, "y": 91, "flags": 1},
{"matrix": [11, 3], "x": 132, "y": 69, "flags": 1}
],
"led_flush_limit": 26,
"led_process_limit": 5,
"max_brightness": 175,
"sleep": true
},
Expand Down
85 changes: 85 additions & 0 deletions keyboards/zsa/moonlander/ld/STM32F303xB.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
ChibiOS - Copyright (C) 2006..2018 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.
*/

/*
* STM32F303xB memory setup.
*/
MEMORY
{
flash0 (rx) : org = 0x08000000, len = 128k
flash1 (rx) : org = 0x00000000, len = 0
flash2 (rx) : org = 0x00000000, len = 0
flash3 (rx) : org = 0x00000000, len = 0
flash4 (rx) : org = 0x00000000, len = 0
flash5 (rx) : org = 0x00000000, len = 0
flash6 (rx) : org = 0x00000000, len = 0
flash7 (rx) : org = 0x00000000, len = 0
ram0 (wx) : org = 0x20000000, len = 32k
ram1 (wx) : org = 0x00000000, len = 0
ram2 (wx) : org = 0x00000000, len = 0
ram3 (wx) : org = 0x00000000, len = 0
ram4 (wx) : org = 0x10000000, len = 8k
ram5 (wx) : org = 0x00000000, len = 0
ram6 (wx) : org = 0x00000000, len = 0
ram7 (wx) : org = 0x00000000, len = 0
}

/* For each data/text section two region are defined, a virtual region
and a load region (_LMA suffix).*/

/* Flash region to be used for exception vectors.*/
REGION_ALIAS("VECTORS_FLASH", flash0);
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);

/* Flash region to be used for constructors and destructors.*/
REGION_ALIAS("XTORS_FLASH", flash0);
REGION_ALIAS("XTORS_FLASH_LMA", flash0);

/* Flash region to be used for code text.*/
REGION_ALIAS("TEXT_FLASH", flash0);
REGION_ALIAS("TEXT_FLASH_LMA", flash0);

/* Flash region to be used for read only data.*/
REGION_ALIAS("RODATA_FLASH", flash0);
REGION_ALIAS("RODATA_FLASH_LMA", flash0);

/* Flash region to be used for various.*/
REGION_ALIAS("VARIOUS_FLASH", flash0);
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);

/* Flash region to be used for RAM(n) initialization data.*/
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);

/* RAM region to be used for Main stack. This stack accommodates the processing
of all exceptions and interrupts.*/
REGION_ALIAS("MAIN_STACK_RAM", ram0);

/* RAM region to be used for the process stack. This is the stack used by
the main() function.*/
REGION_ALIAS("PROCESS_STACK_RAM", ram0);

/* RAM region to be used for data segment.*/
REGION_ALIAS("DATA_RAM", ram0);
REGION_ALIAS("DATA_RAM_LMA", flash0);

/* RAM region to be used for BSS segment.*/
REGION_ALIAS("BSS_RAM", ram0);

/* RAM region to be used for the default heap.*/
REGION_ALIAS("HEAP_RAM", ram0);

/* Generic rules inclusion.*/
INCLUDE rules.ld
Loading

0 comments on commit e9cb9f4

Please sign in to comment.