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: Communication/RS485/RS485.cpp
- Revision:
- 30:8f092276b2ba
- Parent:
- 22:7d93f79a3686
- Child:
- 31:17be2176063f
diff -r 44d5454ce8fa -r 8f092276b2ba Communication/RS485/RS485.cpp
--- a/Communication/RS485/RS485.cpp Fri Oct 18 22:33:25 2019 +0000
+++ b/Communication/RS485/RS485.cpp Tue Oct 22 02:03:26 2019 +0000
@@ -9,7 +9,8 @@
DigitalOut selectBitT(SELECTBIT_T_PIN);
// DigitalOut selectBitR(SELECTBIT_R_PIN);
- Serial RS485Uart(RS485UART_TX, RS485UART_RX);
+// Serial RS485Uart(RS485UART_TX, RS485UART_RX);
+ Serial RS485Uart(USBTX, USBRX);
Serial RS485Line(RS485LINE_TX, RS485LINE_RX);
bool readFase = 0;
@@ -21,9 +22,9 @@
void RS485::Initialize() {
selectBitT = 1; //送信固定
// selectBitR = 0; //受信固定
- RS485Uart.baud(38400);
+ RS485Uart.baud(9600); // 38400
RS485Uart.attach(Transmit, Serial::TxIrq); //送信割り込み
- RS485Line.baud(9600);
+ RS485Line.baud(9600);
RS485Line.attach(Recieve, Serial::RxIrq); //受信割り込み
}