un.h 500 B

1234567891011121314151617181920212223
  1. #ifndef UN_H_
  2. #define UN_H_
  3. #include <stdint.h>
  4. // https://mixbutton.com/music-tools/frequency-and-pitch/music-note-to-frequency-chart
  5. // Octave 2
  6. // typedef enum { P = -1, C = 65, D = 73, E = 82, F = 87, G = 98 } NoteFreq;
  7. // Octave 4
  8. typedef enum { P = -1, C = 262, D = 294, E = 330, F = 349, G = 392 } NoteFreq;
  9. typedef struct {
  10. NoteFreq note;
  11. uint32_t length;
  12. } Note;
  13. const char* NoteFreqToStr(NoteFreq note);
  14. void play_note(Note* note);
  15. void un_task(void* param);
  16. #endif // UN_H_