MCPcopy Create free account
hub / github.com/PowerBroker2/DFPlayerMini_Fast / begin

Method begin

src/DFPlayerMini_Fast.cpp:55–75  ·  view source on GitHub ↗

/ ! @brief Configure the class. @param stream A reference to the Serial instance (hardware or software) used to communicate with the MP3 player. @param debug Boolean used to specify if debug prints should be automatically printed to the serial monitor. @param threshold Number of ms allowed for the MP3 player to respond (timeout) to a

Source from the content-addressed store, hash-verified

53 */
54 /**************************************************************************/
55bool DFPlayerMini_Fast::begin(Stream &stream, bool debug, unsigned long threshold)
56{
57 _threshold = threshold;
58 timoutTimer.begin(_threshold);
59
60 _serial = &stream;
61
62 _debug = debug;
63
64 sendStack.start_byte = dfplayer::SB;
65 sendStack.version = dfplayer::VER;
66 sendStack.length = dfplayer::LEN;
67 sendStack.end_byte = dfplayer::EB;
68
69 recStack.start_byte = dfplayer::SB;
70 recStack.version = dfplayer::VER;
71 recStack.length = dfplayer::LEN;
72 recStack.end_byte = dfplayer::EB;
73
74 return true;
75}
76
77
78

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected