关于CSR8670编程中ConnectionInitEx2函数的一些问题.
来源: 评论:0 点击:
本人新手,刚刚开始接触CSR8670系列的东西。从IDE到编程方式各种不懂。这两天刚刚到了一块开发板,抱着先改个程序玩玩儿的心态,改了一小段代码,然后就受了无比大的打击。
我在程序中用了ConnectionInitEx2这个函数,根据ADK中给出的API手册查出了头文件也加上了,编译也通过了,就是在链接的时候报了一个错误:
ld: Undefined symbols:
$_ConnectionInitEx2
没有符号链接,没有,没有,没有符号链接,为啥呢,?
求各路资深工程师解答。新手感激不尽!!!!
代码如下:
#include
#include
#include
#include
#include
#include "sink_debug.h"
#include "sink_private.h"
/* Single instance of the device state */
hsTaskData g_stTheSink;
extern void _init(void);
/*************************************************************************
NAME
app_handler
DESCRIPTION
This is the main message handler for the Sink Application.All
messages pass through this handler to the subsequent handlers.
RETURNS
VOID
*************************************************************************/
static void app_handler(Task task, MessageId id, Message message)
{
DEBUG(("app_handler [%s]n", __TIME__));
return;
}
/*************************************************************************
NAME
app_handler
DESCRIPTION
Time critical initialisation
RETURNS
VOID
*************************************************************************/
void _init(void)
{
DEBUG(("_init [%s]n", __TIME__));
g_stTheSink.task.handler = app_handler;
return;
}
/*************************************************************************
NAME
main
DESCRIPTION
The Sink Application starts here...
RETURNS
int
*************************************************************************/
int main(void)
{
uint16 usBootMode;
DEBUG(("Main [%s]n", __TIME__));
usBootMode = BootGetMode();
switch (usBootMode)
{
#ifdef CVC_PRODTEST
case BOOTMODE_CVC_PRODTEST:
/*run the cvc prod test code and dont start the applicaiton */
cvcProductionTestEnter() ;
break ;
#endif
case BOOTMODE_DFU:
/*do nothing special for the DFU boot mode,
This mode expects to have the appropriate host interfface enabled
Don't start the application */
break ;
case BOOTMODE_DEFAULT:
case BOOTMODE_CUSTOM:
case BOOTMODE_USB_LOW_POWER:
case BOOTMODE_ALT_FSTAB:
default:
{
/*the above are application boot modes so kick of the app init routines*/
const msg_filter usMsgFilter = msg_group_acl;
uint16 usPdlNumberOfDevices = 1;
/* the number of paired devices can be restricted using pskey user 40,
a number between 1 and 8 is allowed
PsRetrieve(PSKEY_PAIRED_DEVICE_LIST_SIZE, &usPdlNumberOfDevices , sizeof(uint16));*/
DEBUG (("PDLSize[%d]n" , usPdlNumberOfDevices));
/* Initialise the Connection Library with the options */
ConnectionInitEx2(&g_stTheSink.task, &usMsgFilter, usPdlNumberOfDevices );
}
break;
}
/* Start the message scheduler loop */
MessageLoop();
/* You never get here... */
return 0;
}
我在程序中用了ConnectionInitEx2这个函数,根据ADK中给出的API手册查出了头文件也加上了,编译也通过了,就是在链接的时候报了一个错误:
ld: Undefined symbols:
$_ConnectionInitEx2
没有符号链接,没有,没有,没有符号链接,为啥呢,?
求各路资深工程师解答。新手感激不尽!!!!
代码如下:
#include
#include
#include
#include
#include
#include "sink_debug.h"
#include "sink_private.h"
/* Single instance of the device state */
hsTaskData g_stTheSink;
extern void _init(void);
/*************************************************************************
NAME
app_handler
DESCRIPTION
This is the main message handler for the Sink Application.All
messages pass through this handler to the subsequent handlers.
RETURNS
VOID
*************************************************************************/
static void app_handler(Task task, MessageId id, Message message)
{
DEBUG(("app_handler [%s]n", __TIME__));
return;
}
/*************************************************************************
NAME
app_handler
DESCRIPTION
Time critical initialisation
RETURNS
VOID
*************************************************************************/
void _init(void)
{
DEBUG(("_init [%s]n", __TIME__));
g_stTheSink.task.handler = app_handler;
return;
}
/*************************************************************************
NAME
main
DESCRIPTION
The Sink Application starts here...
RETURNS
int
*************************************************************************/
int main(void)
{
uint16 usBootMode;
DEBUG(("Main [%s]n", __TIME__));
usBootMode = BootGetMode();
switch (usBootMode)
{
#ifdef CVC_PRODTEST
case BOOTMODE_CVC_PRODTEST:
/*run the cvc prod test code and dont start the applicaiton */
cvcProductionTestEnter() ;
break ;
#endif
case BOOTMODE_DFU:
/*do nothing special for the DFU boot mode,
This mode expects to have the appropriate host interfface enabled
Don't start the application */
break ;
case BOOTMODE_DEFAULT:
case BOOTMODE_CUSTOM:
case BOOTMODE_USB_LOW_POWER:
case BOOTMODE_ALT_FSTAB:
default:
{
/*the above are application boot modes so kick of the app init routines*/
const msg_filter usMsgFilter = msg_group_acl;
uint16 usPdlNumberOfDevices = 1;
/* the number of paired devices can be restricted using pskey user 40,
a number between 1 and 8 is allowed
PsRetrieve(PSKEY_PAIRED_DEVICE_LIST_SIZE, &usPdlNumberOfDevices , sizeof(uint16));*/
DEBUG (("PDLSize[%d]n" , usPdlNumberOfDevices));
/* Initialise the Connection Library with the options */
ConnectionInitEx2(&g_stTheSink.task, &usMsgFilter, usPdlNumberOfDevices );
}
break;
}
/* Start the message scheduler loop */
MessageLoop();
/* You never get here... */
return 0;
}
怎么没人,顶一下
本人也刚接触,o基础
CSR的资料都比较封闭,有需要最好找专门开发公司开发。省时,省事,还保证品质
专注CSR蓝牙模组开发
深圳市森能科技有限公司
Tel:0755-85208089
XXXXX
加一个 connection 库在工程配置里面加
不错不错,还可以的资料
相关热词搜索:链接
评论排行
- ·HFSS天线设计入门中文视频教程(1)
- ·CST2013破解文件,和谐万岁(1)
- ·关于打不开ADS帮助文档(1)
- ·基于左手介质的小型微带天线(1)
- ·HFSS10中仿真出现的错误(1)
- ·HFSS仿真螺旋天线模型的脚本程序(1)
- ·HFSS能仿真线圈天线吗?(1)
- ·Momentum中无法设置Substrate?(1)
- ·大家ADS2008中PIN二极管如何设定啊(1)
- ·请教ADS中的MSub个参数的意思(1)
- ·HFSS中怎么设置一个平面波激励啊(1)
- ·Hfss局部加密网格(1)
- ·HFSS使用心得(1)
- ·HFSS设计微带发夹型滤波器,求耦合系数请教(1)
- ·Microstrip Antenna Technology (Ke...(0)
- ·跟大家分享个宽频带90度功分移相网络(0)
- ·求教ADS中倍频器与频率源设置(0)
- ·30多个ADS视频教程在线观看(0)
- ·微波射频电路仿真100例(0)
- ·射频功率放大器设计资料(0)