Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[SoftwareSerial] Fix analog pins usage#1094

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 1 commit intostm32duino:masterfromfpistm:swserial
Jun 10, 2020
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletionslibraries/SoftwareSerial/src/SoftwareSerial.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -317,12 +317,12 @@ SoftwareSerial::SoftwareSerial(uint16_t receivePin, uint16_t transmitPin, bool i
_receive_buffer_tail(0),
_receive_buffer_head(0)
{
if ((receivePin < NUM_DIGITAL_PINS) || (transmitPin < NUM_DIGITAL_PINS)) {
/* Enable GPIO clock for tx and rx pin*/
set_GPIO_Port_Clock(STM_PORT(digitalPinToPinName(transmitPin)));
set_GPIO_Port_Clock(STM_PORT(digitalPinToPinName(receivePin)));
} else {
_Error_Handler("ERROR: invalid pin number\n", -1);
/* Enable GPIO clock for tx and rx pin*/
if (set_GPIO_Port_Clock(STM_PORT(digitalPinToPinName(transmitPin))) == 0) {
_Error_Handler("ERROR: invalid transmit pin number\n", -1);
}
if ((!_half_duplex) && (set_GPIO_Port_Clock(STM_PORT(digitalPinToPinName(receivePin))) == 0)) {
_Error_Handler("ERROR: invalidreceivepin number\n", -1);
}
}

Expand DownExpand Up@@ -421,4 +421,4 @@ int SoftwareSerial::peek()
void SoftwareSerial::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority)
{
timer.setInterruptPriority(preemptPriority, subPriority);
}
}

[8]ページ先頭

©2009-2025 Movatter.jp