Library to control the mp3-tf-16p

Dependents:   LaserSensor

MP3_TF_16P.h

Committer:
JeroenAero
Date:
2021-01-05
Revision:
0:92d4b88c5ded
Child:
1:c76171b5e9df

File content as of revision 0:92d4b88c5ded:

#ifndef MBED_MP3_TF_16P_H
#define MBED_MP3_TF_16P_H

#include "mbed.h"

class MP3_TF_16P {
  
  public:
  
  MP3_TF_16P(PinName PinTX, PinName PinRX);
  
  void PlayTrackNumber(uint16_t Number);
  void SetVolume(uint16_t Value);
  void PausePlay();
  void RepeatPlay(uint16_t Number);
  
  private:
  
  Serial SerialPort;
  
  uint8_t Stack[10];
  
  void SendStack();
  void CalculateCheckSum();
  void PutUint16InArray(uint16_t number, uint8_t PlaceHighByte, uint8_t PlaceLowByte);
  
};

#endif