diff options
| author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2018-12-25 04:14:57 +0900 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-12-24 11:14:57 -0800 |
| commit | 72d4e4bfd76b2c83b89787f8b3a8ba779a3e8d81 (patch) | |
| tree | 694d3d9251aa752c11788e1e8550cba0cb78578b /quantum/split_common/matrix.h | |
| parent | 2149f3b5889f898fecde845a03d61c1a854d9393 (diff) | |
| download | qmk_firmware-72d4e4bfd76b2c83b89787f8b3a8ba779a3e8d81.tar.gz qmk_firmware-72d4e4bfd76b2c83b89787f8b3a8ba779a3e8d81.zip | |
Replace serial.c of quantum/split_common/ (#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 168c82ef82c88e79979d9796bab9cc819cc2f685.
* 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
Diffstat (limited to 'quantum/split_common/matrix.h')
| -rw-r--r-- | quantum/split_common/matrix.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/quantum/split_common/matrix.h b/quantum/split_common/matrix.h new file mode 100644 index 000000000..b5cb45bae --- /dev/null +++ b/quantum/split_common/matrix.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #ifndef SPLIT_COMMON_MATRIX_H | ||
| 2 | #define SPLIT_COMMON_MATRIX_H | ||
| 3 | |||
| 4 | #include <common/matrix.h> | ||
| 5 | |||
| 6 | #ifdef RGBLIGHT_ENABLE | ||
| 7 | # include "rgblight.h" | ||
| 8 | #endif | ||
| 9 | |||
| 10 | typedef struct _Serial_m2s_buffer_t { | ||
| 11 | #ifdef BACKLIGHT_ENABLE | ||
| 12 | uint8_t backlight_level; | ||
| 13 | #endif | ||
| 14 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 15 | rgblight_config_t rgblight_config; //not yet use | ||
| 16 | // | ||
| 17 | // When MCUs on both sides drive their respective RGB LED chains, | ||
| 18 | // it is necessary to synchronize, so it is necessary to communicate RGB information. | ||
| 19 | // In that case, define the RGBLIGHT_SPLIT macro. | ||
| 20 | // | ||
| 21 | // Otherwise, if the master side MCU drives both sides RGB LED chains, | ||
| 22 | // there is no need to communicate. | ||
| 23 | #endif | ||
| 24 | } Serial_m2s_buffer_t; | ||
| 25 | |||
| 26 | extern volatile Serial_m2s_buffer_t serial_m2s_buffer; | ||
| 27 | |||
| 28 | void serial_master_init(void); | ||
| 29 | void serial_slave_init(void); | ||
| 30 | |||
| 31 | #endif | ||
