#ifndef __DRVRT905_H__
#define __DRVRT905_H__



#define ERR_OK      0x00
#define ERR_I2CERR  0x01
#define ERR_TIMEOUT 0x02
#define ERR_BUSY    0x03
#define ERR_NAK     0x04
#define ERR_I2C_UNKNOW      0x05

#define ERR_INITTIMEOUT     0x10

#define ERR_CRCERR      0x20
#define ERR_TASKERR     0x21
#define ERR_LENERR      0x22

void I2C_counter_run(void);
uint8_t RT905_ReadReg(uint8_t reg);
uint8_t RT905_WriteReg(uint8_t reg,uint8_t data);
uint8_t RT903_WriteReg_block(uint8_t reg,uint8_t data);
uint8_t RT903_ReadReg_block(uint8_t reg,uint8_t *data);
uint8_t RT903_Init(void);

void RT905_Task(void);
uint8_t RT903_WriteWave(void);

uint8_t RT903_PlayWave(void);
uint8_t RT903_SetWaveNo(uint8_t id);

#endif