• 大小: 1.89MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-20
  • 语言: 其他
  • 标签: HCI  bluetooth  蓝牙  usb  

资源简介

蓝牙芯片 HCI 层的传输驱动 , 使用 USB 总线, 适用于 windows 系统, 驱动实现了4个借口: SEND_HCI, GET_STATUS, WriteFile ReadFile;

资源截图

代码片段和文件信息

//
// bluetooth_senderApp.cpp  : Defines the entry point for the application.
//
// Generated by C DriverWizard 3.2.0 (Build 2485)
// Requires DDK Only
// File created on 2/15/2010
//
#include “bluetooth_senderApp.h“

// Array of possible transfer types
PTCHAR g_TransferTypeArray[] =
{
    _T(“ReadFile“)
    _T(“WriteFile“)
    _T(“IOCTL_SEND_CMD“)
    _T(“IOCTL_RECV_EVENT“)
    _T(““)
};

HANDLE              g_hDevice = INVALID_HANDLE_VALUE;
HDEVNOTIFY          g_hInterfaceNotification = NULL;
BLUETOOTH_SENDER_LIST_ITEM   g_IoList;
CRITICAL_SECTION    g_IoListLock;
HANDLE              g_hIoCompletionThreadTerminationEvent;
HANDLE              g_hIoCompletionThread;

///////////////////////////////////////////////////////////////////////////////////////////////////
//  bluetooth_senderOutputText
//      method to output text in the output window
//
//  Arguments:
//      IN  Format
//              Text format to print to output window
//
//  Return Value:
//      None.
//
VOID bluetooth_senderOutputText(LPCTSTR Format ...)
{
    TCHAR       str[MAX_STRING_LENGTH];
    va_list     vaList;

    va_start(vaList Format);

    _vstprintf(str Format vaList);

    OutputDebugString(_T(“bluetooth_sender: “));
    OutputDebugString(str);
    OutputDebugString(_T(“\n“));

    va_end(vaList);

    return;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
//  bluetooth_senderOutputBuffer
//      method to output text in the output window
//
//  Arguments:
//      IN  Buffer
//              Data Buffer
//
//      IN  Size
//              Size of Data Buffer
//
//  Return Value:
//      None.
//
VOID bluetooth_senderOutputBuffer(PVOID Buffer ULONG Size)
{
    TCHAR       str[MAX_STRING_LENGTH];
    LONG        length = (LONG)Size;
    PUCHAR      p = (PUCHAR)Buffer;
    TCHAR       data[MAX_STRING_LENGTH];
    TCHAR       rawData[MAX_STRING_LENGTH];
    ULONG       i;
    ULONG       j;

    for (i = 0; i < Size; i += 16)
    {
        ZeroMemory(str sizeof(str));
        ZeroMemory(rawData sizeof(rawData));

        _stprintf(str _T(“%04.4X  “) i);

        for (j = 0; j < 16; ++j ++p)
        {
            if (length > 0)
            {
                _stprintf(data _T(“%02X “) *p);
            }
            else
            {
                _stprintf(data _T(“   “));
            }

            _tcsncat(str data 3);

            if (length > 0)
            {
                TCHAR c = (TCHAR)(*p);

                if (_istalnum(_TUCHAR(c)))
                {
                    _stprintf(data _T(“%c“) c);
                }
                else
                {
                    _tcsncat(rawData _T(“?“) 1);
                }

                --length;
            }
        }

        _tcsncat(str _T(“  “) 2);
        _tcsncat(str rawData 16);

        OutputDeb

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

     文件      19972  2010-02-15 13:07  bluetooth_sender\app\bluetooth_senderApp.cpp

     文件       1571  2010-02-15 13:07  bluetooth_sender\app\bluetooth_senderApp.h

     文件       2256  2010-02-15 13:07  bluetooth_sender\app\bluetooth_senderApp.rc

     文件       6258  2010-02-15 13:09  bluetooth_sender\app\bluetooth_senderApp.vcproj

     文件       1418  2010-02-18 22:14  bluetooth_sender\app\bluetooth_senderApp.vcproj.ICT-BAMU.pxy.user

     文件      20200  2010-02-15 13:07  bluetooth_sender\app\bluetooth_senderIorw.cpp

    .......      3758  2010-02-15 13:14  bluetooth_sender\app\buildchk.log

     文件        267  2010-02-15 13:07  bluetooth_sender\app\makefile

    .......       558  2010-02-15 13:14  bluetooth_sender\app\obj\_objects.mac

     文件      15360  2010-02-15 13:14  bluetooth_sender\app\objchk\i386\bluetooth_senderApp.exe

     文件      27899  2010-02-15 13:14  bluetooth_sender\app\objchk\i386\bluetooth_senderapp.obj

     文件     132096  2010-02-15 13:14  bluetooth_sender\app\objchk\i386\bluetooth_senderApp.pdb

     文件       1456  2010-02-15 13:14  bluetooth_sender\app\objchk\i386\bluetooth_senderapp.res

     文件      26910  2010-02-15 13:14  bluetooth_sender\app\objchk\i386\bluetooth_senderiorw.obj

     文件       1052  2010-02-15 13:07  bluetooth_sender\app\resource.h

     文件        654  2010-02-15 13:07  bluetooth_sender\app\sources

     文件    7146496  2010-02-18 22:14  bluetooth_sender\bluetooth_sender.ncb

     文件       1368  2010-02-15 13:09  bluetooth_sender\bluetooth_sender.sln

    ..A..H.     23040  2010-02-18 22:14  bluetooth_sender\bluetooth_sender.suo

     文件       9060  2010-02-15 13:07  bluetooth_sender\bluetooth_senderVars.xml

     文件         35  2010-02-15 13:07  bluetooth_sender\dirs

     文件      39160  2010-02-16 22:01  bluetooth_sender\driver\bluetooth_sender.c

     文件        172  2010-02-15 13:07  bluetooth_sender\driver\bluetooth_sender.cat

     文件         55  2010-02-15 13:07  bluetooth_sender\driver\bluetooth_sender.ctl

     文件      21307  2010-02-15 15:55  bluetooth_sender\driver\bluetooth_sender.h

     文件       3844  2010-02-15 13:07  bluetooth_sender\driver\bluetooth_sender.inf

     文件       1148  2010-02-15 13:07  bluetooth_sender\driver\bluetooth_sender.rc

     文件      46848  2010-02-18 22:07  bluetooth_sender\driver\bluetooth_sender.sys

     文件       7920  2010-02-15 13:09  bluetooth_sender\driver\bluetooth_sender.vcproj

     文件       1418  2010-02-18 22:14  bluetooth_sender\driver\bluetooth_sender.vcproj.ICT-BAMU.pxy.user

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

评论

共有 条评论