• 大小: 314KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-08
  • 语言: 其他
  • 标签: QN8035  Driver  

资源简介

昆天科官方提供的Qn8035的驱动,手册中没有说明的寄存器,驱动中也有

资源截图

代码片段和文件信息

/************************************************Copyright(c)***********************************
**                                   Quintic(Shanghai) Microelectronics CoLtd.
**                                   
**                                   http://www.quinticcorp.com
**
**--------------------File Info----------------------------------------------------------------
** File Name:                  QN8035_API_V1.0_MTK.c(For MTK platform)
**----------------------------------------------------------------------------------------
************************************************************************************************/
#include “l1audio_def.h“
#include “qndriver.h“
#include “qnio.h“

#define FM_32K // base band 32k clock output
#define FM_32K_MOD  3

void SerialCommInit(void)
{
GPIO_ModeSetup(SCL0);
GPIO_ModeSetup(SDA0);
GPIO_InitIO(1SCL);
GPIO_InitIO(1SDA);
GPIO_WriteIO(1SCL);
  GPIO_WriteIO(1SDA); 
}

void SerialCommRelease(void)
{
GPIO_WriteIO(0SCL);
GPIO_WriteIO(0SDA);
}
void SerialCommCryClkOn(void)
{

GPIO_ModeSetup(FM_32K FM_32K_MOD);
// GPIO_SetClkOut(1 mode_f32k_ck);
Msdelay(10);
}
void SerialCommCryClkOff(void)
{
GPIO_ModeSetup(FM_32K0);
Msdelay(10);
}

void FMDrv_radio_item_info(kal_uint16 group_idx kal_uint16 item_idx kal_uint32 item_value)
{

}

void FMDrv_SetVolumeLevel(UINT8 level)
{
    QND_RXConfigAudio(QND_CONFIG_VOLUMElevel);
}
void FMDrv_Mute(UINT8 mute)
{
SerialCommInit();

if (mute == 1)
QND_RXConfigAudio(QND_CONFIG_MUTE 1 );
else
QND_RXConfigAudio(QND_CONFIG_MUTE 0 );

SerialCommRelease();
}
void FMDrv_Poweronreset(void)
{
SerialCommCryClkOn();
SerialCommInit();
QND_Init();
QND_SetSysMode(QND_MODE_FM|QND_MODE_RX);
QND_RXConfigAudio(QND_CONFIG_MUTE 1 );
QND_RXConfigAudio(QND_CONFIG_VOLUME40);
QND_RXConfigAudio(QND_CONFIG_MUTE 0 );
SerialCommRelease();
}

void FMDrv_PowerOffProc(void)
{
//SerialCommInit();
QND_SetSysMode(QND_MODE_SLEEP);
SerialCommCryClkOff();
//SerialCommRelease();
}
void FMDrv_SetFreq( int16 curf )
{
UINT16 ch;

SerialCommInit();

ch = (UINT16)(curf*10);
QND_TuneToCH(ch);

SerialCommRelease();
}

uint16 FMDrv_GetSigLvl( int16 curf )
{
UINT16 ch;
UINT16 rssi;

SerialCommInit();

ch = (UINT16)(curf*10);
rssi = QNM_GetRssi();

SerialCommRelease();

return rssi;

}
uint16 FMDrv_GetIF( int16 curf)
{
    // return 120;
}

void FMDrv_EvaluateRSSIThreshold(void)
{
//kal_prompt_trace(MOD_MMI“FMDrv_EvaluateRSSIThreshold“);
}

uint8 FMDrv_ValidStop(int16 freq int8 signalvl bool is_step_up)

{
UINT16 temp;
QND_RXSetTH(5);  //actuallyfor saving time of automatic scan channelonly need call once when enter to automatic seeking mode before.
    temp = QND_RXValidCH((UINT16)(freq * 10) QND_FSTEP_100KHZ);
if(temp)
return 1;
else
return 0;
}

void FMDrv_ChipInit(void)
{
//kal_prompt_trace(MOD_MMI“FMDr

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3254  2011-10-19 15:10  qn8035_sdk_driver_v1.91\Readme.txt

     文件        342  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\pc\readme.txt

     文件      33517  2011-10-19 15:09  qn8035_sdk_driver_v1.91\DriverAPI\Src\pc\qndriver.c

     文件      18385  2011-10-19 15:09  qn8035_sdk_driver_v1.91\DriverAPI\Src\pc\qndriver.h

     文件        141  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\busDriver\readme.txt

     文件       8567  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\busDriver\qnio.c

     文件       1085  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\busDriver\qnio.h

     文件        329  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\c51\readme.txt

     文件      35695  2011-10-19 15:09  qn8035_sdk_driver_v1.91\DriverAPI\Src\c51\qndriver.c

     文件      18803  2011-10-19 15:09  qn8035_sdk_driver_v1.91\DriverAPI\Src\c51\qndriver.h

     文件        329  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\noise_floor_scan\readme.txt

     文件      36306  2011-10-19 14:24  qn8035_sdk_driver_v1.91\DriverAPI\Src\noise_floor_scan\qndriver.c

     文件      18204  2011-10-19 14:24  qn8035_sdk_driver_v1.91\DriverAPI\Src\noise_floor_scan\qndriver.h

     文件       6064  2011-10-11 14:34  qn8035_sdk_driver_v1.91\DriverAPI\Src\tiny\qndriver.h

     文件      12134  2011-10-19 13:25  qn8035_sdk_driver_v1.91\DriverAPI\Src\tiny\qndriver.c

     文件        329  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\arm\readme.txt

     文件      33733  2011-10-19 15:09  qn8035_sdk_driver_v1.91\DriverAPI\Src\arm\qndriver.c

     文件      18143  2011-10-19 15:09  qn8035_sdk_driver_v1.91\DriverAPI\Src\arm\qndriver.h

     文件       3444  2011-10-13 14:32  qn8035_sdk_driver_v1.91\DriverAPI\Example\mtk\mtkqn.c

     文件     699314  2011-04-01 14:06  qn8035_sdk_driver_v1.91\Doc\QN8035 Driver SDK API Programming Guide_v1.4_072110.pdf

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\pc

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\busDriver

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\c51

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\noise_floor_scan

     目录          0  2011-10-19 14:27  qn8035_sdk_driver_v1.91\DriverAPI\Src\tiny

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src\arm

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Example\mtk

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Src

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI\Example

    ..AD...         0  2011-04-01 14:00  qn8035_sdk_driver_v1.91\DriverAPI

............此处省略5个文件信息

评论

共有 条评论