
#ifndef IIS_MAX98357_H__
#define IIS_MAX98357_H__
//#include "TYW_stdint.h"
#include "r_typedefs.h"
typedef enum
{
    IIS_SET_OK = 0,
    IIS_SET_LEN_ERROR,
    IIS_SET_DATA_ERROR,
    IIS_SET_STATUS_ERROR,
    IIS_SET_NUM_ERROR,
} IIS_Start_Status_en_t;
typedef enum
{
    IIS_PLAY_IDLE = 0,
    IIS_PLAY_BUSY,
} IIS_Play_Status_en_t;
typedef enum
{
    IIS_VOLUME_03DB = 0,
    IIS_VOLUME_06DB,
    IIS_VOLUME_09DB,
    IIS_VOLUME_12DB,
    IIS_VOLUME_15DB,
    IIS_VOLUME_ERROR,
} IIS_Volume_en_t;


extern const unsigned char DoorOpen[];

extern void IIS_Reset(void);
extern void I2S_MAX98357_Init(void);
extern IIS_Start_Status_en_t I2S_MAX98357_InternalFlash_CH0_Player(const uint8_t *pu8Data, uint32_t u32Len, uint32_t u32Cycles);
extern void I2S_MAX98357_Stop(uint8_t u8Channel);
extern IIS_Play_Status_en_t I2S_MAX98357_GetStatus(uint8_t u8Channel);
extern void I2S_MAX98357_TX(void);
extern void I2S_MAX98357_Volume_Set(IIS_Volume_en_t enIISVolume);

#endif
