/ ! @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
| 53 | */ |
| 54 | /**************************************************************************/ |
| 55 | bool 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 |
nothing calls this directly
no outgoing calls
no test coverage detected