diff options
author | Erez Zukerman <bulk@ezuk.org> | 2016-11-29 08:16:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 08:16:04 -0500 |
commit | 51ae6da99edd732ccdec6e102bd757e08950d23b (patch) | |
tree | 53e316e1fbe468e0b1f65fd11e161ebc74c6ef70 /keyboards/planck/keymaps/thermal_printer/config.h | |
parent | 7b219a7f6016dfe80c1c3db33bcf859e3e355d8d (diff) | |
parent | f946d830f98da0161753d37da9659caa7469cf4f (diff) |
Merge pull request #918 from jackhumbert/wu5y7
Adds Ergodox EZ RGB lights (both sides using I2C) and implements API base, Midi SysEx API
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 |