Library to control the mp3-tf-16p

Dependents:   LaserSensor

MP3_TF_16P.h

Committer:
JeroenAero
Date:
2021-03-12
Revision:
1:c76171b5e9df
Parent:
0:92d4b88c5ded

File content as of revision 1:c76171b5e9df:

#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);
  uint16_t GetNumberOfFiles();
  
  
  
  uint8_t ReceivedStack[10];
  
  private:
  
  uint16_t numberoffiles;
  Serial SerialPort;
  
  uint8_t Stack[10];
  
  void SendStack();
  void CalculateCheckSum();
  void PutUint16InArray(uint16_t number, uint8_t PlaceHighByte, uint8_t PlaceLowByte);
  
  
  void Rx_interrupt();
  
  
  
};

#endif