MCPcopy Create free account
hub / github.com/SmingHub/Sming / init

Function init

Sming/Libraries/ModbusMaster/samples/generic/app/application.cpp:102–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100} // namespace
101
102void init()
103{
104 pinMode(RS485_RE_PIN, OUTPUT);
105 digitalWrite(RS485_RE_PIN, LOW);
106 modbusComPort.begin(MODBUS_COM_SPEED, SERIAL_8N1, SERIAL_FULL);
107 debugComPort.begin(SERIAL_BAUD_RATE, SERIAL_8N1, SERIAL_TX_ONLY);
108 debugComPort.systemDebugOutput(true);
109
110 mbMaster.preTransmission(preTransmission);
111 mbMaster.postTransmission(postTransmission);
112 mbMaster.logReceive(mbLogReceive);
113 mbMaster.logTransmit(mbLogTransmit);
114
115 mbLoopTimer.initializeMs<1000>(mbLoop).start();
116}

Callers

nothing calls this directly

Calls 5

systemDebugOutputMethod · 0.80
pinModeFunction · 0.50
digitalWriteFunction · 0.50
beginMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected