You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
733 B

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