Verified Commit b606238b authored by Valérianne's avatar Valérianne 💬
Browse files

clang-format files

parent 2c220c81
......@@ -20,19 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define MANUFACTURER Dashie
#define DESCRIPTION A custom keyboard by dashie
#define DESCRIPTION A custom keyboard by dashie
#if KEYBOARD_REV == v3
#define DEVICE_VER 0x0002
#define PRODUCT dashie_keys_v3
# define DEVICE_VER 0x0002
# define PRODUCT dashie_keys_v3
/* key matrix size */
#define MATRIX_ROWS 9
#define MATRIX_COLS 14
# define MATRIX_ROWS 9
# define MATRIX_COLS 14
/*
* Keyboard Matrix Assignments
......@@ -53,16 +53,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS
// clang-format on
#define RGB_DI_PIN E7
# define RGB_DI_PIN E7
#elif KEYBOARD_REV == v2
#define DEVICE_VER 0x0001
#define PRODUCT dashie_keys_v2
# define DEVICE_VER 0x0001
# define PRODUCT dashie_keys_v2
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 14
# define MATRIX_ROWS 8
# define MATRIX_COLS 14
/*
* Keyboard Matrix Assignments
......@@ -87,7 +87,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define RGB_DI_PIN E7
#else
#error Unsupported keyboard rev
# error Unsupported keyboard rev
#endif
/* COL2ROW, ROW2COL */
......@@ -111,7 +111,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef OLED_DRIVER_ENABLE
// Default is 60000
// If 0 then the display will never timeout when the keyboard is in use
#define OLED_TIMEOUT 60000
# define OLED_TIMEOUT 60000
#endif
#ifdef RGB_DI_PIN
......@@ -133,7 +133,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// clang-format on
# define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
# define USB_MAX_POWER_CONSUMPTION 500
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
# define RGBLIGHT_ANIMATIONS
/*== or choose animations ==*/
......@@ -147,7 +147,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// # define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
// # define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// # define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
......
......@@ -15,10 +15,9 @@
*/
#if KEYBOARD_REV == v3
#include "dashie_keys_v3.h"
# include "dashie_keys_v3.h"
#elif KEYBOARD_REV == v2
#include "dashie_keys_v2.h"
# include "dashie_keys_v2.h"
#else
#error Unsupported keyboard rev
# error Unsupported keyboard rev
#endif
......@@ -34,16 +34,13 @@ enum unicode_names {
};
const uint32_t PROGMEM unicode_map[] = {
[PAWS] = 0x1F43E,
[SNEK] = 0x1F40D,
[PAWS] = 0x1F43E,
[SNEK] = 0x1F40D,
[HAMMER_AND_SICKLE] = 0x262D,
};
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN
};
enum layer_names { _BASE, _FN };
#if KEYBOARD_REV == v3
// clang-format off
......@@ -99,44 +96,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
#else
#error Unsupported keyboard rev
# error Unsupported keyboard rev
#endif
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// MACRODOWN only works in this function
switch (id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); }
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX);
}
void matrix_scan_user(void) {
}
void matrix_scan_user(void) {}
void led_set_user(uint8_t usb_led) {
}
void led_set_user(uint8_t usb_led) {}
static void render_logo(void) {
// clang-format off
// clang-format off
static const char PROGMEM raw_logo[] = {
0, 0, 0,224, 48, 16,240,128,192,112, 24,136,140, 4, 4,132, 68, 76,156, 54,230, 4, 12, 24,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
......@@ -151,13 +139,13 @@ static void render_logo(void) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
// clang-format on
oled_write_raw_P(raw_logo, sizeof(raw_logo));
// clang-format on
oled_write_raw_P(raw_logo, sizeof(raw_logo));
}
#ifdef OLED_DRIVER_ENABLE
static uint32_t oled_timer;
static bool is_asleep = false;
static bool is_asleep = false;
// clang-format off
static const char *ANIMATION_NAMES[] = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment