X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fchibios%2Fprintf.h;h=678a100c6e00b894cd9d1b992f7119d16dd35bff;hb=HEAD;hp=008131985f946ea2025c7344eb9d9a0ce1aa6a4a;hpb=27dec2db7bb33cc45b04b89b6855bac6b98de2e5;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common/chibios/printf.h b/tmk_core/common/chibios/printf.h index 00813198..678a100c 100644 --- a/tmk_core/common/chibios/printf.h +++ b/tmk_core/common/chibios/printf.h @@ -55,16 +55,16 @@ many embedded systems. To use the printf you need to supply your own character output function, something like : - void putc ( void* p, char c) - { - while (!SERIAL_PORT_EMPTY) ; - SERIAL_PORT_TX_REGISTER = c; - } + void putc ( void* p, char c) + { + while (!SERIAL_PORT_EMPTY) ; + SERIAL_PORT_TX_REGISTER = c; + } Before you can call printf you need to initialize it to use your character output function with something like: - init_printf(NULL,putc); + init_printf(NULL,putc); Notice the 'NULL' in 'init_printf' and the parameter 'void* p' in 'putc', the NULL (or any pointer) you pass into the 'init_printf' will eventually be