This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#define NOTE(tone, dur) ((((((uint8_t)(dur)) & 0x07)<<5) | (((uint8_t)(tone)) & 0x1F))) | |
#define GET_TONE(note) ((note) & 0x1F) | |
#define GET_DURATION(note) (((note)>>5) & 0x07) | |
#define END_MARKER 0XFF | |
#define READ_BIT(byte, bit) ((byte & (1 << bit)) >> bit) | |
enum { |