summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/matrix.c6
-rw-r--r--quantum/rgb_matrix.c10
-rw-r--r--quantum/rgblight.c2
-rw-r--r--quantum/send_string_keycodes.h363
4 files changed, 208 insertions, 173 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 5337e2626b..3600d4e7b5 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -148,12 +148,6 @@ uint8_t matrix_cols(void) {
void matrix_init(void) {
- // To use PORTF disable JTAG with writing JTD bit twice within four cycles.
- #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
- MCUCR |= _BV(JTD);
- MCUCR |= _BV(JTD);
- #endif
-
// initialize row and col
#if (DIODE_DIRECTION == COL2ROW)
unselect_rows();
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 874573bb24..b4bbc3dc07 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -41,6 +41,10 @@ rgb_config_t rgb_matrix_config;
#define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT
#endif
+#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > 255
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#endif
+
bool g_suspend_state = false;
// Global tick at 20 Hz
@@ -68,7 +72,7 @@ void eeconfig_update_rgb_matrix_default(void) {
rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT;
rgb_matrix_config.hue = 0;
rgb_matrix_config.sat = 255;
- rgb_matrix_config.val = 255;
+ rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
rgb_matrix_config.speed = 0;
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
@@ -860,12 +864,12 @@ void rgblight_decrease_sat(void) {
}
void rgblight_increase_val(void) {
- rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, 255 );
+ rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS );
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgblight_decrease_val(void) {
- rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, 255 );
+ rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS );
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 8b2a3cd9f8..4e2671d243 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -48,7 +48,6 @@ const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024};
rgblight_config_t rgblight_config;
LED_TYPE led[RGBLED_NUM];
-uint8_t rgblight_inited = 0;
bool rgblight_timer_enabled = false;
void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
@@ -142,7 +141,6 @@ void eeconfig_debug_rgblight(void) {
void rgblight_init(void) {
debug_enable = 1; // Debug ON!
dprintf("rgblight_init called.\n");
- rgblight_inited = 1;
dprintf("rgblight_init start!\n");
if (!eeconfig_is_enabled()) {
dprintf("rgblight_init eeconfig is not enabled.\n");
diff --git a/quantum/send_string_keycodes.h b/quantum/send_string_keycodes.h
index 0e308be508..82195f6e55 100644
--- a/quantum/send_string_keycodes.h
+++ b/quantum/send_string_keycodes.h
@@ -1,168 +1,207 @@
#ifndef SEND_STRING_KEYCODES
#define SEND_STRING_KEYCODES
-#define X_NO 00
-#define X_ROLL_OVER 01
-#define X_POST_FAIL 02
-#define X_UNDEFINED 03
-#define X_A 04
-#define X_B 05
-#define X_C 06
-#define X_D 07
-#define X_E 08
-#define X_F 09
-#define X_G 0A
-#define X_H 0B
-#define X_I 0C
-#define X_J 0D
-#define X_K 0E
-#define X_L 0F
-#define X_M 10
-#define X_N 11
-#define X_O 12
-#define X_P 13
-#define X_Q 14
-#define X_R 15
-#define X_S 16
-#define X_T 17
-#define X_U 18
-#define X_V 19
-#define X_W 1A
-#define X_X 1B
-#define X_Y 1C
-#define X_Z 1D
-#define X_1 1E
-#define X_2 1F
-#define X_3 20
-#define X_4 21
-#define X_5 22
-#define X_6 23
-#define X_7 24
-#define X_8 25
-#define X_9 26
-#define X_0 27
-#define X_ENTER 28
-#define X_ESCAPE 29
-#define X_BSPACE 2A
-#define X_TAB 2B
-#define X_SPACE 2C
-#define X_MINUS 2D
-#define X_EQUAL 2E
-#define X_LBRACKET 2F
-#define X_RBRACKET 30
-#define X_BSLASH 31
-#define X_NONUS_HASH 32
-#define X_SCOLON 33
-#define X_QUOTE 34
-#define X_GRAVE 35
-#define X_COMMA 36
-#define X_DOT 37
-#define X_SLASH 38
-#define X_CAPSLOCK 39
-#define X_F1 3A
-#define X_F2 3B
-#define X_F3 3C
-#define X_F4 3D
-#define X_F5 3E
-#define X_F6 3F
-#define X_F7 40
-#define X_F8 41
-#define X_F9 42
-#define X_F10 43
-#define X_F11 44
-#define X_F12 45
-#define X_PSCREEN 46
-#define X_SCROLLLOCK 47
-#define X_PAUSE 48
-#define X_INSERT 49
-#define X_HOME 4A
-#define X_PGUP 4B
-#define X_DELETE 4C
-#define X_END 4D
-#define X_PGDOWN 4E
-#define X_RIGHT 4F
-#define X_LEFT 50
-#define X_DOWN 51
-#define X_UP 52
-#define X_NUMLOCK 53
-#define X_KP_SLASH 54
-#define X_KP_ASTERISK 55
-#define X_KP_MINUS 56
-#define X_KP_PLUS 57
-#define X_KP_ENTER 58
-#define X_KP_1 59
-#define X_KP_2 5A
-#define X_KP_3 5B
-#define X_KP_4 5C
-#define X_KP_5 5D
-#define X_KP_6 5E
-#define X_KP_7 5F
-#define X_KP_8 60
-#define X_KP_9 61
-#define X_KP_0 62
-#define X_KP_DOT 63
-#define X_NONUS_BSLASH 64
-#define X_APPLICATION 65
-#define X_POWER 66
-#define X_KP_EQUAL 67
-#define X_F13 68
-#define X_F14 69
-#define X_F15 6A
-#define X_F16 6B
-#define X_F17 6C
-#define X_F18 6D
-#define X_F19 6E
-#define X_F20 6F
-#define X_F21 70
-#define X_F22 71
-#define X_F23 72
-#define X_F24 73
-#define X_EXECUTE 74
-#define X_HELP 75
-#define X_MENU 76
-#define X_SELECT 77
-#define X_STOP 78
-#define X_AGAIN 79
-#define X_UNDO 7A
-#define X_CUT 7B
-#define X_COPY 7C
-#define X_PASTE 7D
-#define X_FIND 7E
-#define X__MUTE 7F
-#define X__VOLUP 80
-#define X__VOLDOWN 81
-#define X_LOCKING_CAPS 82
-#define X_LOCKING_NUM 83
-#define X_LOCKING_SCROLL 84
-#define X_KP_COMMA 85
-#define X_KP_EQUAL_AS400 86
-#define X_INT1 87
-#define X_INT2 88
-#define X_INT3 89
-#define X_INT4 8A
-#define X_INT5 8B
-#define X_INT6 8C
-#define X_INT7 8D
-#define X_INT8 8E
-#define X_INT9 8F
-#define X_LANG1 90
-#define X_LANG2 91
-#define X_LANG3 92
-#define X_LANG4 93
-#define X_LANG5 94
-#define X_LANG6 95
-#define X_LANG7 96
-#define X_LANG8 97
-#define X_LANG9 98
+#define X_NO 00
+#define X_ROLL_OVER 01
+#define X_POST_FAIL 02
+#define X_UNDEFINED 03
+#define X_A 04
+#define X_B 05
+#define X_C 06
+#define X_D 07
+#define X_E 08
+#define X_F 09
+#define X_G 0a
+#define X_H 0b
+#define X_I 0c
+#define X_J 0d
+#define X_K 0e
+#define X_L 0f
+#define X_M 10
+#define X_N 11
+#define X_O 12
+#define X_P 13
+#define X_Q 14
+#define X_R 15
+#define X_S 16
+#define X_T 17
+#define X_U 18
+#define X_V 19
+#define X_W 1a
+#define X_X 1b
+#define X_Y 1c
+#define X_Z 1d
+#define X_1 1e
+#define X_2 1f
+#define X_3 20
+#define X_4 21
+#define X_5 22
+#define X_6 23
+#define X_7 24
+#define X_8 25
+#define X_9 26
+#define X_0 27
+#define X_ENTER 28
+#define X_ESCAPE 29
+#define X_BSPACE 2a
+#define X_TAB 2b
+#define X_SPACE 2c
+#define X_MINUS 2d
+#define X_EQUAL 2e
+#define X_LBRACKET 2f
+#define X_RBRACKET 30
+#define X_BSLASH 31
+#define X_NONUS_HASH 32
+#define X_SCOLON 33
+#define X_QUOTE 34
+#define X_GRAVE 35
+#define X_COMMA 36
+#define X_DOT 37
+#define X_SLASH 38
+#define X_CAPSLOCK 39
+#define X_F1 3a
+#define X_F2 3b
+#define X_F3 3c
+#define X_F4 3d
+#define X_F5 3e
+#define X_F6 3f
+#define X_F7 40
+#define X_F8 41
+#define X_F9 42
+#define X_F10 43
+#define X_F11 44
+#define X_F12 45
+#define X_PSCREEN 46
+#define X_SCROLLLOCK 47
+#define X_PAUSE 48
+#define X_INSERT 49
+#define X_HOME 4a
+#define X_PGUP 4b
+#define X_DELETE 4c
+#define X_END 4d
+#define X_PGDOWN 4e
+#define X_RIGHT 4f
+#define X_LEFT 50
+#define X_DOWN 51
+#define X_UP 52
+#define X_NUMLOCK 53
+#define X_KP_SLASH 54
+#define X_KP_ASTERISK 55
+#define X_KP_MINUS 56
+#define X_KP_PLUS 57
+#define X_KP_ENTER 58
+#define X_KP_1 59
+#define X_KP_2 5a
+#define X_KP_3 5b
+#define X_KP_4 5c
+#define X_KP_5 5d
+#define X_KP_6 5e
+#define X_KP_7 5f
+#define X_KP_8 60
+#define X_KP_9 61
+#define X_KP_0 62
+#define X_KP_DOT 63
+#define X_NONUS_BSLASH 64
+#define X_APPLICATION 65
+#define X_POWER 66
+#define X_KP_EQUAL 67
+#define X_F13 68
+#define X_F14 69
+#define X_F15 6a
+#define X_F16 6b
+#define X_F17 6c
+#define X_F18 6d
+#define X_F19 6e
+#define X_F20 6f
+#define X_F21 70
+#define X_F22 71
+#define X_F23 72
+#define X_F24 73
+#define X_EXECUTE 74
+#define X_HELP 75
+#define X_MENU 76
+#define X_SELECT 77
+#define X_STOP 78
+#define X_AGAIN 79
+#define X_UNDO 7a
+#define X_CUT 7b
+#define X_COPY 7c
+#define X_PASTE 7d
+#define X_FIND 7e
+#define X__MUTE 7f
+#define X__VOLUP 80
+#define X__VOLDOWN 81
+#define X_LOCKING_CAPS 82
+#define X_LOCKING_NUM 83
+#define X_LOCKING_SCROLL 84
+#define X_KP_COMMA 85
+#define X_KP_EQUAL_AS400 86
+#define X_INT1 87
+#define X_INT2 88
+#define X_INT3 89
+#define X_INT4 8a
+#define X_INT5 8b
+#define X_INT6 8c
+#define X_INT7 8d
+#define X_INT8 8e
+#define X_INT9 8f
+#define X_LANG1 90
+#define X_LANG2 91
+#define X_LANG3 92
+#define X_LANG4 93
+#define X_LANG5 94
+#define X_LANG6 95
+#define X_LANG7 96
+#define X_LANG8 97
+#define X_LANG9 98
+#define X_ALT_ERASE 99
+#define X_SYSREQ 9a
+#define X_CANCEL 9b
+#define X_CLEAR 9c
+#define X_PRIOR 9d
+#define X_RETURN 9e
+#define X_SEPARATOR 9f
+#define X_OUT a0
+#define X_OPER a1
+#define X_CLEAR_AGAIN a2
+#define X_CRSEL a3
+#define X_EXSEL a4
/* Modifiers */
-#define X_LCTRL e0
-#define X_LSHIFT e1
-#define X_LALT e2
-#define X_LGUI e3
-#define X_RCTRL e4
-#define X_RSHIFT e5
-#define X_RALT e6
-#define X_RGUI e7
+#define X_LCTRL e0
+#define X_LSHIFT e1
+#define X_LALT e2
+#define X_LGUI e3
+#define X_RCTRL e4
+#define X_RSHIFT e5
+#define X_RALT e6
+#define X_RGUI e7
-#endif \ No newline at end of file
+/* System Control */
+#define X_SYSTEM_POWER a5
+#define X_SYSTEM_SLEEP a6
+#define X_SYSTEM_WAKE a7
+
+/* Media Control */
+#define X_AUDIO_MUTE a8
+#define X_AUDIO_VOL_UP a9
+#define X_AUDIO_VOL_DOWN aa
+#define X_MEDIA_NEXT_TRACK ab
+#define X_MEDIA_PREV_TRACK ac
+#define X_MEDIA_STOP ad
+#define X_MEDIA_PLAY_PAUSE ae
+#define X_MEDIA_SELECT af
+#define X_MEDIA_EJECT b0
+#define X_MAIL b1
+#define X_CALCULATOR b2
+#define X_MY_COMPUTER b3
+#define X_WWW_SEARCH b4
+#define X_WWW_HOME b5
+#define X_WWW_BACK b6
+#define X_WWW_FORWARD b7
+#define X_WWW_STOP b8
+#define X_WWW_REFRESH b9
+#define X_WWW_FAVORITES ba
+#define X_MEDIA_FAST_FORWARD bb
+#define X_MEDIA_REWIND bc
+#endif