diff options
| author | Ryan <fauxpark@gmail.com> | 2021-03-01 07:11:39 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-01 07:11:39 +1100 |
| commit | 1a7f2c8f453d4da6ed8622e52d5b788bc6dad480 (patch) | |
| tree | 1c65ce60dd863023173c4f18b2c78ba592703d54 /quantum/quantum.h | |
| parent | e6905805bb5e272187ae9a780ab1d345249efbc3 (diff) | |
| download | qmk_firmware-1a7f2c8f453d4da6ed8622e52d5b788bc6dad480.tar.gz qmk_firmware-1a7f2c8f453d4da6ed8622e52d5b788bc6dad480.zip | |
Extract sendstring into its own compilation unit (#12060)
* Extract sendstring into its own compilation unit
* License headers?
* Put this include in the header
Diffstat (limited to 'quantum/quantum.h')
| -rw-r--r-- | quantum/quantum.h | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/quantum/quantum.h b/quantum/quantum.h index 36a983d57..b1600dd72 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | #include "action_util.h" | 61 | #include "action_util.h" |
| 62 | #include "action_tapping.h" | 62 | #include "action_tapping.h" |
| 63 | #include "print.h" | 63 | #include "print.h" |
| 64 | #include "send_string_keycodes.h" | 64 | #include "send_string.h" |
| 65 | #include "suspend.h" | 65 | #include "suspend.h" |
| 66 | #include <stddef.h> | 66 | #include <stddef.h> |
| 67 | #include <stdlib.h> | 67 | #include <stdlib.h> |
| @@ -231,31 +231,6 @@ extern layer_state_t layer_state; | |||
| 231 | # define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) | 231 | # define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) |
| 232 | 232 | ||
| 233 | #endif | 233 | #endif |
| 234 | #define SEND_STRING(string) send_string_P(PSTR(string)) | ||
| 235 | #define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval) | ||
| 236 | |||
| 237 | // Look-Up Tables (LUTs) to convert ASCII character to keycode sequence. | ||
| 238 | extern const uint8_t ascii_to_keycode_lut[128]; | ||
| 239 | extern const uint8_t ascii_to_shift_lut[16]; | ||
| 240 | extern const uint8_t ascii_to_altgr_lut[16]; | ||
| 241 | extern const uint8_t ascii_to_dead_lut[16]; | ||
| 242 | // clang-format off | ||
| 243 | #define KCLUT_ENTRY(a, b, c, d, e, f, g, h) \ | ||
| 244 | ( ((a) ? 1 : 0) << 0 \ | ||
| 245 | | ((b) ? 1 : 0) << 1 \ | ||
| 246 | | ((c) ? 1 : 0) << 2 \ | ||
| 247 | | ((d) ? 1 : 0) << 3 \ | ||
| 248 | | ((e) ? 1 : 0) << 4 \ | ||
| 249 | | ((f) ? 1 : 0) << 5 \ | ||
| 250 | | ((g) ? 1 : 0) << 6 \ | ||
| 251 | | ((h) ? 1 : 0) << 7 ) | ||
| 252 | // clang-format on | ||
| 253 | |||
| 254 | void send_string(const char *str); | ||
| 255 | void send_string_with_delay(const char *str, uint8_t interval); | ||
| 256 | void send_string_P(const char *str); | ||
| 257 | void send_string_with_delay_P(const char *str, uint8_t interval); | ||
| 258 | void send_char(char ascii_code); | ||
| 259 | 234 | ||
| 260 | // For tri-layer | 235 | // For tri-layer |
| 261 | void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); | 236 | void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); |
