mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-24 01:17:07 +06:00
35efcc9f39
* improvement of crkbd communication functions (based on helix-keyboard) * Removed unnecessary code. * Changed read restriction from #define to #pragma once. * Changed from sizeof to defined size. * moved lib folder to crkbdroot. removed warning of ws2812.d
22 lines
677 B
C
22 lines
677 B
C
#pragma once
|
|
|
|
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
|
/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
|
|
#include "serial.h"
|
|
|
|
#else
|
|
/* --- USE flexible API (using multi-type transaction function) --- */
|
|
// Buffers for master - slave communication
|
|
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
|
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
|
|
|
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
|
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
|
extern uint8_t slave_buffer_change_count;
|
|
|
|
void serial_master_init(void);
|
|
void serial_slave_init(void);
|
|
int serial_update_buffers(int master_changed);
|
|
|
|
#endif
|