forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace serial.c of quantum/split_common/ (qmk#4669)
* Add provisional Helix implementation to test the quantum/split_common. * copy keyboards/helix/serial.[ch] to quantum/split_common/ * Make serial.c a pure driver. Remove buffer name and buffer size from serial.c. They should be placed in the caller(matrix.c, split_utils.c). * remove quantum/split_common/serial_backward_compatibility.h * Changed array serial_master_buffer to structure serial_m2s_buffer. * Changed array serial_slave_buffer to structure serial_s2m_buffer. * Change keyboards/miniaxe/matrix.c I also made changes to quantum/split_comon/matrix.c to keyboards/miniaxe/matrix.c. Note: I contacted @ka2hiro, creator of miniaxe, and I got permission to change keyboards/miniaxe/matrix.c. * update history comment in quantum/split_common/serial.c * Revert "Add provisional Helix implementation to test the quantum/split_common." This reverts commit 168c82e. * fix keyboards/miniaxe/matrix.c, quantum/split_common/matrix.c avr-gcc 4.9.[23] report error. avr-gcc 5.4.0, avr-gcc 7.3.0 pass. It is funny. * update comment quantum/split_common/serial.c * Reserve RGBLIGHT_SPLIT macro in quantum/split_common
- Loading branch information
Showing
9 changed files
with
578 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef SPLIT_COMMON_MATRIX_H | ||
#define SPLIT_COMMON_MATRIX_H | ||
|
||
#include <common/matrix.h> | ||
|
||
#ifdef RGBLIGHT_ENABLE | ||
# include "rgblight.h" | ||
#endif | ||
|
||
typedef struct _Serial_m2s_buffer_t { | ||
#ifdef BACKLIGHT_ENABLE | ||
uint8_t backlight_level; | ||
#endif | ||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
rgblight_config_t rgblight_config; //not yet use | ||
// | ||
// When MCUs on both sides drive their respective RGB LED chains, | ||
// it is necessary to synchronize, so it is necessary to communicate RGB information. | ||
// In that case, define the RGBLIGHT_SPLIT macro. | ||
// | ||
// Otherwise, if the master side MCU drives both sides RGB LED chains, | ||
// there is no need to communicate. | ||
#endif | ||
} Serial_m2s_buffer_t; | ||
|
||
extern volatile Serial_m2s_buffer_t serial_m2s_buffer; | ||
|
||
void serial_master_init(void); | ||
void serial_slave_init(void); | ||
|
||
#endif |
Oops, something went wrong.