diff options
author | Danny <nooges@users.noreply.github.com> | 2019-02-12 19:57:24 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-02-12 16:57:24 -0800 |
commit | b2ee290c9f506e42dd9c4577c8147646c405aeb0 (patch) | |
tree | 4338c3ee37d2f8380c24624a24d8a4cb81d54693 /keyboards/keebio/bfo9000/serial.h | |
parent | 994852712dbd183e2c764d624ae8ba7d3efb385a (diff) | |
download | qmk_firmware-b2ee290c9f506e42dd9c4577c8147646c405aeb0.tar.gz qmk_firmware-b2ee290c9f506e42dd9c4577c8147646c405aeb0.zip |
[Keyboard] Move Keebio boards to own folder (#5109)
* Move boards into keebio folder
* Rename keymap
* Update BDN9 files
* Update BFO-9000 files
* Update Chocopad files
* Update Dilly files
* Update Fourier files, collapse rev1 into main
* Update Iris files
* Update Laplace files
* Update Levinson files, fix buswerks keymap
* Update Nyquist files
* Fix keymap issues
* Update Quefrency files
* Update Rorschach files
* Update TF68 files
* Update Viterbi files
* Update Viterbi files
* Update Wavelet files
* Reformat default layout
* Fix up default folder for Iris
* Remove already defined aliases
Diffstat (limited to 'keyboards/keebio/bfo9000/serial.h')
-rw-r--r-- | keyboards/keebio/bfo9000/serial.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/keyboards/keebio/bfo9000/serial.h b/keyboards/keebio/bfo9000/serial.h new file mode 100644 index 0000000000..6276194572 --- /dev/null +++ b/keyboards/keebio/bfo9000/serial.h @@ -0,0 +1,27 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include "matrix.h" +#include <stdbool.h> + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif |