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

Function init

samples/Basic_Servo/app/application.cpp:109–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107} // namespace
108
109void init()
110{
111 Serial.begin(SERIAL_BAUD_RATE);
112 Serial.systemDebugOutput(true);
113 Serial.setTxWait(false);
114 Serial.setTxBufferSize(1024);
115
116 Serial.println(_F("Init Basic Servo Sample"));
117 System.setCpuFrequency(CpuCycleClockNormal::cpuFrequency());
118
119#ifdef ARCH_HOST
120 setDigitalHooks(nullptr);
121#endif
122
123 // Set up two channels, one updating slowly the other more quickly
124 channels[0].begin(2, UPDATE_INTERVAL * 1.3);
125 channels[1].begin(4, UPDATE_INTERVAL);
126 channels[2].begin(5, UPDATE_INTERVAL * 0.5);
127 channels[3].begin(0, UPDATE_INTERVAL * 0.25);
128}

Callers

nothing calls this directly

Calls 7

setDigitalHooksFunction · 0.85
systemDebugOutputMethod · 0.80
setTxWaitMethod · 0.80
setTxBufferSizeMethod · 0.80
printlnMethod · 0.80
setCpuFrequencyMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected