⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drvfmradioprivate.h.svn-base

📁 ecos FM radio driver
💻 SVN-BASE
字号:
//=======================================================================//  The information contained herein is the exclusive property of//  Sunnnorth Technology Co。 And shall not be distributed, reproduced,//  or disclosed in whole in part without prior written permission。//  (C) COPYRIGHT 2005  SUNNORTH TECHNOLOGY CO。//  ALL RIGHTS RESERVED//  The entire notice above must be reproduced on all authorized copies。//=======================================================================//=======================================================================//  File Name:      DrvFMRadioPrivate.h//  Programmer:     guoquan//  Version:        1.0.0//  Date:          2005-11-21//  Applied body:   SPCA759A//  Description:    //  Revision history: // ----------------------------------------------------------------------//  Version, YYYY-MM-DD-Index, Modified By, Description// ----------------------------------------------------------------------//  1.0.0	    2005-11-21		guoquan	      初始版本//  1.1.0	    2006-4-5		wenyi	      修改IO口定义//=======================================================================#ifndef __DrvFMRADIOPRIVATE_H__#define __DrvFMRADIOPRIVATE_H__#include ".\system\TypeDefine.h"#include ".\REG320.h"#define C_FMRadioDelayNum					80//===========================================================================//						宏定义//===========================================================================#define __FMRadio_5767__//GPIO0 SDA, GPIO1 SCL#define M_FMRADIOI2C_IOEN				(XBYTE[0xB01A] = XBYTE[0xB01A] & 0xF9)		#define M_FMRADIOI2C_SDA_IN	     		(XBYTE[0xB038] = XBYTE[0xB038] & 0xFB)		#define M_FMRADIOI2C_SDA_OUT         	(XBYTE[0xB038] = XBYTE[0xB038] | 0x04)		#define M_FMRADIOI2C_SCL_IN	     		(XBYTE[0xB038] = XBYTE[0xB038] & 0xFD)		#define M_FMRADIOI2C_SCL_OUT         	(XBYTE[0xB038] = XBYTE[0xB038] | 0x02)		#define M_FMRADIOI2C_SDA_SET         	(XBYTE[0xB030] = XBYTE[0xb030] | 0x04)		#define M_FMRADIOI2C_SDA_CLR       		(XBYTE[0xB030] = XBYTE[0xb030] & 0xFB)		#define M_FMRADIOI2C_SCL_SET         	(XBYTE[0xB030] = XBYTE[0xb030] | 0x02)#define M_FMRADIOI2C_SCL_CLR       		(XBYTE[0xB030] = XBYTE[0xb030] & 0xFD)#define M_FMRADIOI2C_SDA_INPUT_DATA     (XBYTE[0xB040]&0x04)#ifdef _LV2400_#define LVLS_NO_ERROR					0		// no error// Software failures#define LVLS_NOT_DEFINED_ERR			0x01	// Not defined error#define LVLS_NO_MEMORY_ERR				0x02	// Error allocating memory#define LVLS_USER_ABORT_ERR				0x03	// User abort#define LVLS_CAN_NOT_ABORT_ERR			0x04	// Abort is not possible#define LVLS_CHIP_NOT_SUPPORT_ERR		0x05	// Not supported chip version#define LVLS_INVALID_PARAMETER_ERR		0x06	// Invalid paramter#define LVLS_CHIP_BUSY_ERR				0x07	// Chip busy#define LVLS_INVALID_REGION_ERR			0x08	// Attemp to set a not supported region#define LVLS_INV_LIMIT_SETTING_ERR		0x09	// Invalid limit (like low limit is greate than high limit)#define LVLS_NSU_FEATURE_ERR			0x0A	// Not supported feature (device capabilities ID)#define LVLS_INV_FEATURE_VALUE_ERR		0x0B	// Invalid feature value#define LVLS_IMPROPER_HW_SETTING_ERR	0x0C	// Attempt to set the hardware in improper mode#define LVLS_NSU_FUNCTION_ERR			0x0D	// Function not supported#define LVLS_FEATURE_NA_NOW_ERR			0x0E	// Feature (is not available in current radio mode#define LVLS_NO_CHIP_ERR				0x10	// No chip found#define LVLS_NO_MORE_PRST_MEM			0x11	// Out of preset storage memory (for storing frequency)#define LVLS_EMPTY_PRESET				0x12	// Attempt to recall an empty preset#define LVLS_FLASH_READ_ERR				0x13	// Flash read error#define LVLS_FLASH_WRITE_ERR			0x14	// Flash write error#define LVLS_FLASH_CORRUPT_ERR			0x15	// Flash corrupted#define LVLS_NO_DEV_ACK_ERR				0x16	// No acknowledge from device #define LVLS_TUNE_OSC_ERR				0x20	// Tuning Osc-register failed#define LVLS_IFOSC_OUTOFLIMIT_ERR		0x21	// An invalid value is sent to IF Osc register#define LVLS_STEREOSC_OUTOFLIMIT_ERR	0x22	// An invalid value is sent to Stereo Osc register#define LVLS_RFOSC_OUTOFLIMIT_ERR		0x23	// An invalid value is sent to RF Osc register#define LVLS_RFCAP_OUTOFLIMIT_ERR		0x24	// An invalid value is sent to RF CAP register#define LVLS_RDSOSC_OUTOFLIMIT_ERR		0x25	// An invalid value is sent to RDS Osc register#define LVLS_INV_REG_ADDRESS_ERR		0x26	// Attemp to write to an invalid register#define LVLS_INV_RFLIMIT_ERR			0x27	// Improper RF limit#define LVLS_CAPOSC_CALC_ERR			0x28	// Unable to calculate CAP/OSC value#define LVLS_POLLING_CNT_TIMEOUT		0x29	// Polling counting done timeout#define LVLS_AACAP_OUTOFLIMIT_ERR		0x2A	// An invalid value is sent to AM Antenna capacitor register#define LVLS_RFFREQ_ENDOFBAND_ERR		0x30	// RF frequency reaches the lower or upper band limit#define LVLS_RFFREQ_IF_FINETUNE_ERR		0x31	// Fine tune RF to IF failed (Not a valid station ?)#define LVLS_HW_AFC_FINETUNE_ERR		0x32	// Fine tune by hardware AFC failed (drift is too big?)#define LVLS_UNREACHABLE_FREQ_ERR		0x33	// Requested frequency exceeds hardware limit#define LVLS_NO_STATION_FOUND_ERR		0x34	// No station found after searching the whole band#define LVLS_FREQ_IN_LIMIT_GAP_ERR		0x35	// Invalid frequency to be set#define LVLS_FREQ_OO_BAND_ERR			0x36	// Frequency is out of band// Range 0x40: State machine failures#define LVLS_SM_TIMEOUT_ERR				0x40	// Time out while executing command with state machine#define LVLS_SM_COLLISION_ERR			0x41	// Collision error (write-acces while SM busy)#define LVLS_SM_BAND_LIM_ERR			0x42	// Band limit error#define LVLS_SM_DAC_LIM_ERR				0x43	// DAC limit error#define LVLS_SM_ND4_ERR					0x44	// Not define code (4)#define LVLS_SM_ND5_ERR					0x45	// Not define code (5)#define LVLS_SM_PWR_DOWN_ERR			0x46	// Access while Power down#define LVLS_SM_BUSY_ERR				0x47	// Busy// Internal errors#define LVLS_FREQ_JUMP_ERR				0x50	// Warning - frequency is adjusted#define LVLS_INV_KPMENU_ERR				0x51	// Invalid keypad menu// Make sure in the hardware LV24200 is correctly configured (Address C2 can also be used)!#define LV24200_I2C_ADDR_W	0xC0					// I2C addess of LV24200 device for writing (bit 0=0)#define LV24200_I2C_ADDR_R	(LV24200_I2C_ADDR_W|1)	// I2C addess of LV24200 device for reading (bit 0=1)#endif//=======================================================================//				         函数声明									 //=======================================================================extern void FMRadioI2CDelay(UCHAR ucCount);extern void FMRadioI2CSendStart(void);extern void FMRadioI2CSendStop(void);extern UCHAR FMRadioI2CWaitAck(void);extern UCHAR  FMRadioI2CSendByte(UCHAR ucData);extern UCHAR FMRadioI2CReceiveByte(UCHAR ucSendAck);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -