Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Arduino_lib/SerialClass.cpp
- Revision:
- 0:b1ce54272580
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Arduino_lib/SerialClass.cpp Sat Jan 18 15:06:35 2020 +0000
@@ -0,0 +1,30 @@
+/*
+#include "SerialClass.h"
+
+size_t SerialClass::write(uint8_t data) {
+ return write(&data, 1);
+}
+
+size_t SerialClass::write(const uint8_t *buffer, size_t size) {
+ uint8_t *pBuffer = (uint8_t*)buffer;
+ HAL_UART_Transmit(pUART_Handle, pBuffer, size, HAL_MAX_DELAY);
+ return size;
+}
+
+int SerialClass::read() {
+ uint8_t data;
+ HAL_UART_Receive(pUART_Handle, &data, 1, HAL_MAX_DELAY);
+ return data;
+}
+
+int SerialClass::available() {
+ return -1;
+}
+
+int SerialClass::peek() {
+ return -1;
+}
+
+void SerialClass::flush() {
+}
+*/