mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-01-19 08:05:01 +00:00
Rename uglydense to launch_alpha_1 and launch_1 to launch_alpha_2
This commit is contained in:
parent
9c24c1a932
commit
262e107eaa
@ -3,12 +3,12 @@
|
||||
* After cloning, you probably need to run `make git-submodule`.
|
||||
- You may also need to install dependencies: `sudo apt install avrdude gcc-avr avr-libc`
|
||||
* To build the firmware without flashing the keyboard, use `make (keyboard name):(layout name)`
|
||||
- For example, if I want to build Levi's layout for the uglydense keyboard, I will run:
|
||||
`make system76/uglydense:levi`
|
||||
- For example, if I want to build Levi's layout for the launch_alpha_1 keyboard, I will run:
|
||||
`make system76/launch_alpha_1:levi`
|
||||
* Before flashing firmware, disable your ModemManager: `systemctl stop ModemManager.service`
|
||||
- It messes with the flasher, so just stop it before flashing. You can disable it with `systemctl disable ModemManager.service` if you wish to.
|
||||
* To flash the firmware, you'll use the same build command, but with `flash` added to the end:
|
||||
`make system76/uglydense:default:flash`
|
||||
`make system76/launch_alpha_1:default:flash`
|
||||
- After it builds, you will see a message that says `Detecting USB port, reset your controller now...`. You then want to hit the "RESET" key on the keyboard if it is programmed into the layout.
|
||||
- In the default layout and the `levi` layout, it is Fn+Esc. If a RESET key is not programmed into the layout, unplugging and re-plugging the keyboard sometimes begins the flashing process. If it doesn't, you'll have to briefly bridge the RST and GND pins on the Arduino Pro Micro inside the keyboard. Don't attempt this unless you know what you are doing.
|
||||
|
59
keyboards/system76/launch_alpha_1/config.h
Normal file
59
keyboards/system76/launch_alpha_1/config.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x1776
|
||||
#define PRODUCT_ID 0x1776
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER System76
|
||||
#define PRODUCT Launch Keyboard Alpha 1
|
||||
#define DESCRIPTION Launch Keyboard Alpha 1
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B0, C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D3, D2, D1, D0, D4, D5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 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
|
||||
|
||||
// Dynamic keyboard support {
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||
|
||||
// EEPROM usage
|
||||
#define EEPROM_SIZE 1024
|
||||
|
||||
// TODO: refactor with new user EEPROM code (coming soon)
|
||||
#define EEPROM_MAGIC 0x76EC
|
||||
#define EEPROM_MAGIC_ADDR 64
|
||||
// Bump this every time we change what we store
|
||||
// This will automatically reset the EEPROM with defaults
|
||||
// and avoid loading invalid data from the EEPROM
|
||||
#define EEPROM_VERSION 0x01
|
||||
#define EEPROM_VERSION_ADDR (EEPROM_MAGIC_ADDR + 2)
|
||||
|
||||
// Dynamic keymap starts after EEPROM version
|
||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR (EEPROM_VERSION_ADDR + 1)
|
||||
#define DYNAMIC_KEYMAP_EEPROM_SIZE (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
|
||||
// Dynamic macro starts after dynamic keymaps
|
||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + DYNAMIC_KEYMAP_EEPROM_SIZE)
|
||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (EEPROM_SIZE - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR)
|
||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||
// } Dynamic keyboard support
|
||||
|
||||
#endif // CONFIG_H
|
@ -3,7 +3,7 @@
|
||||
#include "tmk_core/common/eeprom.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "launch_1.h"
|
||||
#include "launch_alpha_1.h"
|
||||
|
||||
enum Command {
|
||||
// Probe for System76 EC protocol
|
@ -1,5 +1,5 @@
|
||||
#ifndef UGLYDENSE_H
|
||||
#define UGLYDENSE_H
|
||||
#ifndef LAUNCH_ALPHA_1_H
|
||||
#define LAUNCH_ALPHA_1_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
@ -21,4 +21,4 @@
|
||||
{ K50, K51, K52, K53, K54, ___, K56, K57, K58, K59, K5A, K5B, K5C, ___ }, \
|
||||
}
|
||||
|
||||
#endif // UGLYDENSE_H
|
||||
#endif // LAUNCH_ALPHA_1_H
|
@ -3,10 +3,10 @@
|
||||
* After cloning, you probably need to run `make git-submodule`.
|
||||
- You may also need to install dependencies: `sudo apt install avrdude gcc-avr avr-libc`
|
||||
* To build the firmware without flashing the keyboard, use `make (keyboard name):(layout name)`
|
||||
- For example, if I want to build Levi's layout for the Launch keyboard, I will run:
|
||||
`make system76/launch:levi`
|
||||
- For example, if I want to build Jeremy's layout for the Launch keyboard, I will run:
|
||||
`make system76/launch_alpha_2:jeremy`
|
||||
* To flash the firmware, you'll use the same build command, but with `flash` added to the end:
|
||||
`make system76/launch:default:flash`
|
||||
`make system76/launch_alpha_2:default:flash`
|
||||
- After it builds, you will see a message that says `Detecting USB port, reset your controller now...`. You then want to hit the "RESET" key on the keyboard if it is programmed into the layout.
|
||||
- In the default layout, it is Fn+Esc. If a RESET key is not programmed into the layout, you will have to manually reset the controller.
|
||||
|
@ -8,8 +8,8 @@
|
||||
#define PRODUCT_ID 0x1776
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER System76
|
||||
#define PRODUCT Launch
|
||||
#define DESCRIPTION Launch Keyboard
|
||||
#define PRODUCT Launch Keyboard Alpha 2
|
||||
#define DESCRIPTION Launch Keyboard Alpha 2
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
133
keyboards/system76/launch_alpha_2/launch_alpha_2.c
Normal file
133
keyboards/system76/launch_alpha_2/launch_alpha_2.c
Normal file
@ -0,0 +1,133 @@
|
||||
#include "dynamic_keymap.h"
|
||||
#include "raw_hid.h"
|
||||
#include "tmk_core/common/eeprom.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "launch_alpha_2.h"
|
||||
|
||||
enum Command {
|
||||
// Probe for System76 EC protocol
|
||||
CMD_PROBE = 1,
|
||||
// Read board string
|
||||
CMD_BOARD = 2,
|
||||
// Read version string
|
||||
CMD_VERSION = 3,
|
||||
// Get keyboard map index
|
||||
CMD_KEYMAP_GET = 9,
|
||||
// Set keyboard map index
|
||||
CMD_KEYMAP_SET = 10,
|
||||
};
|
||||
|
||||
static bool keymap_get(uint8_t layer, uint8_t output, uint8_t input, uint16_t *value) {
|
||||
if (layer < dynamic_keymap_get_layer_count()) {
|
||||
if (output < MATRIX_ROWS) {
|
||||
if (input < MATRIX_COLS) {
|
||||
*value = dynamic_keymap_get_keycode(layer, output, input);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool keymap_set(uint8_t layer, uint8_t output, uint8_t input, uint16_t value) {
|
||||
if (layer < dynamic_keymap_get_layer_count()) {
|
||||
if (output < MATRIX_ROWS) {
|
||||
if (input < MATRIX_COLS) {
|
||||
dynamic_keymap_set_keycode(layer, output, input, value);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||
// Error response by default, set to success by commands
|
||||
data[1] = 1;
|
||||
|
||||
switch (data[0]) {
|
||||
case CMD_PROBE:
|
||||
// Signature
|
||||
data[2] = 0x76;
|
||||
data[3] = 0xEC;
|
||||
// Version
|
||||
data[4] = 0x01;
|
||||
data[1] = 0;
|
||||
break;
|
||||
case CMD_BOARD:
|
||||
strncpy((char *)&data[2], QMK_KEYBOARD, length - 2);
|
||||
data[1] = 0;
|
||||
break;
|
||||
case CMD_VERSION:
|
||||
strncpy((char *)&data[2], QMK_VERSION, length - 2);
|
||||
data[1] = 0;
|
||||
break;
|
||||
case CMD_KEYMAP_GET:
|
||||
{
|
||||
uint16_t value = 0;
|
||||
if (keymap_get(data[2], data[3], data[4], &value)) {
|
||||
data[5] = (uint8_t)value;
|
||||
data[6] = (uint8_t)(value >> 8);
|
||||
data[1] = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CMD_KEYMAP_SET:
|
||||
{
|
||||
uint16_t value =
|
||||
((uint16_t)data[5]) |
|
||||
(((uint16_t)data[6]) << 8);
|
||||
if (keymap_set(data[2], data[3], data[4], value)) {
|
||||
data[1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
raw_hid_send(data, length);
|
||||
}
|
||||
|
||||
bool eeprom_is_valid(void) {
|
||||
return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC &&
|
||||
eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION);
|
||||
}
|
||||
|
||||
void eeprom_set_valid(bool valid) {
|
||||
eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF);
|
||||
eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF);
|
||||
}
|
||||
|
||||
void eeprom_reset(void) {
|
||||
// Set the keyboard specific EEPROM state as invalid.
|
||||
eeprom_set_valid(false);
|
||||
// Set the TMK/QMK EEPROM state as invalid.
|
||||
eeconfig_disable();
|
||||
}
|
||||
|
||||
void bootmagic_lite(void) {
|
||||
// The lite version of TMK's bootmagic.
|
||||
// 100% less potential for accidentally making the
|
||||
// keyboard do stupid things.
|
||||
|
||||
// We need multiple scans because debouncing can't be turned off.
|
||||
matrix_scan();
|
||||
wait_ms(DEBOUNCE);
|
||||
wait_ms(DEBOUNCE);
|
||||
matrix_scan();
|
||||
|
||||
// If the Esc (matrix 0,0) is held down on power up,
|
||||
// reset the EEPROM valid state and jump to bootloader.
|
||||
if ( matrix_get_row(0) & (1<<0) ) {
|
||||
eeprom_reset();
|
||||
bootloader_jump();
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
bootmagic_lite();
|
||||
if (!eeprom_is_valid()) {
|
||||
dynamic_keymap_reset();
|
||||
dynamic_keymap_macro_reset();
|
||||
eeprom_set_valid(true);
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCH_1_H
|
||||
#define LAUNCH_1_H
|
||||
#ifndef LAUNCH_ALPHA_2_H
|
||||
#define LAUNCH_ALPHA_2_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
@ -21,4 +21,4 @@
|
||||
{ K50, K51, K52, K53, K54, ___, K55, K56, K57, K58, K59, K5A, K5B, ___, ___ }, \
|
||||
}
|
||||
|
||||
#endif // LAUNCH_1_H
|
||||
#endif // LAUNCH_ALPHA_2_H
|
24
keyboards/system76/launch_alpha_2/rules.mk
Normal file
24
keyboards/system76/launch_alpha_2/rules.mk
Normal file
@ -0,0 +1,24 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
DYNAMIC_KEYMAP_ENABLE = yes # Reconfigurable keyboard without flashing firmware
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RAW_ENABLE = yes # Enable RAW HID commands (used by keyboard configurator)
|
@ -1,35 +0,0 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x1776
|
||||
#define PRODUCT_ID 0x1776
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER System76
|
||||
#define PRODUCT Uglydense
|
||||
#define DESCRIPTION Uglydense Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B0, C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D3, D2, D1, D0, D4, D5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 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
|
||||
|
||||
#endif // CONFIG_H
|
@ -1,22 +0,0 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
@ -1,10 +0,0 @@
|
||||
|
||||
#include "uglydense.h"
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Customise these values to desired behaviour
|
||||
debug_enable=true;
|
||||
debug_matrix=true;
|
||||
debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
Loading…
Reference in New Issue
Block a user