1、void delay(int x);void comm_sate(void);void rest_isd_comm_ptr(void);uchar T_R_comm_byte( uchar comm_data );void isd1700_par2_comm(uchar comm_par, uint data_par);void isd1700_Npar_comm(uchar comm_par,comm_byte_count); /no parameter commvoid isd1700_7byte_comm(uchar comm_par, uint star_addr, uint end_
2、addr);void spi_pu (void);void spi_stop (void);void spi_Rest ( void );void spi_CLR_INT(void);void spi_RD_STAUS(void);void spi_RD_play_ptr(void);void spi_pd(void);void spi_RD_rec_ptr(void);void spi_devid(void);void spi_play(void);void spi_rec (void);void spi_erase (void);void spi_G_ERASE (void);void s
3、pi_rd_apc(void);void spi_wr_apc1 (void);void spi_wr_apc2 (void);void spi_wr_nvcfg (void);void spi_ld_nvcfg (void);void spi_fwd (void);void spi_chk_mem(void);void spi_CurrRowAddr(void);void seril_back_sate(uchar byte_number);void spi_set_opt(uchar spi_set_comm);/串口通信接口函数void comm_sate(void) uchar sat
4、e_temp; uint apc_temp; if(RI) /接收到命令 sate_temp=SBUF; /下面根据不同的命令执行不同的函数 if(sate_temp=0x09) spi_devid(); if(sate_temp=0x44) spi_rd_apc(); if(sate_temp=0x40) spi_play(); if(sate_temp=0x04) spi_CLR_INT(); if(sate_temp=0x05) spi_RD_STAUS(); if(sate_temp=0x43) spi_G_ERASE(); if(sate_temp=0x01) spi_pu ();
5、if(sate_temp=0x02) spi_stop(); if(sate_temp=0x03) spi_Rest (); if(sate_temp=0x06) spi_RD_play_ptr(); if(sate_temp=0x07) spi_pd(); if(sate_temp=0x08) spi_RD_rec_ptr(); if(sate_temp=0x41) spi_rec(); if(sate_temp=0x42) spi_erase(); if(sate_temp=0x45) spi_wr_apc1 (); if(sate_temp=0x65) spi_wr_apc2 (); i
6、f(sate_temp=0x46) spi_wr_nvcfg (); if(sate_temp=0x47) spi_ld_nvcfg (); if(sate_temp=0x48) spi_fwd (); if(sate_temp=0x49) spi_chk_mem(); if(sate_temp=0x60) spi_CurrRowAddr(); if(sate_temp=0x80) spi_set_opt(ISD1700_SET_PLAY|ISD_LED); /spi_set_opt(ISD1700_SET_PLAY); if(sate_temp=0x81) spi_set_opt(ISD17
7、00_SET_REC|ISD_LED); /spi_set_opt(ISD1700_SET_REC); ISD_COMM_RAM_C0=ISD1700_SET_REC ; seril_back_sate(1); if(sate_temp=0x82) spi_set_opt(ISD1700_SET_ERASE|ISD_LED); /spi_set_opt(ISD1700_SET_ERASE); if(sate_temp=ISD1700_WR_APC2) RI=0; while(!RI); apc_temp=SBUF; apc_temp=apc_temp8; while(! apc_temp|=S
8、BUF; ISD_SS1=0; ISD_SS=0; isd1700_par2_comm(ISD1700_WR_APC2,apc_temp); ISD_SS1=1; ISD_SS=1; RI=0; if(re_fig) rest_isd_comm_ptr(); sate_temp=0; do SBUF=*back_data_ptr+; while(!TI); TI=0; while(+sate_temp=2); re_fig=0;/*/*以下为ISD各子功能函数,详细请查阅ISD语音芯片数据手册*/设置函数void spi_set_opt(uchar spi_set_comm) uint start_addr,end_addr; RI=0; start_addr=SBUF; start_addr=start_addr start_addr|=SBUF; end_addr=SBUF; end_addr=start_addr5|ISD_COMM_RAM_C15;/读播放地址void spi_RD_play_ptr(voi
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1