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

Method query

src/DFPlayerMini_Fast.cpp:974–992  ·  view source on GitHub ↗

/ ! @brief Query the MP3 player for specific information. @param cmd The command/query ID. @param msb The payload/parameter MSB. @param lsb The payload/parameter LSB. @return Query response, -1 if error. */ /

Source from the content-addressed store, hash-verified

972 */
973 /**************************************************************************/
974int16_t DFPlayerMini_Fast::query(uint8_t cmd, uint8_t msb, uint8_t lsb)
975{
976 flush();
977
978 sendStack.commandValue = cmd;
979 sendStack.feedbackValue = dfplayer::NO_FEEDBACK;
980 sendStack.paramMSB = msb;
981 sendStack.paramLSB = lsb;
982
983 findChecksum(sendStack);
984 sendData();
985 timoutTimer.start();
986
987 if (parseFeedback())
988 if (recStack.commandValue != 0x40)
989 return (recStack.paramMSB << 8) | recStack.paramLSB;
990
991 return -1;
992}
993
994
995

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected