Skip to content

Commit fd74542

Browse files
committed
systemBus-ize rs232 (FujiNetWIFI#1031)
1 parent e7423a5 commit fd74542

File tree

5 files changed

+31
-14
lines changed

5 files changed

+31
-14
lines changed

.github/workflows/autobuild.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ jobs:
2020
runs-on: "ubuntu-latest"
2121
strategy:
2222
matrix:
23-
target-platform: [ATARI, ATARI-esp32-s3-wroom-1-n16r8, ADAM, APPLE, IEC-LOLIN-D32, IEC-NUGGET, COCO]
23+
target-platform:
24+
- ADAM
25+
- APPLE
26+
- ATARI
27+
- ATARI-esp32-s3-wroom-1-n16r8
28+
- COCO
29+
- IEC-LOLIN-D32
30+
- IEC-NUGGET
31+
- RS232
2432

2533
steps:
2634
- name: Checkout Source

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ jobs:
1717
runs-on: "ubuntu-latest"
1818
strategy:
1919
matrix:
20-
target-platform: [ATARI, ATARI-8mb, ADAM, APPLE, COCO, IEC-LOLIN-D32, MASTERIES-REVAB, MASTERIES-REVA-SPIFIX, RS232]
20+
target-platform:
21+
- ADAM
22+
- APPLE
23+
- ATARI
24+
- ATARI-8mb
25+
- COCO
26+
- IEC-LOLIN-D32
27+
- MASTERIES-REVA-SPIFIX
28+
- MASTERIES-REVAB
29+
- RS232
2130
env:
2231
TAG_NAME: ${{ github.event.inputs.tag || github.ref_name }}
2332

lib/bus/rs232/rs232.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void virtualDevice::bus_to_computer(uint8_t *buf, uint16_t len, bool err)
7777
// Write checksum
7878
SYSTEM_BUS.write(rs232_checksum(buf, len));
7979

80-
SYSTEM_BUS.flush();
80+
SYSTEM_BUS.flushOutput();
8181
}
8282

8383
/*
@@ -124,7 +124,7 @@ uint8_t virtualDevice::bus_to_peripheral(uint8_t *buf, unsigned short len)
124124
void virtualDevice::rs232_nak()
125125
{
126126
SYSTEM_BUS.write('N');
127-
SYSTEM_BUS.flush();
127+
SYSTEM_BUS.flushOutput();
128128
Debug_println("NAK!");
129129
}
130130

@@ -133,7 +133,7 @@ void virtualDevice::rs232_ack()
133133
{
134134
SYSTEM_BUS.write('A');
135135
fnSystem.delay_microseconds(DELAY_T5); //?
136-
SYSTEM_BUS.flush();
136+
SYSTEM_BUS.flushOutput();
137137
Debug_println("ACK!");
138138
}
139139

lib/bus/rs232/rs232.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class virtualDevice
150150
virtual void rs232_status() = 0;
151151

152152
/**
153-
* @brief All RS232 devices repeatedly call this routine to fan out to other methods for each command.
153+
* @brief All RS232 devices repeatedly call this routine to fan out to other methods for each command.
154154
* This is typcially implemented as a switch() statement.
155155
*/
156156
virtual void rs232_process(cmdFrame_t *cmd_ptr) = 0;

lib/device/rs232/modem.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ void rs232Modem::rs232_control()
427427
tcpClient.stop(); // Hang up if DTR drops.
428428
CRX = false;
429429
cmdMode = true;
430-
430+
431431
if (listenPort > 0)
432432
{
433433
// tcpServer.stop();
@@ -696,7 +696,7 @@ void rs232Modem::at_cmd_println()
696696
SYSTEM_BUS.write(ASCII_CR);
697697
SYSTEM_BUS.write(ASCII_LF);
698698
}
699-
SYSTEM_BUS.flush();
699+
SYSTEM_BUS.flushOutput();
700700
}
701701

702702
void rs232Modem::at_cmd_println(const char *s, bool addEol)
@@ -717,7 +717,7 @@ void rs232Modem::at_cmd_println(const char *s, bool addEol)
717717
SYSTEM_BUS.write(ASCII_LF);
718718
}
719719
}
720-
SYSTEM_BUS.flush();
720+
SYSTEM_BUS.flushOutput();
721721
}
722722

723723
void rs232Modem::at_cmd_println(int i, bool addEol)
@@ -738,7 +738,7 @@ void rs232Modem::at_cmd_println(int i, bool addEol)
738738
SYSTEM_BUS.write(ASCII_LF);
739739
}
740740
}
741-
SYSTEM_BUS.flush();
741+
SYSTEM_BUS.flushOutput();
742742
}
743743

744744
void rs232Modem::at_cmd_println(std::string s, bool addEol)
@@ -759,7 +759,7 @@ void rs232Modem::at_cmd_println(std::string s, bool addEol)
759759
SYSTEM_BUS.write(ASCII_LF);
760760
}
761761
}
762-
SYSTEM_BUS.flush();
762+
SYSTEM_BUS.flushOutput();
763763
}
764764

765765
void rs232Modem::at_handle_wificonnect()
@@ -1025,7 +1025,7 @@ void rs232Modem::at_handle_answer()
10251025
CRX = true;
10261026

10271027
cmdMode = false;
1028-
SYSTEM_BUS.flush();
1028+
SYSTEM_BUS.flushOutput();
10291029
answerHack = false;
10301030
}
10311031
}
@@ -1729,7 +1729,7 @@ void rs232Modem::rs232_handle_modem()
17291729
else
17301730
{
17311731
SYSTEM_BUS.write(buf, bytesRead);
1732-
SYSTEM_BUS.flush();
1732+
SYSTEM_BUS.flushOutput();
17331733
}
17341734

17351735
// And dump to sniffer, if enabled.
@@ -1747,7 +1747,7 @@ void rs232Modem::rs232_handle_modem()
17471747
Debug_println("Going back to command mode");
17481748

17491749
at_cmd_println("OK");
1750-
1750+
17511751
cmdMode = true;
17521752

17531753
plusCount = 0;

0 commit comments

Comments
 (0)