Semaphore based wait and sync for the mp3 play
Dependents: RTOS-VS1053b-mp3_semaphore
VS1053t.h@0:d421471bef92, 2012-03-19 (annotated)
- Committer:
- takashikojo
- Date:
- Mon Mar 19 12:08:44 2012 +0000
- Revision:
- 0:d421471bef92
VS1053 driver with Semaphore
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takashikojo | 0:d421471bef92 | 1 | /* mbed VLSI VS1053t library |
takashikojo | 0:d421471bef92 | 2 | * |
takashikojo | 0:d421471bef92 | 3 | * Thread based VS1053 class inherited from VS1053b |
takashikojo | 0:d421471bef92 | 4 | * |
takashikojo | 0:d421471bef92 | 5 | */ |
takashikojo | 0:d421471bef92 | 6 | |
takashikojo | 0:d421471bef92 | 7 | #include "VS1053.h" |
takashikojo | 0:d421471bef92 | 8 | |
takashikojo | 0:d421471bef92 | 9 | class VS1053t : public VS1053 { |
takashikojo | 0:d421471bef92 | 10 | public : |
takashikojo | 0:d421471bef92 | 11 | VS1053t( |
takashikojo | 0:d421471bef92 | 12 | PinName mosi, |
takashikojo | 0:d421471bef92 | 13 | PinName miso, |
takashikojo | 0:d421471bef92 | 14 | PinName sck, |
takashikojo | 0:d421471bef92 | 15 | PinName cs, |
takashikojo | 0:d421471bef92 | 16 | PinName rst, |
takashikojo | 0:d421471bef92 | 17 | PinName dreq, |
takashikojo | 0:d421471bef92 | 18 | PinName dcs, |
takashikojo | 0:d421471bef92 | 19 | char* buffer, |
takashikojo | 0:d421471bef92 | 20 | int buffer_size, |
takashikojo | 0:d421471bef92 | 21 | bool thread = false |
takashikojo | 0:d421471bef92 | 22 | ); |
takashikojo | 0:d421471bef92 | 23 | unsigned int waitBuffer(unsigned int size, uint32_t time) ; |
takashikojo | 0:d421471bef92 | 24 | unsigned char bufferGetByte(void) ; |
takashikojo | 0:d421471bef92 | 25 | private : |
takashikojo | 0:d421471bef92 | 26 | int WaitingSize ; |
takashikojo | 0:d421471bef92 | 27 | bool thread ; |
takashikojo | 0:d421471bef92 | 28 | |
takashikojo | 0:d421471bef92 | 29 | } ; |