Library to control the mp3-tf-16p

Dependents:   LaserSensor

Committer:
JeroenAero
Date:
Tue Jan 05 14:37:48 2021 +0000
Revision:
0:92d4b88c5ded
Child:
1:c76171b5e9df
first version without timer function;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JeroenAero 0:92d4b88c5ded 1 #ifndef MBED_MP3_TF_16P_H
JeroenAero 0:92d4b88c5ded 2 #define MBED_MP3_TF_16P_H
JeroenAero 0:92d4b88c5ded 3
JeroenAero 0:92d4b88c5ded 4 #include "mbed.h"
JeroenAero 0:92d4b88c5ded 5
JeroenAero 0:92d4b88c5ded 6 class MP3_TF_16P {
JeroenAero 0:92d4b88c5ded 7
JeroenAero 0:92d4b88c5ded 8 public:
JeroenAero 0:92d4b88c5ded 9
JeroenAero 0:92d4b88c5ded 10 MP3_TF_16P(PinName PinTX, PinName PinRX);
JeroenAero 0:92d4b88c5ded 11
JeroenAero 0:92d4b88c5ded 12 void PlayTrackNumber(uint16_t Number);
JeroenAero 0:92d4b88c5ded 13 void SetVolume(uint16_t Value);
JeroenAero 0:92d4b88c5ded 14 void PausePlay();
JeroenAero 0:92d4b88c5ded 15 void RepeatPlay(uint16_t Number);
JeroenAero 0:92d4b88c5ded 16
JeroenAero 0:92d4b88c5ded 17 private:
JeroenAero 0:92d4b88c5ded 18
JeroenAero 0:92d4b88c5ded 19 Serial SerialPort;
JeroenAero 0:92d4b88c5ded 20
JeroenAero 0:92d4b88c5ded 21 uint8_t Stack[10];
JeroenAero 0:92d4b88c5ded 22
JeroenAero 0:92d4b88c5ded 23 void SendStack();
JeroenAero 0:92d4b88c5ded 24 void CalculateCheckSum();
JeroenAero 0:92d4b88c5ded 25 void PutUint16InArray(uint16_t number, uint8_t PlaceHighByte, uint8_t PlaceLowByte);
JeroenAero 0:92d4b88c5ded 26
JeroenAero 0:92d4b88c5ded 27 };
JeroenAero 0:92d4b88c5ded 28
JeroenAero 0:92d4b88c5ded 29 #endif