-
-
Notifications
You must be signed in to change notification settings - Fork 40.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace serial.c of quantum/split_common/ #4669
Replace serial.c of quantum/split_common/ #4669
Conversation
Remove buffer name and buffer size from serial.c. They should be placed in the caller(matrix.c, split_utils.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.
…t_common." This reverts commit 168c82e.
avr-gcc 4.9.[23] report error. avr-gcc 5.4.0, avr-gcc 7.3.0 pass. It is funny.
@@ -55,13 +52,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
static bool debouncing = false; | |||
#endif | |||
|
|||
#if defined(USE_I2C) || defined(EH) | |||
|
|||
#if (MATRIX_COLS <= 8) | |||
# define print_matrix_header() print("\nr/c 01234567\n") | |||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) | |||
# define matrix_bitpop(i) bitpop(matrix[i]) | |||
# define ROW_SHIFTER ((uint8_t)1) | |||
#else | |||
# error "Currently only supports 8 COLS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it helps here, or it's something that you'd want to look into later ...
But the Orthodox keyboard supports 9 columns over serial and I2C. It may be worth checking out it's code and pulling the fix there and porting it over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I think #if
is necessary.
Since this pull-request deals with the change of serial.c, I think that i2c.c should maintain the current state without changing it. .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
@nooges @That-Canadian Would you mind taking a look? |
#ifdef BACKLIGHT_ENABLE | ||
uint8_t backlight_level; | ||
#endif | ||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is RGBLIGHT_SPLIT
used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through the serial, there is a keyboard that needs to transfer rgblight_config. Also, some keyboards do not need to transfer rgblight_config through serial. I thought so, so I wrote RGBLIGHT_SPLIT. But this is uncertain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically, some boards like the helix (and derived boards) don't transport the rgb data over the TRRS jack, so it still needs a way to communicate between halves.
Eg, this is for compatibility when the helix and crkbd (aka heli-dox) can be converted to the split common code.
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | ||
// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note here on mode 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 of SELECT_SOFT_SERIAL_SPEED is an experimental value. I experimented to confirm that there was enough room, but I think that I should not be used regularly. Therefore, it hid in the header file.
Other than a couple comments, looks good to me. |
Thanks! |
Merge branch 'master' into messingabout * master: (131 commits) Improve diagnostics for build hashes XMMX refactor, Configurator support and readme update (qmk#4722) Chibios_test/stm32_f072_onekey: Add support for reset to bootloader (qmk#4238) Add tsangan layout to dz60 with a "sane" default keymap (qmk#4717) Redox: Configurator bugfix (qmk#4721) Replace serial.c of quantum/split_common/ (qmk#4669) Toad Configurator support and readme update (qmk#4718) Keymap: fix userspace compile error with planck grid (qmk#4719) First PR for KBD6x HHKB layout keymap (qmk#4704) [Miuni32] Update the # of LEDs to match the final version of PCB (qmk#4714) Noxary x268: refactor and Configurator bugfix (qmk#4713) shell.nix: Packages relocated in upstream cleanup JD40 refactor and readme update (qmk#4710) Keyboard: Infinity60 refactor, Configurator support and readme update (qmk#4707) Update Vinta (qmk#4705) Add crd's XD60 ANSI keymap (qmk#4702) Keymap: Redox / jeherve: updates (qmk#4694) Update keymap for planck/rev6 (qmk#4701) handwired/not_so_minidox: Configurator support (qmk#4699) Feature Unicode example code fixed. ...
* 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
* 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
* 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
Description
Replaced serial.c of quantum/split_common with helix-serial.c.
And matrix.c and split_util.c changed the interface between serial.c to use the NEW API.
Types of changes
Issues Fixed or Closed by this PR
Checklist: