Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1691315
  • 博文数量: 410
  • 博客积分: 9563
  • 博客等级: 中将
  • 技术积分: 4517
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-03 19:59
个人简介

文章分类

全部博文(410)

文章存档

2017年(6)

2016年(1)

2015年(3)

2014年(4)

2013年(32)

2012年(45)

2011年(179)

2010年(140)

分类: Python/Ruby

2011-02-22 21:23:25

  1. from ctypes import *
  2. 7 : foo=CDLL('./libbst.so')
  3. class BLUETOP_DEV_HANDLE(Structure):
  4.     _fields_ = [("DeviceId",c_ubyte),
  5.                 ("ChannelId",c_ubyte),
  6.                 ("Reserved",c_ushort),
  7.                 ("handle",c_int)]
  8.   

  9. 13: devhandle=BLUETOP_DEV_HANDLE()
  10. 14: dh=byref(devhandle)
  11. 15: dh
  12. 16: b=foo.bst_initial_dev_handle(dh,0,0)
  13. 17: c=foo.bst_initial(byref(devhandle),0)
  14. 18: c
  15. 19: d=foo.bst_get_device_num(dh)
  16. 20: d
  17. 21: e=foo.bst_get_device_channel_num(dh)
  18. 22: e
阅读(959) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~