Skip to content

Generic Serial #424

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

Merged
merged 4 commits into from
Feb 11, 2019
Merged

Generic Serial #424

merged 4 commits into from
Feb 11, 2019

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Feb 1, 2019

This PR allows to have Serial mapped on SerialUSB if USB CDC is enabled.

If USB CDC is enabled then the generic "Serial" used will be SerialUSB
else this is the HardwareSerial if one is defined.

If Serial is defined before (build_opt.h, variant.h)
then this is the one used.

ISO for generic "serialEvent".

As generic "Serial" and "serialEvent" could be used by
HardwareSerial or USBSerial, defaut definition have to
be move away from uart to be properly wired.

Signed-off-by: Frederic.Pillon <[email protected]>
If USB CDC is enabled then the generic "Serial" used will be SerialUSB
else this is the HardwareSerial if one is defined.

If Serial is defined before (build_opt.h, variant.h)
then this is the one used.

ISO for generic "serialEvent".

Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm fpistm added the enhancement New feature or request label Feb 1, 2019
@fpistm fpistm added this to the 1.5.0 milestone Feb 1, 2019
@fpistm fpistm self-assigned this Feb 1, 2019
@fpistm fpistm mentioned this pull request Feb 1, 2019
5 tasks
@BennehBoy
Copy link
Contributor

BennehBoy commented Feb 1, 2019

Does this affect the naming sequence of the other Serial instances?

eg. will Serial3 become Serial 2 if Serial is remapped to USB?

@fpistm
Copy link
Member Author

fpistm commented Feb 1, 2019

@BennehBoy, no
Default instance naming is:

  • SerialX == U(S)ARTX
  • SerialUSB == CDC

Serial name is a defined to have a generic way to access default Serial.

Rename "Serial interface" to "U(S)ART support"
Rename "USB interface" to "USB support"
Add "USB speed" menu for USB speed: LS/FS/HS/HS in FS
Reword some descriptions

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm
Copy link
Member Author

fpistm commented Feb 2, 2019

I've updated/reword the menu to have better description and usage.
Let me know what you think.
image
image
image

This will allow ease to introduce further USB Class support (MSC, Midi,...)

@BennehBoy
Copy link
Contributor

Looks good

@fpistm fpistm merged commit 830bb00 into stm32duino:master Feb 11, 2019
@fpistm fpistm deleted the GenericSerial branch February 11, 2019 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants