summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_printer_bb.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-02-12 10:29:31 -0800
committerGitHub <noreply@github.com>2022-02-12 18:29:31 +0000
commit63646e8906e062d1c1de3925cba70c4e3426a855 (patch)
tree4e91648b77b838e1125cf86331d7e84bde6d07a9 /quantum/process_keycode/process_printer_bb.c
parentafcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff)
downloadqmk_firmware-63646e8906e062d1c1de3925cba70c4e3426a855.tar.gz
qmk_firmware-63646e8906e062d1c1de3925cba70c4e3426a855.zip
Format code according to conventions (#16322)
Diffstat (limited to 'quantum/process_keycode/process_printer_bb.c')
-rw-r--r--quantum/process_keycode/process_printer_bb.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c
index 6c91bd27ef..88a9f33994 100644
--- a/quantum/process_keycode/process_printer_bb.c
+++ b/quantum/process_keycode/process_printer_bb.c
@@ -25,13 +25,21 @@ uint8_t character_shift = 0;
#define SERIAL_PIN_MASK _BV(PD3)
#define SERIAL_DELAY 52
-inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); }
+inline static void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
-inline static void serial_high(void) { SERIAL_PIN_PORT |= SERIAL_PIN_MASK; }
+inline static void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
-inline static void serial_low(void) { SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; }
+inline static void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
-inline static void serial_output(void) { SERIAL_PIN_DDR |= SERIAL_PIN_MASK; }
+inline static void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
void enable_printing() {
printing_enabled = true;
@@ -39,7 +47,9 @@ void enable_printing() {
serial_high();
}
-void disable_printing() { printing_enabled = false; }
+void disable_printing() {
+ printing_enabled = false;
+}
uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0x28, 0x29};
@@ -61,7 +71,8 @@ void print_char(char c) {
}
void print_string(char c[]) {
- for (uint8_t i = 0; i < strlen(c); i++) print_char(c[i]);
+ for (uint8_t i = 0; i < strlen(c); i++)
+ print_char(c[i]);
}
bool process_printer(uint16_t keycode, keyrecord_t *record) {