/*
 *Do what ever you want with this code...
 */


/*
 * Set I/Os
 */
#define WTV_PORT 	PORTD
#define WTV_DDR 	DDRD
#define WTV_PIN 	PIND
#define WTV_BUSY 	PD2
#define WTV_DO		PD3
#define WTV_CL 		PD4
#define WTV_RES 	PD5


/*
 * Defines for Commands
 * Send with wtv020_sendCommand(COMMAND) to execute
 */
#define PLAY_PAUSE 	0xFFFE 	//play/pause file
#define STOP 		0xFFFF	//stop playing
#define VOLUME_MIN 	0xFFF0 	//mute
#define VOLUME_0 	0xFFF0 	//available volume levels
#define VOLUME_1 	0xFFF1 	//...
#define VOLUME_2 	0xFFF2
#define VOLUME_3 	0xFFF3
#define VOLUME_4 	0xFFF4
#define VOLUME_5 	0xFFF5
#define VOLUME_6 	0xFFF6
#define VOLUME_7 	0xFFF7
#define VOLUME_MAX 	0xFFF7 	//unmute


/*
 * Data Clock Cycle Length in Microseconds
 * change this if you have problems with sending valid data
 */
#define CLK 100


/*
 * Function Prototypes
 */
void wtv020_init();
void wtv020_reset();
void wtv020_playVoice(uint16_t voiceNumber);
void wtv020_sendCommand(uint16_t command);
