It's not my library, i just want to publish my program.
Fork of PWM_Tone_Library by
pwm_tone.h@0:d06af372d384, 2015-07-24 (annotated)
- Committer:
- justinkim
- Date:
- Fri Jul 24 05:01:45 2015 +0000
- Revision:
- 0:d06af372d384
- Child:
- 1:4b841d62e529
- Child:
- 3:b3ee09f3ff8f
bug fix
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
justinkim | 0:d06af372d384 | 1 | /* Includes ------------------------------------------------------------------*/ |
justinkim | 0:d06af372d384 | 2 | #include "mbed.h" |
justinkim | 0:d06af372d384 | 3 | |
justinkim | 0:d06af372d384 | 4 | /* Private typedef -----------------------------------------------------------*/ |
justinkim | 0:d06af372d384 | 5 | /* Private define ------------------------------------------------------------*/ |
justinkim | 0:d06af372d384 | 6 | #define Do3 131 //C octave3 |
justinkim | 0:d06af372d384 | 7 | #define Do3s 139 //C# |
justinkim | 0:d06af372d384 | 8 | #define Re3 147 //D |
justinkim | 0:d06af372d384 | 9 | #define Re3s 156//D# |
justinkim | 0:d06af372d384 | 10 | #define Mi3 165 //E |
justinkim | 0:d06af372d384 | 11 | #define Fa3 175 //F |
justinkim | 0:d06af372d384 | 12 | #define Fa3s 185 //F# |
justinkim | 0:d06af372d384 | 13 | #define So3 196 //G |
justinkim | 0:d06af372d384 | 14 | #define So3s 208 //G# |
justinkim | 0:d06af372d384 | 15 | #define La3 220 //A |
justinkim | 0:d06af372d384 | 16 | #define La3s 233 //A# |
justinkim | 0:d06af372d384 | 17 | #define Ti3 247 //B |
justinkim | 0:d06af372d384 | 18 | #define Do4 262 //C octave4 |
justinkim | 0:d06af372d384 | 19 | #define Do4s 277 //C# |
justinkim | 0:d06af372d384 | 20 | #define Re4 294 //D |
justinkim | 0:d06af372d384 | 21 | #define Re4s 311//D# |
justinkim | 0:d06af372d384 | 22 | #define Mi4 330 //E |
justinkim | 0:d06af372d384 | 23 | #define Fa4 349 //F |
justinkim | 0:d06af372d384 | 24 | #define Fa4s 370 //F# |
justinkim | 0:d06af372d384 | 25 | #define So4 392 //G |
justinkim | 0:d06af372d384 | 26 | #define So4s 415 //G# |
justinkim | 0:d06af372d384 | 27 | #define La4 440 //A |
justinkim | 0:d06af372d384 | 28 | #define La4s 466 //A# |
justinkim | 0:d06af372d384 | 29 | #define Ti4 494 //B |
justinkim | 0:d06af372d384 | 30 | #define Do5 523 //C octave5 |
justinkim | 0:d06af372d384 | 31 | #define Do5s 554 //C# |
justinkim | 0:d06af372d384 | 32 | #define Re5 587 //D |
justinkim | 0:d06af372d384 | 33 | #define Re5s 622//D# |
justinkim | 0:d06af372d384 | 34 | #define Mi5 659 //E |
justinkim | 0:d06af372d384 | 35 | #define Fa5 699 //F |
justinkim | 0:d06af372d384 | 36 | #define Fa5s 740 //F# |
justinkim | 0:d06af372d384 | 37 | #define So5 784 //G |
justinkim | 0:d06af372d384 | 38 | #define So5s 831 //G# |
justinkim | 0:d06af372d384 | 39 | #define La5 880 //A |
justinkim | 0:d06af372d384 | 40 | #define La5s 932 //A# |
justinkim | 0:d06af372d384 | 41 | #define Ti5 988 //B |
justinkim | 0:d06af372d384 | 42 | |
justinkim | 0:d06af372d384 | 43 | /* Private variables ---------------------------------------------------------*/ |
justinkim | 0:d06af372d384 | 44 | /* Private function prototypes -----------------------------------------------*/ |
justinkim | 0:d06af372d384 | 45 | void Tune(PwmOut name, int period, int beat); |
justinkim | 0:d06af372d384 | 46 | void Auto_tunes(PwmOut name, int period, int beat); |
justinkim | 0:d06af372d384 | 47 | void Stop_tunes(PwmOut name); |
justinkim | 0:d06af372d384 | 48 | |
justinkim | 0:d06af372d384 | 49 | /* Private functions ---------------------------------------------------------*/ |