diff options
author | cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info> | 2016-11-29 12:20:26 -0500 |
---|---|---|
committer | cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info> | 2016-11-29 12:20:26 -0500 |
commit | ff1b563e851858a291ac226bc7e31055c7da6618 (patch) | |
tree | 8367dd5ef812baf644e1c54ba900dab3f042f0fa /keyboards/planck/keymaps/thermal_printer/config.h | |
parent | 5776f39667c82e1053b46fd12d8c6faa5b5acf81 (diff) | |
parent | 81ea909467c8a5bfbd803c58e685c5de74dbc249 (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
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 |