MCPcopy Create free account
hub / github.com/MCUdude/MiniCore / setTX

Method setTX

avr/libraries/SoftwareSerial/src/SoftwareSerial.cpp:279–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void SoftwareSerial::setTX(int8_t tx)
280{
281 // First write, then set output. If we do this the other way around,
282 // the pin would be output low for a short while before switching to
283 // output high. Now, it is input with pullup for a short while, which
284 // is fine. With inverse logic, either order is fine.
285 digitalWrite(tx, _inverse_logic ? LOW : HIGH);
286 pinMode(tx, OUTPUT);
287 _transmitBitMask = digitalPinToBitMask(tx);
288 uint8_t port = digitalPinToPort(tx);
289 _transmitPortRegister = portOutputRegister(port);
290}
291
292void SoftwareSerial::setRX(int8_t rx)
293{

Callers

nothing calls this directly

Calls 2

digitalWriteFunction · 0.85
pinModeFunction · 0.85

Tested by

no test coverage detected