Skip to content

Adding 9-bit support to the hardware serial UART #379

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
7 changes: 6 additions & 1 deletion cores/arduino/Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ void UART::begin(unsigned long baudrate, uint16_t config) {
uart_cfg.parity = UART_PARITY_ODD;
uart_cfg.stop_bits = UART_STOP_BITS_2;
break;
case SERIAL_9N1:
uart_cfg.data_bits = UART_DATA_BITS_9;
uart_cfg.parity = UART_PARITY_OFF;
uart_cfg.stop_bits = UART_STOP_BITS_1;
break;
}

uart_cfg.p_callback = UART::WrapperCallback;
Expand Down Expand Up @@ -335,4 +340,4 @@ size_t UART::write_raw(uint8_t* c, size_t len) {
i++;
}
return len;
}
}
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "framework-arduinorenesas-uno",
"version": "1.1.1",
"description": "Arduino Wiring-based Framework for Renesas MCUs (UNOR4 core)",
"keywords": [
"framework",
"arduino",
"renesas",
"RA"
],
"repository": {
"type": "git",
"url": "https://github.com/vashadow/ArduinoCore-renesas.git"
}
}
Loading