Library to control the mp3-tf-16p
MP3_TF_16P.h@1:c76171b5e9df, 2021-03-12 (annotated)
- Committer:
- JeroenAero
- Date:
- Fri Mar 12 12:35:52 2021 +0000
- Revision:
- 1:c76171b5e9df
- Parent:
- 0:92d4b88c5ded
versie maart;
Who changed what in which revision?
User | Revision | Line number | New 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 | 1:c76171b5e9df | 16 | uint16_t GetNumberOfFiles(); |
JeroenAero | 1:c76171b5e9df | 17 | |
JeroenAero | 1:c76171b5e9df | 18 | |
JeroenAero | 1:c76171b5e9df | 19 | |
JeroenAero | 1:c76171b5e9df | 20 | uint8_t ReceivedStack[10]; |
JeroenAero | 0:92d4b88c5ded | 21 | |
JeroenAero | 0:92d4b88c5ded | 22 | private: |
JeroenAero | 0:92d4b88c5ded | 23 | |
JeroenAero | 1:c76171b5e9df | 24 | uint16_t numberoffiles; |
JeroenAero | 0:92d4b88c5ded | 25 | Serial SerialPort; |
JeroenAero | 0:92d4b88c5ded | 26 | |
JeroenAero | 0:92d4b88c5ded | 27 | uint8_t Stack[10]; |
JeroenAero | 0:92d4b88c5ded | 28 | |
JeroenAero | 0:92d4b88c5ded | 29 | void SendStack(); |
JeroenAero | 0:92d4b88c5ded | 30 | void CalculateCheckSum(); |
JeroenAero | 0:92d4b88c5ded | 31 | void PutUint16InArray(uint16_t number, uint8_t PlaceHighByte, uint8_t PlaceLowByte); |
JeroenAero | 0:92d4b88c5ded | 32 | |
JeroenAero | 1:c76171b5e9df | 33 | |
JeroenAero | 1:c76171b5e9df | 34 | void Rx_interrupt(); |
JeroenAero | 1:c76171b5e9df | 35 | |
JeroenAero | 1:c76171b5e9df | 36 | |
JeroenAero | 1:c76171b5e9df | 37 | |
JeroenAero | 0:92d4b88c5ded | 38 | }; |
JeroenAero | 0:92d4b88c5ded | 39 | |
JeroenAero | 0:92d4b88c5ded | 40 | #endif |