0
xu xin

您好!

我根据sdk-ameba-v4.0b\component\common\example\get_beacon_frame文件夹下的readme.txt说明,

[platform_opts.h]
 #define CONFIG_EXAMPLE_GET_BEACON_FRAME 1

希望显示出beacon帧的一些信息,在编译时出错,错误信息如下:

 

D:\cygwin\sdk-ameba-v4.0b\project\realtek_ameba1_va0_example\GCC-RELEASE/../../../component/common/example/get_beacon_frame/example_get_beacon_frame.c:38: undefined reference to `get_beacon_frame_callback'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [application.mk:521application] 错误 1
make[1]: 离开目录“/cygdrive/d/cygwin/sdk-ameba-v4.0b/project/realtek_ameba1_va0_example/GCC-RELEASE”
make: *** [Makefile:16ram_all] 错误 2

在文件example_get_beacon_frame.c中,定义

extern get_beacon_frame_func_ptr get_beacon_frame_callback;

void get_beacon_frame_thread(void *param)
{
vTaskDelay(10000);//a rough time for waiting wifi connected
//Register callback function until wifi connected
get_beacon_frame_callback = get_beacon_frame_func;
vTaskDelete(NULL);
return;
}

请问回调函数是不是在未开源的部分调用的?我想获取beacon帧的一些数据还有什么方式来获取?

xu xin 回答了