SI4703API.h
资源名称:fmradio.zip [点击查看]
上传用户:ledjyj
上传日期:2014-08-27
资源大小:2639k
文件大小:6k
源码类别:
驱动编程
开发平台:
Unix_Linux
- /***************************************************************************
- *
- * QCI GSM/GPRS Phase 2 Software
- *
- * Copyright (c) 2005 Quanta Computer Inc.
- *
- *****************************************************************************
- *
- * $Workfile: l1alfmradio.h
- * $Revision: 1.0
- * $Author : Eric Yang
- * $Date : 2005.08.19
- *
- *****************************************************************************
- *
- * File Description : This file includes all the function about silicon FM module FM_SI47XX/01
- *
- * Definition by project
- *
- *****************************************************************************
- *
- * Revision Details
- * ----------------
- * $Log: l1alfmradio.h,v $
- * Revision 1.3 2005/12/01 01:20:42 05063078
- * change the SI_BAND value
- *
- * Revision 1.2 2005/11/11 03:43:26 QUANTA92101320
- * 1.Modify DlAu6535OutputSelect() and L1FrSendPowerOnWolfsonCommand() to play soft midi
- * 2.Add signal-base control of WM8976 I2S audio path
- * 3.Open default audio path(Headphone) for FM
- * 4.Add ReadST(),WaitSTC(),ReadRDS(),ReadRDSR(),ReadRDSE(),ReadRDS_Block(), FM_SI47XX_ReadRSSI(), FM_SI47XX_OpenRDS(), FM_SI47XX_SetSeekDepth() and FM_SI47XX_CloseRDS() for FM RDS/RBDS function
- * 5.Add signal-base control of power down WM8976
- *
- * Revision 1.1 2005/09/29 02:49:07 QUANTA91080103
- * no message
- *
- *
- ***************************************************************************/
- /* This file is created and include in the serial number 20050922-00000100-01962-G80 */
- //#if !defined (L1AL_FM_RADIO_H)
- //#define L1AL_FM_RADIO_H
- /***************************************************************************
- * Include Files
- ***************************************************************************/
- /***************************************************************************
- * Manifest Constants
- ***************************************************************************/
- /***************************************************************************
- * Type Definitions
- ***************************************************************************/
- typedef enum TAG_WRITE_REG_ADDR
- {
- WRITING,
- W02h,
- W03h,
- W04h,
- W05h
- }WRITE_REG_ADDR;
- typedef enum TAG_READ_REG_ADDR
- {
- READING,
- R0Ah,
- R0Bh,
- R0Ch,
- R0Dh,
- R0Eh,
- R0Fh,
- R00h,
- R01h,
- R02h,
- R03h,
- R04h,
- R05h
- }READ_REG_ADDR;
- typedef enum TAG_SEEKTH
- {
- SEEKTH25, SEEKTH26, SEEKTH27, SEEKTH28,
- SEEKTH29, SEEKTH30, SEEKTH31, SEEKTH32
- }SEEKTH;
- //typedef enum SEEK_DIRECTION_TAG
- //{
- //SEEKUP =0,
- //SEEKDOWN=1
- //}SEEK_DIRECTION;
- #define SEEKUP 0
- #define SEEKDOWN 1
- typedef enum VOL_DIRECTION_TAG
- {
- TURNUP,
- TURNDOWN
- }VOL_DIRECTION;
- typedef enum SEEK_STATUS_TAG
- {
- SEEKSUCCESS,
- SEEKFAILURE
- }SEEK_STATUS;
- #ifndef TRUE
- #define TRUE 1
- #endif
- #ifndef FALSE
- #define FALSE 0
- #endif
- /***************************************************************************
- * Macros
- ***************************************************************************/
- typedef enum RDS_STATUS_TAG
- {
- RDSA,
- RDSB,
- RDSC,
- RDSD
- }RDS_STATUS;
- #define SEEKUP 0
- #define SEEKDOWN 1
- void CfgGpio6As32KHZ(void);
- /* End of modification by Brian 20051111-00001100-02083-G80 */
- void FM_SI47XX_WriteReg(WRITE_REG_ADDR,u16);
- u16 FM_SI47XX_ReadReg(READ_REG_ADDR);
- void CfgFM_SI47XXGpio2AsInput(void);
- u8 ReadSTC(void);
- u8 ReadSF(void);
- /* Quanta modify by Brian 20051111-00001100-02083-G80 */
- u8 ReadST(void);
- /* End of modification by Brian 20051111-00001100-02083-G80 */
- u8 ReadGpio2(void);
- /* Quanta modify by Brian 20051111-00001100-02083-G80 */
- void WaitGpio2(void);
- void WaitSTC(void);
- u8 ReadRDS(void);
- u8 ReadRDSR(void);
- u8 ReadRDSE(void);
- u16 ReadRDS_BLOCK(RDS_STATUS);
- u8 FM_SI47XX_ReadRSSI(void);
- /* End of modification by Brian 20051111-00001100-02083-G80 */
- void CfgFM_SI47XXRstAsOutput(void);
- void FM_SI47XX_RST_LOW(void);
- void FM_SI47XX_RST_HIGH(void);
- void FM_SI47XX_2Wire(void);
- void FM_SI47XX_Reset(void);
- void FM_SI47XX_Init(void);
- /* Quanta modify by Jacky.Sun 20051202-00000100-*****-G80 */
- void FM_SI47XX_PowerUp(void);
- /* End of modification by Jacky.Sun 20051202-00000100-*****-G80 */
- /* Quanta modify by Brian 20051111-00001100-02083-G80 */
- void FM_SI47XX_OpenRDS(void);
- void FM_SI47XX_CloseRDS(void);
- void FM_SI47XX_SetBand(u8);
- void FM_SI47XX_SetSpacing(u8);
- void FM_SI47XX_SetSeekDepth(u8);
- /* End of modification by Brian 20051111-00001100-02083-G80 */
- void FM_SI47XX_PowerDown(void);
- void FM_SI47XX_Tune(u16);
- void FM_SI47XX_TuneNextChan(void);
- void FM_SI47XX_TunePrevChan(void);
- void
- FM_SI47XX_Seek(u16 SeekDirection, u16 *channel, u16 *scanok);
- SEEK_STATUS FM_SI47XX_SeekUp(void);
- SEEK_STATUS FM_SI47XX_SeekDown(void);
- u8 FM_SI47XX_AutoSeek(void);
- void FM_SI47XX_TuneUp(void);
- void FM_SI47XX_TuneDown(void);
- void FM_SI47XX_EraseAllSeekedChannels(void);
- u16 FM_SI47XX_ReadChannel(void);
- u16 FM_SI47XX_ChanToFreq(u16);
- u16 FM_SI47XX_FreqToChan(u16);
- void FM_SI47XX_Volume(u8);
- void FM_SI47XX_IncVolume(void);
- void FM_SI47XX_DecVolume(void);
- void FM_SI47XX_MuteVolume(void);
- void FM_SI47XX_DMuteVolume(void);
- int SI4703_I2C_Write( u8 *value,u8 size);
- int SI4703_I2C_Read( u8 *pvalue, u8 size);
- /***************************************************************************
- * Local Functions
- ***************************************************************************/
- /***************************************************************************
- * Global Functions
- ***************************************************************************/
- //#endif /* #if defined (QCI_L1_UPGRADE_SILICON_FM_MODULE) */
- //#endif