diff options
author | Jack Humbert <[email protected]> | 2016-10-16 16:03:56 -0400 |
---|---|---|
committer | Jack Humbert <[email protected]> | 2016-10-16 16:03:56 -0400 |
commit | a889b899e2cf52b3b7807d8a7ad39f12e0761a10 (patch) | |
tree | 8c2bf722fe4f740a1c661b8d215f5b64e4a5f27b /keyboards/planck/keymaps/thermal_printer/config.h | |
parent | 5f91fb413624781ac79db641549b9e08753c04b5 (diff) | |
download | qmk_firmware-a889b899e2cf52b3b7807d8a7ad39f12e0761a10.tar.gz qmk_firmware-a889b899e2cf52b3b7807d8a7ad39f12e0761a10.zip |
working with power limit
Diffstat (limited to 'keyboards/planck/keymaps/thermal_printer/config.h')
-rw-r--r-- | keyboards/planck/keymaps/thermal_printer/config.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/thermal_printer/config.h b/keyboards/planck/keymaps/thermal_printer/config.h new file mode 100644 index 0000000000..430b6493cf --- /dev/null +++ b/keyboards/planck/keymaps/thermal_printer/config.h @@ -0,0 +1,23 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +# define SERIAL_UART_BAUD 19200 +# define SERIAL_UART_DATA UDR1 +# define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +# define SERIAL_UART_RXD_VECT USART1_RX_vect +# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +# define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX */ \ + UCSR1B = _BV(TXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + sei(); \ + } while(0) + + #endif
\ No newline at end of file |