]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/split_common/serial.h
Make quantum/split_common/serial.[ch] configurable (#4419)
[qmk_firmware.git] / quantum / split_common / serial.h
1 #ifndef MY_SERIAL_H
2 #define MY_SERIAL_H
3
4 #include <stdbool.h>
5
6 // /////////////////////////////////////////////////////////////////
7 // Need Soft Serial defines in config.h
8 // /////////////////////////////////////////////////////////////////
9 // ex.
10 //  /* Configuration of lower interface with the lower layer(hardware) of serial.c */
11 //  #define SOFT_SERIAL_PIN ??   // ?? = D0,D1,D2,D3,E6
12 //
13 //  /* Configuration of upper interface with the upper layer of serial.c */
14 //  #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
15 //  #define SERIAL_MASTER_BUFFER_LENGTH 1
16
17 // Buffers for master - slave communication
18 extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
19 extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
20
21 void serial_master_init(void);
22 void serial_slave_init(void);
23 int serial_update_buffers(void);
24 bool serial_slave_data_corrupt(void);
25
26 #endif