qmk

QMK Firmware
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

split_scomm.h (733B)


      1 #ifndef SPLIT_COMM_H
      2 #define SPLIT_COMM_H
      3 
      4 #ifndef SERIAL_USE_MULTI_TRANSACTION
      5 /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
      6 #include "serial.h"
      7 
      8 #else
      9 /* --- USE flexible API (using multi-type transaction function) --- */
     10 // Buffers for master - slave communication
     11 #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
     12 #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
     13 
     14 extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
     15 extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
     16 extern uint8_t slave_buffer_change_count;
     17 
     18 void serial_master_init(void);
     19 void serial_slave_init(void);
     20 int serial_update_buffers(int master_changed);
     21 
     22 #endif
     23 
     24 #endif /* SPLIT_COMM_H */