Skip to content

Print an error when serial number is invalid #691

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 2 commits into from
Oct 4, 2017
Merged

Print an error when serial number is invalid #691

merged 2 commits into from
Oct 4, 2017

Conversation

copercini
Copy link
Contributor

No description provided.

@@ -14,6 +14,10 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
if(_uart) {
end();
}
if(0 > _uart_nr || _uart_nr > 2) {
log_e("Serial number is invalid, please use 0, 1 or 2");
end();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for end(). this if can be the first thing in the function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :D

@me-no-dev me-no-dev merged commit 171032b into espressif:master Oct 4, 2017
@me-no-dev
Copy link
Member

and done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants