-
-
Notifications
You must be signed in to change notification settings - Fork 39.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
Make quantum/split_common/serial.[ch] configurable #4419
Make quantum/split_common/serial.[ch] configurable #4419
Conversation
…s.mk:SPLIT_KEYBOARD block
SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h
…boards/qwertyydox/rev1/config.h
…backward_compatibility.h
Rather than changing all of the files, it may make more sense to add: #ifndef SOFT_SERIAL_PIN
#define SOFT_SERIAL_PIN D0
#endif |
// #define SOFT_SERIAL_PIN D0 | ||
// #endif | ||
|
||
#ifndef SERIAL_SLAVE_BUFFER_LENGTH |
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.
Couldn't this be added to serial.h
, rather than using a separate file?
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.
Do not worry, this serial_backward_compatibility.h
will be deleted in the next phase.
// ///////////////////////////////////////////////////////////////// | ||
// ex. | ||
// /* Configuration of lower interface with the lower layer(hardware) of serial.c */ | ||
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 |
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.
Could define the default here:
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | |
#ifndef SOFT_SERIAL_PIN | |
#define SOFT_SERIAL_PIN D0 // D0,D1,D2,D3,E6, etc | |
#endif |
This way, there is no reason to define it elsewhere.
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.
see
#4419 (comment)
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | ||
// | ||
// /* Configuration of upper interface with the upper layer of serial.c */ | ||
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 |
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.
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | |
#ifndef SERIAL_SLAVE_BUFFER_LENGTH | |
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | |
#define SERIAL_MASTER_BUFFER_LENGTH 1 | |
#endif |
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.
see #4419 (comment)
@@ -7,6 +7,9 @@ | |||
#include <stdlib.h> | |||
#include "eeconfig.h" | |||
|
|||
// backlight level store index in serial_master_buffer[] for slave to read | |||
#define SERIAL_BACKLIT_START 0x00 |
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.
Shouldn't this be left in serial.h?
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.
see
#4419 (comment)
@@ -14,6 +14,59 @@ | |||
|
|||
#ifndef USE_I2C |
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.
This should probably be changed to something like
#ifndef USE_I2C | |
#if defined(USE_SERIAL) || (!defined(USE_I2C) && !defined(USE_SERIAL) ) |
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.
The USE_I2C,USE_SERIAL problem can be discussed by me or someone else in the next next phase. I will not change it now.
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 posted #4522. This is the solution to this problem I thought.
Yes, I know that. But I chose to add the definition of SOFT_SERIAL_PIN to each config.h. Because other drivers do not have a default value, so I think that serial.c should also have no default value. |
If that's the case, we're getting to the point where we NEED documentation for the SPLIT code. Though, on the flip side, for the boards that don't want to define a soft serial pin, and want to leave it using the same pin as i2c, this is essentially an added, unnecessary change for those boards. It also make porting new boards over more problematic (though, I think travis should catch that). |
Please do not do that discussion here. Let's discuss that in #4254 In here, I want to talk about whether serial.c should have default value or not. We can easily change it to have a default value at any time. However, If we want to explicitly define SOFT_SERIAL_PIN it is the easiest to do now. The more keyboards we add, the harder it is to work. So, now, I think that it is better to explicitly define SOFT_SERIAL_PIN. |
I do prefer that there be a default value for the serial pin to minimize overall code changes. |
Thanks! Now to phase 2? |
Thank you. I will start the next phase. |
* add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md
* add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md
* add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md
* add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md
quantum/split_common/serial.c change to helix-serial.c style serial configuration
This request does not change the compilation results.
reffer #3709, #4254.