Library to control the mp3-tf-16p
Diff: MP3_TF_16P.h
- Revision:
- 0:92d4b88c5ded
- Child:
- 1:c76171b5e9df
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MP3_TF_16P.h Tue Jan 05 14:37:48 2021 +0000 @@ -0,0 +1,29 @@ +#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 \ No newline at end of file