#ifndef __TMP1780_H__
#define __TMP1780_H__
/***************************************************************
copyright from private LiuXiao
if you have any question,you can contact me by email 461445092@qq.com
2022-10-05 17:56:24.020233
***************************************************************/
#include ".\SA51024.h"


/***************************enum define begin************************************/
typedef enum
{
	SPEAKER_IDLE = 0x00,
	SPEAKER_INIT,
	SPEAKER_INIT_CYCLE,
	SPEAKER_SET_STRENGHT ,
	SPEAKER_START ,
	SPEAKER_UPDATE_CYCLE ,
	SPEAKER_STOP ,
	SPEAKER_INTERVAL ,
}Speaker_main_e_typ;


typedef struct
{
    FA51024_ctrl_e_typ strenght;   
    STATE_UINT16 cycle;
} speaker_ctrl_Str;

typedef struct
{
	speaker_ctrl_Str queue[2];
	STATE_UINT8 queue_in;
	STATE_UINT8 queue_out;
}speaker_queue_str;

/***************************enum define end************************************/

#define SPEAKER_TASK_PERIOD       2
#define SPEAKER_MAX_CYCLE_TIMES  ((STATE_UINT16)1000)  /*unit:ms*/
#define SPEAKER_INTERVAL_CYCLE_TIMES  ((STATE_UINT16)20) /*unit:ms*///132

/*****************************main control function begin**********************************/

/*********************************main control function end*******************************/


/***************************extern function begin************************************/
extern  void  speaker_Init(void);
extern  void  speaker_MainTask(void);
extern  STATE_UINT8  speeker_Tig_Once(uint16_t cycle_time,FA51024_ctrl_e_typ level);
extern  Speaker_main_e_typ Get_Speaker_Main_State(void);

/***************************extern function end************************************/


#endif
