资源简介
蓝牙协议的C源代码,做无线通信也许用得着,分享了
!

代码片段和文件信息
/*
* Copyright (c) 2003 EISLAB Lulea University of Technology.
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without modification
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘‘AS IS‘‘ AND ANY EXPRESS OR IMPLIED
* WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* This file is part of the lwBT Bluetooth stack.
*
* Author: Conny Ohult
*
*/
#include “lwip/mem.h“
#include “lwip/memp.h“
#include “lwip/sys.h“
#include “lwip/stats.h“
#include “lwip/ip.h“
#include “lwip/udp.h“
#include “lwip/tcp.h“
#include “phybusif.h“
#include “netif/lwbt/lwbt_memp.h“
#include “netif/lwbt/hci.h“
#include “netif/lwbt/l2cap.h“
#include “netif/lwbt/sdp.h“
#include “netif/lwbt/rfcomm.h“
#include “netif/lwbt/ppp.h“
#include “netif/lwbt/nat.h“
#include “apps/httpd.h“
#include
#include
void bt_ip_start(void *state);
void bt_ip_tmr(void);
/*-----------------------------------------------------------------------------------*/
int
main(int argc char **argv)
{
struct phybusif_cb *cb;
struct timeval tcptv bttv now;
struct timezone tz;
u8_t btiptmr = 0;
#ifdef PERF
perf_init(“/tmp/minimal.perf“);
#endif /* PERF */
#ifdef STATS
stats_init();
#endif /* STATS */
mem_init();
memp_init();
pbuf_init();
netif_init();
ip_init();
//udp_init();
tcp_init();
printf(“TCP/IP initialized.\n“);
lwbt_memp_init();
phybusif_init();
if(hci_init() != ERR_OK) {
printf(“HCI initialization failed!“);
exit(-1);
}
l2cap_init();
sdp_init();
rfcomm_init();
ppp_init();
printf(“Bluetooth initialized.\n“);
//echo_init();
httpd_init();
printf(“Applications started.\n“);
cb = malloc(sizeof(struct phybusif_cb));
phybusif_reset(cb);
gettimeofday(&bttv &tz); /* I
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1639 2003-12-09 12:21 蓝牙协议源代码\lwbt-0.1\copying
文件 49635 2003-12-09 14:17 蓝牙协议源代码\lwbt-0.1\doc\lwbt-doc.pdf
文件 334 2003-12-09 14:54 蓝牙协议源代码\lwbt-0.1\files
文件 4098 2003-12-09 12:05 蓝牙协议源代码\lwbt-0.1\ports\linux\main.c
文件 2422 2003-12-09 12:06 蓝牙协议源代码\lwbt-0.1\ports\linux\phybusif.h
文件 7881 2003-12-09 12:06 蓝牙协议源代码\lwbt-0.1\ports\linux\uartif.c
文件 4691 2003-12-09 12:08 蓝牙协议源代码\lwbt-0.1\ports\rtxc\maintask.c
文件 2571 2003-12-09 12:08 蓝牙协议源代码\lwbt-0.1\ports\rtxc\phybusif.h
文件 8167 2003-12-09 12:08 蓝牙协议源代码\lwbt-0.1\ports\rtxc\uartif.c
文件 28097 2003-12-09 12:10 蓝牙协议源代码\lwbt-0.1\proj\dt\bt_ip_dt.c
文件 239 2003-12-09 14:46 蓝牙协议源代码\lwbt-0.1\proj\dt\files
文件 11237 2003-12-09 16:48 蓝牙协议源代码\lwbt-0.1\proj\dt\lwbtopts.h
文件 199 2003-12-09 14:38 蓝牙协议源代码\lwbt-0.1\proj\files
文件 36754 2003-12-09 12:09 蓝牙协议源代码\lwbt-0.1\proj\lap\bt_ip_lap.c
文件 571 2003-12-09 16:33 蓝牙协议源代码\lwbt-0.1\proj\lap\files
文件 11237 2003-12-09 16:48 蓝牙协议源代码\lwbt-0.1\proj\lap\lwbtopts.h
文件 2063 2003-12-09 14:08 蓝牙协议源代码\lwbt-0.1\readme
文件 8127 2003-12-09 12:11 蓝牙协议源代码\lwbt-0.1\src\core\fcs.c
文件 512 2003-12-09 14:34 蓝牙协议源代码\lwbt-0.1\src\core\files
文件 55382 2003-12-09 12:11 蓝牙协议源代码\lwbt-0.1\src\core\hci.c
文件 56588 2003-12-09 12:12 蓝牙协议源代码\lwbt-0.1\src\core\l2cap.c
文件 5507 2003-12-10 06:51 蓝牙协议源代码\lwbt-0.1\src\core\lwbt_memp.c
文件 66878 2003-12-09 12:14 蓝牙协议源代码\lwbt-0.1\src\core\ppp.c
文件 52092 2003-12-09 12:14 蓝牙协议源代码\lwbt-0.1\src\core\rfcomm.c
文件 30625 2003-12-09 12:15 蓝牙协议源代码\lwbt-0.1\src\core\sdp.c
文件 234 2003-12-09 14:34 蓝牙协议源代码\lwbt-0.1\src\files
文件 3043 2003-12-09 12:17 蓝牙协议源代码\lwbt-0.1\src\include\bd_addr.h
文件 1894 2003-12-09 12:18 蓝牙协议源代码\lwbt-0.1\src\include\fcs.h
文件 15277 2003-12-09 12:18 蓝牙协议源代码\lwbt-0.1\src\include\hci.h
文件 17534 2003-12-09 12:18 蓝牙协议源代码\lwbt-0.1\src\include\l2cap.h
............此处省略21个文件信息
- 上一篇:GE OPC Server
- 下一篇:C++监控注册表源代码
相关资源
- C++中头文件与源文件的作用详解
- 基于mfc的多线程文件传输
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 利用C++哈希表的方法实现电话号码查
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 移木块游戏,可以自编自玩,vc6.0编写
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- C++纯文字DOS超小RPG游戏
- 个人日常财务管理系统(C语言)
- MFC数字钟(基于VC6.0)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- 安科瑞智能电能表MODBUS通讯程序 VC6
- C语言实现的一个内存泄漏检测程序
评论
共有 条评论