Skip to content

Commit 4fd0ccf

Browse files
committed
comments
1 parent 6147938 commit 4fd0ccf

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/Lin_Interface.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,14 @@ void Lin_Interface::writeFrameClassic(uint8_t FrameID, size_t size)
210210
size_t Lin_Interface::writeBreak()
211211
{
212212
HardwareSerial::flush();
213-
// Halbe Geschwindigkeit, so das ein Brake erzeugt wird
213+
// configure to half baudrate --> a t_bit will be doubled
214214
HardwareSerial::updateBaudRate(baud >> 1);
215-
// 0x00 ausgeben, so das das Stopp-Bit (=1) zum Brake Signalwird
215+
// write 0x00, including Stop-Bit (=1),
216+
// qualifies when writing in slow motion like a Break in normal speed
216217
size_t ret = write(uint8_t(0x00));
217-
// abwarten bis das übertragen wurde
218+
// ensure this is send
218219
HardwareSerial::flush();
219-
// Volle Geschwindigkeit wieder herstellen
220+
// restore normal speed
220221
HardwareSerial::updateBaudRate(baud);
221222
return ret;
222223
}
@@ -256,7 +257,7 @@ uint8_t Lin_Interface::getChecksum(uint8_t ProtectedID, size_t size)
256257
// test FrameID bits for classicChecksum
257258
if ((sum & 0x3F) >= 0x3C)
258259
{
259-
// LIN 1.x: legarcy
260+
// LIN 1.x: legacy
260261
// LIN 2.0: don't include PID for ChkSum calculation on configuration and reserved frames
261262
sum = 0x00;
262263
}

src/Lin_Interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// HardwareLin.h
1+
// Lin_Interface.h
22
//
33
// Provides a Hardware LIN Interface
44
// inherited from the "HardwareSerial"

0 commit comments

Comments
 (0)