Skip to content

Commit

Permalink
chore: #ifdef AVR - V2
Browse files Browse the repository at this point in the history
  • Loading branch information
koen1711 authored Feb 16, 2025
1 parent e2fc23c commit be10016
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/RedMP3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
/****************************************************************************/
#ifdef AVR
#include <SoftwareSerial.h>
#else
#include <EspSoftwareSerial.h>
#endif
#include "RedMP3.h"

#ifdef AVR
MP3::MP3(uint8_t rxd, uint8_t txd):myMP3(txd, rxd)
{
myMP3.begin(9600);//baud rate is 9600bps
}
#else
MP3::MP3(uint8_t rxd, uint8_t txd)
{
myMP3.begin(9600, SWSERIAL_8N1, txd, rxd);//baud rate is 9600bps
}
#endif

void MP3::begin()
{
sendCommand(CMD_SEL_DEV, DEV_TF);//select the TF card
Expand Down

0 comments on commit be10016

Please sign in to comment.