|
@@ -0,0 +1,60 @@
|
|
1
|
+/**
|
|
2
|
+ * Marlin 3D Printer Firmware
|
|
3
|
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
4
|
+ *
|
|
5
|
+ * This program is free software: you can redistribute it and/or modify
|
|
6
|
+ * it under the terms of the GNU General Public License as published by
|
|
7
|
+ * the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+ * (at your option) any later version.
|
|
9
|
+ *
|
|
10
|
+ * This program is distributed in the hope that it will be useful,
|
|
11
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+ * GNU General Public License for more details.
|
|
14
|
+ *
|
|
15
|
+ * You should have received a copy of the GNU General Public License
|
|
16
|
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+ *
|
|
18
|
+ */
|
|
19
|
+#ifdef __STM32F1__
|
|
20
|
+
|
|
21
|
+/**
|
|
22
|
+ * Empty class for Software Serial implementation (Custom RX/TX pins)
|
|
23
|
+ *
|
|
24
|
+ * TODO: Optionally use https://github.com/FYSETC/SoftwareSerialM if TMC UART is wanted
|
|
25
|
+ */
|
|
26
|
+
|
|
27
|
+#include "SoftwareSerial.h"
|
|
28
|
+
|
|
29
|
+// Constructor
|
|
30
|
+
|
|
31
|
+SoftwareSerial::SoftwareSerial(pin_t RX_pin, pin_t TX_pin) {}
|
|
32
|
+
|
|
33
|
+// Public
|
|
34
|
+
|
|
35
|
+void SoftwareSerial::begin(const uint32_t baudrate) {
|
|
36
|
+}
|
|
37
|
+
|
|
38
|
+bool SoftwareSerial::available() {
|
|
39
|
+ return false;
|
|
40
|
+}
|
|
41
|
+
|
|
42
|
+uint8_t SoftwareSerial::read() {
|
|
43
|
+ return 0;
|
|
44
|
+}
|
|
45
|
+
|
|
46
|
+uint16_t SoftwareSerial::write(uint8_t byte) {
|
|
47
|
+ return 0;
|
|
48
|
+}
|
|
49
|
+
|
|
50
|
+void SoftwareSerial::flush() {}
|
|
51
|
+
|
|
52
|
+void SoftwareSerial::listen() {
|
|
53
|
+ listening = true;
|
|
54
|
+}
|
|
55
|
+
|
|
56
|
+void SoftwareSerial::stopListening() {
|
|
57
|
+ listening = false;
|
|
58
|
+}
|
|
59
|
+
|
|
60
|
+#endif //__STM32F1__
|