mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-26 09:50:19 +00:00
Cleans up comments to use 'C' style
This commit is contained in:
parent
9b7a4be521
commit
6d8cfe8133
@ -3,14 +3,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Split Keyboard Stuff
|
/* Split Keyboard Stuff */
|
||||||
#define EE_HANDS // Sets the keyboard’s handedness using EEPROM
|
#define EE_HANDS
|
||||||
#define SERIAL_USART_FULL_DUPLEX // Use full duplex communication (TRRS)
|
/* Use full duplex communication (TRRS) */
|
||||||
#define SERIAL_USART_TX_PIN GP16 // USART TX pin
|
#define SERIAL_USART_FULL_DUPLEX
|
||||||
#define SERIAL_USART_RX_PIN GP17 // USART RX pin
|
#define SERIAL_USART_TX_PIN GP16
|
||||||
#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. (Only available on some MCUs)
|
#define SERIAL_USART_RX_PIN GP17
|
||||||
|
/* Swap TX and RX pins if keyboard is master half. (Only available on some MCUs) */
|
||||||
|
#define SERIAL_USART_PIN_SWAP
|
||||||
|
|
||||||
// I2C for OLEDs
|
/* I2C for OLEDs */
|
||||||
#define I2C_DRIVER I2CD1
|
#define I2C_DRIVER I2CD1
|
||||||
#define I2C1_SDA_PIN GP6
|
#define I2C1_SDA_PIN GP6
|
||||||
#define I2C1_SCL_PIN GP7
|
#define I2C1_SCL_PIN GP7
|
||||||
@ -20,7 +22,7 @@
|
|||||||
# define OLED_TIMEOUT 30000
|
# define OLED_TIMEOUT 30000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* - Encoder settings - */
|
/* Encoder settings */
|
||||||
#ifdef ENCODER_MAP_ENABLE
|
#ifdef ENCODER_MAP_ENABLE
|
||||||
# define ENCODER_MAP_KEY_DELAY 10
|
# define ENCODER_MAP_KEY_DELAY 10
|
||||||
#endif
|
#endif
|
||||||
@ -38,15 +40,15 @@
|
|||||||
#define POINTING_DEVICE_TASK_THROTTLE_MS 8
|
#define POINTING_DEVICE_TASK_THROTTLE_MS 8
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
// Decrease decay of heatmap rgb effect
|
/* Decrease decay of heatmap rgb effect */
|
||||||
# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
|
# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
|
||||||
// If you're setting colors per key, this is required.
|
/* If you're setting colors per key, this is required */
|
||||||
# define SPLIT_LAYER_STATE_ENABLE
|
# define SPLIT_LAYER_STATE_ENABLE
|
||||||
// Turns off RGB effects when there is no longer a USB connection
|
/* Turns off RGB effects when there is no longer a USB connection */
|
||||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED
|
# define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Allows for more than the default 4 layers in VIA.
|
/* Allows for more than the default 4 layers in VIA. */
|
||||||
#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
|
#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||||
# define DYNAMIC_KEYMAP_LAYER_COUNT 5
|
# define DYNAMIC_KEYMAP_LAYER_COUNT 5
|
||||||
#endif
|
#endif
|
||||||
|
@ -128,9 +128,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|
||||||
// Default timeout for displaying logo on boot.
|
/* Default timeout for displaying logo on boot. */
|
||||||
#ifndef OLED_LOGO_TIMEOUT
|
#ifndef OLED_LOGO_TIMEOUT
|
||||||
// 10 second timeout.
|
/* 10 second timeout. */
|
||||||
# define OLED_LOGO_TIMEOUT 10000
|
# define OLED_LOGO_TIMEOUT 10000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
uint16_t startup_timer;
|
uint16_t startup_timer;
|
||||||
|
|
||||||
static void render_status(void) {
|
static void render_status(void) {
|
||||||
// Print current mode
|
/* Print current mode */
|
||||||
oled_write_P(PSTR("\n\n"), false);
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
oled_write_ln_P(PSTR("MODE"), false);
|
oled_write_ln_P(PSTR("MODE"), false);
|
||||||
oled_write_ln_P(PSTR(""), false);
|
oled_write_ln_P(PSTR(""), false);
|
||||||
@ -159,7 +159,7 @@ static void render_status(void) {
|
|||||||
oled_write_P(PSTR("Undefined"), false);
|
oled_write_P(PSTR("Undefined"), false);
|
||||||
}
|
}
|
||||||
oled_write_P(PSTR("\n\n"), false);
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
// Print current layer
|
/* Print current layer */
|
||||||
oled_write_ln_P(PSTR("LAYER"), false);
|
oled_write_ln_P(PSTR("LAYER"), false);
|
||||||
switch (get_highest_layer(layer_state)) {
|
switch (get_highest_layer(layer_state)) {
|
||||||
case _COLEMAK:
|
case _COLEMAK:
|
||||||
@ -215,11 +215,11 @@ static void render_logo(void) {
|
|||||||
bool oled_task_user(void) {
|
bool oled_task_user(void) {
|
||||||
static bool finished_logo = false;
|
static bool finished_logo = false;
|
||||||
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
|
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
|
||||||
// Display the logo for 5 seconds on boot.
|
/* Display the logo for 5 seconds on boot. */
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
render_logo();
|
render_logo();
|
||||||
// Adding text below the partial screen logo requires oled_set_cursor.
|
/* Adding text below the partial screen logo requires oled_set_cursor. */
|
||||||
// There are 10 chars per line. Subsequent oled_set_cursor simplifies line wraps.
|
/* There are 10 chars per line. Subsequent oled_set_cursor simplifies line wraps. */
|
||||||
oled_set_cursor(0, 12);
|
oled_set_cursor(0, 12);
|
||||||
oled_write_ln_P(PSTR("v3.5.4"), false);
|
oled_write_ln_P(PSTR("v3.5.4"), false);
|
||||||
oled_set_cursor(0, 13);
|
oled_set_cursor(0, 13);
|
||||||
@ -232,14 +232,14 @@ bool oled_task_user(void) {
|
|||||||
render_qmk_logo();
|
render_qmk_logo();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Display the current keyboard state.
|
/* Display the current keyboard state. */
|
||||||
if (!finished_logo) {
|
if (!finished_logo) {
|
||||||
finished_logo = true;
|
finished_logo = true;
|
||||||
// Clears the OLED.
|
/* Clears the OLED. */
|
||||||
oled_clear();
|
oled_clear();
|
||||||
}
|
}
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
// Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
/* Renders the current keyboard state (layer, lock, caps, scroll, etc) */
|
||||||
render_status();
|
render_status();
|
||||||
} else {
|
} else {
|
||||||
render_logo();
|
render_logo();
|
||||||
@ -306,7 +306,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case KC_LSTRT:
|
case KC_LSTRT:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keymap_config.swap_lctl_lgui) {
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
// CMD-arrow on Mac, but we have CTL and GUI swapped
|
/* CMD-arrow on Mac, but we have CTL and GUI swapped */
|
||||||
register_mods(mod_config(MOD_LCTL));
|
register_mods(mod_config(MOD_LCTL));
|
||||||
register_code(KC_LEFT);
|
register_code(KC_LEFT);
|
||||||
} else {
|
} else {
|
||||||
@ -324,7 +324,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case KC_LEND:
|
case KC_LEND:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keymap_config.swap_lctl_lgui) {
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
// CMD-arrow on Mac, but we have CTL and GUI swapped
|
/* CMD-arrow on Mac, but we have CTL and GUI swapped */
|
||||||
register_mods(mod_config(MOD_LCTL));
|
register_mods(mod_config(MOD_LCTL));
|
||||||
register_code(KC_RIGHT);
|
register_code(KC_RIGHT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -27,9 +27,7 @@ enum custom_keycodes {
|
|||||||
bool is_cmd_tab_active = false;
|
bool is_cmd_tab_active = false;
|
||||||
uint16_t cmd_tab_timer = 0;
|
uint16_t cmd_tab_timer = 0;
|
||||||
|
|
||||||
/**
|
/* Tap Dance declarations */
|
||||||
* Tap Dance declarations
|
|
||||||
*/
|
|
||||||
enum tapdances {
|
enum tapdances {
|
||||||
_TD_FIVE_ENTER,
|
_TD_FIVE_ENTER,
|
||||||
};
|
};
|
||||||
@ -49,6 +47,7 @@ tap_dance_action_t tap_dance_actions[] = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Keymap.
|
* Keymap.
|
||||||
|
*
|
||||||
* The rotary encoders are programmed manually below because the configurator does not support them yet.
|
* The rotary encoders are programmed manually below because the configurator does not support them yet.
|
||||||
*/
|
*/
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@ -196,9 +195,9 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
|||||||
[_RAISE] = {ENCODER_CCW_CW(C(S(KC_LEFT)), C(S(KC_RGHT))), ENCODER_CCW_CW(G(KC_LEFT), G(KC_RGHT))}};
|
[_RAISE] = {ENCODER_CCW_CW(C(S(KC_LEFT)), C(S(KC_RGHT))), ENCODER_CCW_CW(G(KC_LEFT), G(KC_RGHT))}};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Default timeout for displaying logo on boot.
|
/* Default timeout for displaying logo on boot. */
|
||||||
#ifndef OLED_LOGO_TIMEOUT
|
#ifndef OLED_LOGO_TIMEOUT
|
||||||
// 10 second timeout.
|
/* 10 second timeout. */
|
||||||
# define OLED_LOGO_TIMEOUT 10000
|
# define OLED_LOGO_TIMEOUT 10000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -212,7 +211,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void render_qmk_logo(void) {
|
static void render_qmk_logo(void) {
|
||||||
static const char PROGMEM qmk_logo[] = {// 'qmk_via_OLED_128x64', 64x128px
|
static const char PROGMEM qmk_logo[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x71, 0x71, 0x71, 0x71, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x71, 0x71, 0x71, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf1, 0xf1, 0xe3, 0xe3, 0xe3, 0x00, 0x00, 0x00, 0xe3, 0xe3, 0xf3, 0xf1, 0xf1,
|
0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x71, 0x71, 0x71, 0x71, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x71, 0x71, 0x71, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf1, 0xf1, 0xe3, 0xe3, 0xe3, 0x00, 0x00, 0x00, 0xe3, 0xe3, 0xf3, 0xf1, 0xf1,
|
||||||
0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
@ -223,7 +222,7 @@ static void render_qmk_logo(void) {
|
|||||||
oled_write_raw_P(qmk_logo, sizeof(qmk_logo));
|
oled_write_raw_P(qmk_logo, sizeof(qmk_logo));
|
||||||
}
|
}
|
||||||
static void render_logo(void) {
|
static void render_logo(void) {
|
||||||
static const char PROGMEM sofle_pico_logo[] = {// 'sofle-pico-vector-logo-v5 OLED chopped', 64x128px
|
static const char PROGMEM sofle_pico_logo[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0x70, 0xf0, 0xf0, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf8, 0xfc, 0x3c, 0x3c, 0x3c, 0x7c, 0xf8, 0xf8, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x3f, 0x3f, 0x3f, 0x7c, 0x78, 0xf8, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0x3c, 0x1c, 0x1e, 0x1e, 0x3c, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xce, 0xce, 0xce, 0xdc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x1e, 0x1e, 0x3c, 0x3c, 0x3c, 0x3e, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x01, 0x07,
|
0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0x70, 0xf0, 0xf0, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf8, 0xfc, 0x3c, 0x3c, 0x3c, 0x7c, 0xf8, 0xf8, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x3f, 0x3f, 0x3f, 0x7c, 0x78, 0xf8, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0x3c, 0x1c, 0x1e, 0x1e, 0x3c, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xce, 0xce, 0xce, 0xdc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x1e, 0x1e, 0x3c, 0x3c, 0x3c, 0x3e, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x01, 0x07,
|
||||||
0x0f, 0x1f, 0x1e, 0x3c, 0x3c, 0x3c, 0x1e, 0x1f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x3c, 0x1c, 0x1c, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x0e, 0x9e, 0xfc, 0xf8, 0x00, 0x00, 0x8e, 0x8e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xff, 0x83, 0x01, 0x01, 0x01, 0x83, 0x83, 0x00, 0x00, 0x7e, 0xff, 0xc7, 0x83, 0x01, 0x01, 0x01,
|
0x0f, 0x1f, 0x1e, 0x3c, 0x3c, 0x3c, 0x1e, 0x1f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x3c, 0x1c, 0x1c, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x0e, 0x9e, 0xfc, 0xf8, 0x00, 0x00, 0x8e, 0x8e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xff, 0x83, 0x01, 0x01, 0x01, 0x83, 0x83, 0x00, 0x00, 0x7e, 0xff, 0xc7, 0x83, 0x01, 0x01, 0x01,
|
||||||
0x83, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc3, 0xe3, 0xe0, 0xe0, 0xe0, 0xf0, 0x70, 0x70, 0x70, 0x70, 0x30, 0x33, 0x73, 0xe0, 0x60, 0xe0, 0xe0, 0xc0, 0xc1, 0x83, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x70, 0x30, 0x70, 0x70, 0x70, 0x70, 0x70, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xf8, 0xd0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0xc0, 0x80, 0x00, 0x01, 0x87, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0xff, 0x03, 0x01, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
0x83, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc3, 0xe3, 0xe0, 0xe0, 0xe0, 0xf0, 0x70, 0x70, 0x70, 0x70, 0x30, 0x33, 0x73, 0xe0, 0x60, 0xe0, 0xe0, 0xc0, 0xc1, 0x83, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x70, 0x30, 0x70, 0x70, 0x70, 0x70, 0x70, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xf8, 0xd0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0xc0, 0x80, 0x00, 0x01, 0x87, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0xff, 0x03, 0x01, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||||
@ -269,10 +268,10 @@ static void render_status(void) {
|
|||||||
bool oled_task_user(void) {
|
bool oled_task_user(void) {
|
||||||
static bool finished_logo = false;
|
static bool finished_logo = false;
|
||||||
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
|
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
|
||||||
// Display the logo for 5 seconds on boot.
|
/* Display the logo for 5 seconds on boot. */
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
render_logo();
|
render_logo();
|
||||||
// 10 Chars per line. Set cursor used to simplify line wraps.
|
/* 10 Chars per line. Set cursor used to simplify line wraps. */
|
||||||
oled_set_cursor(0, 12);
|
oled_set_cursor(0, 12);
|
||||||
oled_write_P(PSTR("v3.5.4"), false);
|
oled_write_P(PSTR("v3.5.4"), false);
|
||||||
oled_set_cursor(0, 13);
|
oled_set_cursor(0, 13);
|
||||||
@ -285,14 +284,15 @@ bool oled_task_user(void) {
|
|||||||
render_qmk_logo();
|
render_qmk_logo();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Display the current keyboard state.
|
/* Display the current keyboard state. */
|
||||||
if (!finished_logo) {
|
if (!finished_logo) {
|
||||||
finished_logo = true;
|
finished_logo = true;
|
||||||
// Clears the OLED.
|
/* Clears the OLED. */
|
||||||
oled_clear();
|
oled_clear();
|
||||||
}
|
}
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
/* Renders the current keyboard state (layer, lock, caps, scroll, etc) */
|
||||||
|
render_status();
|
||||||
} else {
|
} else {
|
||||||
render_logo();
|
render_logo();
|
||||||
}
|
}
|
||||||
|
@ -128,9 +128,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|
||||||
// Default timeout for displaying logo on boot.
|
/* Default timeout for displaying logo on boot. */
|
||||||
#ifndef OLED_LOGO_TIMEOUT
|
#ifndef OLED_LOGO_TIMEOUT
|
||||||
// 10 second timeout.
|
/* 10 second timeout. */
|
||||||
# define OLED_LOGO_TIMEOUT 10000
|
# define OLED_LOGO_TIMEOUT 10000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
uint16_t startup_timer;
|
uint16_t startup_timer;
|
||||||
|
|
||||||
static void render_status(void) {
|
static void render_status(void) {
|
||||||
// Print current mode
|
/* Print current mode */
|
||||||
oled_write_P(PSTR("\n\n"), false);
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
oled_write_ln_P(PSTR("MODE"), false);
|
oled_write_ln_P(PSTR("MODE"), false);
|
||||||
oled_write_ln_P(PSTR(""), false);
|
oled_write_ln_P(PSTR(""), false);
|
||||||
@ -159,7 +159,7 @@ static void render_status(void) {
|
|||||||
oled_write_P(PSTR("Undefined"), false);
|
oled_write_P(PSTR("Undefined"), false);
|
||||||
}
|
}
|
||||||
oled_write_P(PSTR("\n\n"), false);
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
// Print current layer
|
/* Print current layer */
|
||||||
oled_write_ln_P(PSTR("LAYER"), false);
|
oled_write_ln_P(PSTR("LAYER"), false);
|
||||||
switch (get_highest_layer(layer_state)) {
|
switch (get_highest_layer(layer_state)) {
|
||||||
case _COLEMAK:
|
case _COLEMAK:
|
||||||
@ -215,11 +215,11 @@ static void render_logo(void) {
|
|||||||
bool oled_task_user(void) {
|
bool oled_task_user(void) {
|
||||||
static bool finished_logo = false;
|
static bool finished_logo = false;
|
||||||
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
|
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
|
||||||
// Display the logo for 5 seconds on boot.
|
/* Display the logo for 5 seconds on boot. */
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
render_logo();
|
render_logo();
|
||||||
// Adding text below the partial screen logo requires oled_set_cursor.
|
/* Adding text below the partial screen logo requires oled_set_cursor. */
|
||||||
// There are 10 chars per line. Subsequent oled_set_cursor simplifies line wraps.
|
/* There are 10 chars per line. Subsequent oled_set_cursor simplifies line wraps. */
|
||||||
oled_set_cursor(0, 12);
|
oled_set_cursor(0, 12);
|
||||||
oled_write_ln_P(PSTR("v3.5.4"), false);
|
oled_write_ln_P(PSTR("v3.5.4"), false);
|
||||||
oled_set_cursor(0, 13);
|
oled_set_cursor(0, 13);
|
||||||
@ -232,14 +232,14 @@ bool oled_task_user(void) {
|
|||||||
render_qmk_logo();
|
render_qmk_logo();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Display the current keyboard state.
|
/* Display the current keyboard state. */
|
||||||
if (!finished_logo) {
|
if (!finished_logo) {
|
||||||
finished_logo = true;
|
finished_logo = true;
|
||||||
// Clears the OLED.
|
/* Clears the OLED. */
|
||||||
oled_clear();
|
oled_clear();
|
||||||
}
|
}
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
// Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
/* Renders the current keyboard state (layer, lock, caps, scroll, etc) */
|
||||||
render_status();
|
render_status();
|
||||||
} else {
|
} else {
|
||||||
render_logo();
|
render_logo();
|
||||||
@ -306,7 +306,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case KC_LSTRT:
|
case KC_LSTRT:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keymap_config.swap_lctl_lgui) {
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
// CMD-arrow on Mac, but we have CTL and GUI swapped
|
/* CMD-arrow on Mac, but we have CTL and GUI swapped */
|
||||||
register_mods(mod_config(MOD_LCTL));
|
register_mods(mod_config(MOD_LCTL));
|
||||||
register_code(KC_LEFT);
|
register_code(KC_LEFT);
|
||||||
} else {
|
} else {
|
||||||
@ -324,7 +324,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case KC_LEND:
|
case KC_LEND:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keymap_config.swap_lctl_lgui) {
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
// CMD-arrow on Mac, but we have CTL and GUI swapped
|
/* CMD-arrow on Mac, but we have CTL and GUI swapped */
|
||||||
register_mods(mod_config(MOD_LCTL));
|
register_mods(mod_config(MOD_LCTL));
|
||||||
register_code(KC_RIGHT);
|
register_code(KC_RIGHT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Default Bootmagic lite */
|
/* Bootmagic lite */
|
||||||
// Top left for left side is default in core
|
/* Top left for left side - this is default in core */
|
||||||
// Top right for right side
|
/* Top right for right side */
|
||||||
#ifndef BOOTMAGIC_LITE_ROW_RIGHT
|
#ifndef BOOTMAGIC_LITE_ROW_RIGHT
|
||||||
# define BOOTMAGIC_LITE_ROW_RIGHT 5
|
# define BOOTMAGIC_LITE_ROW_RIGHT 5
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user