
Game for Leeds University Gamepad for the FRDM-K64F: Game is a RPG Horror Title.
Dependencies: mbed FATFileSystem
main.cpp@3:63cdd5cab431, 2019-04-18 (annotated)
- Committer:
- rottenegg
- Date:
- Thu Apr 18 21:21:58 2019 +0000
- Revision:
- 3:63cdd5cab431
- Parent:
- 0:af8236e47084
- Child:
- 4:34bf3587cf42
Updated WDplayer Documentation and Removed all global Definitions and removed the Hardware Definitions. Added SDFileSystem library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rottenegg | 0:af8236e47084 | 1 | /* |
rottenegg | 0:af8236e47084 | 2 | ELEC2645 Embedded Systems Project |
rottenegg | 0:af8236e47084 | 3 | School of Electronic & Electrical Engineering |
rottenegg | 0:af8236e47084 | 4 | University of Leeds |
rottenegg | 0:af8236e47084 | 5 | Name:Saad Tayyab |
rottenegg | 0:af8236e47084 | 6 | Username:el17st |
rottenegg | 0:af8236e47084 | 7 | Student ID Number:201145512 |
rottenegg | 0:af8236e47084 | 8 | Date: 18/04/2019 |
rottenegg | 0:af8236e47084 | 9 | */ |
rottenegg | 0:af8236e47084 | 10 | |
rottenegg | 0:af8236e47084 | 11 | |
rottenegg | 0:af8236e47084 | 12 | #include "mbed.h" |
rottenegg | 3:63cdd5cab431 | 13 | #include "WDplayer.h" |
rottenegg | 3:63cdd5cab431 | 14 | #include "SDFileSystem.h" |
rottenegg | 3:63cdd5cab431 | 15 | |
rottenegg | 3:63cdd5cab431 | 16 | PwmOut dac(PTC10); |
rottenegg | 3:63cdd5cab431 | 17 | SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); |
rottenegg | 0:af8236e47084 | 18 | |
rottenegg | 0:af8236e47084 | 19 | int main() { |
rottenegg | 3:63cdd5cab431 | 20 | const char *mp3p; |
rottenegg | 3:63cdd5cab431 | 21 | mp3p = "/sd/Game-Files/AudBin/play1.wav"; |
rottenegg | 3:63cdd5cab431 | 22 | WDplayer mp3; |
rottenegg | 3:63cdd5cab431 | 23 | mp3.intWD(mp3p,dac); |
rottenegg | 3:63cdd5cab431 | 24 | //set up pwm |
rottenegg | 3:63cdd5cab431 | 25 | |
rottenegg | 3:63cdd5cab431 | 26 | //mp3.WDplay(dac); |
rottenegg | 3:63cdd5cab431 | 27 | |
rottenegg | 3:63cdd5cab431 | 28 | while(1) { |
rottenegg | 3:63cdd5cab431 | 29 | mp3.WDtck(dac); |
rottenegg | 3:63cdd5cab431 | 30 | wait(mp3.get_pwmfreq() / 2.0f); |
rottenegg | 3:63cdd5cab431 | 31 | } |
rottenegg | 0:af8236e47084 | 32 | |
rottenegg | 0:af8236e47084 | 33 | } |