Format code according to conventions (#16322)
This commit is contained in:
parent
afcdd7079c
commit
63646e8906
345 changed files with 4916 additions and 3229 deletions
|
@ -142,9 +142,13 @@ __attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
|||
// Note: we bit-pack in "reverse" order to optimize loading
|
||||
#define PGM_LOADBIT(mem, pos) ((pgm_read_byte(&((mem)[(pos) / 8])) >> ((pos) % 8)) & 0x01)
|
||||
|
||||
void send_string(const char *str) { send_string_with_delay(str, 0); }
|
||||
void send_string(const char *str) {
|
||||
send_string_with_delay(str, 0);
|
||||
}
|
||||
|
||||
void send_string_P(const char *str) { send_string_with_delay_P(str, 0); }
|
||||
void send_string_P(const char *str) {
|
||||
send_string_with_delay_P(str, 0);
|
||||
}
|
||||
|
||||
void send_string_with_delay(const char *str, uint8_t interval) {
|
||||
while (1) {
|
||||
|
@ -173,7 +177,8 @@ void send_string_with_delay(const char *str, uint8_t interval) {
|
|||
ms += keycode - '0';
|
||||
keycode = *(++str);
|
||||
}
|
||||
while (ms--) wait_ms(1);
|
||||
while (ms--)
|
||||
wait_ms(1);
|
||||
}
|
||||
} else {
|
||||
send_char(ascii_code);
|
||||
|
@ -182,7 +187,8 @@ void send_string_with_delay(const char *str, uint8_t interval) {
|
|||
// interval
|
||||
{
|
||||
uint8_t ms = interval;
|
||||
while (ms--) wait_ms(1);
|
||||
while (ms--)
|
||||
wait_ms(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +220,8 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
|
|||
ms += keycode - '0';
|
||||
keycode = pgm_read_byte(++str);
|
||||
}
|
||||
while (ms--) wait_ms(1);
|
||||
while (ms--)
|
||||
wait_ms(1);
|
||||
}
|
||||
} else {
|
||||
send_char(ascii_code);
|
||||
|
@ -223,14 +230,15 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
|
|||
// interval
|
||||
{
|
||||
uint8_t ms = interval;
|
||||
while (ms--) wait_ms(1);
|
||||
while (ms--)
|
||||
wait_ms(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void send_char(char ascii_code) {
|
||||
#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL)
|
||||
if (ascii_code == '\a') { // BEL
|
||||
if (ascii_code == '\a') { // BEL
|
||||
PLAY_SONG(bell_song);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue