hid_keyboard_scan.c

来自「根據bluelab3.5.2實例hid-keyboard做出應用」· C语言 代码 · 共 51 行

C
51
字号
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2005-2006
Part of BlueLab 3.5.2-release

FILE NAME
    hid_keyboard_scan.c        
DESCRIPTION
    This file contains the scan enable functions.
NOTES

*/

/****************************************************************************
    Header files
*/
#include "hid_keyboard.h"
#include "hid_keyboard_sm.h"
#include "hid_keyboard_scan.h"
#include "hid_keyboard_auth.h"

/*************************************************************************
NAME    
    appUpdateScanEnable 
DESCRIPTION
    This function is called to update the scan enable mode.  It checks the
    current state of the application and sets the mode accordingly.
RETURNS
    void     
*/
void appUpdateScanEnable(appTaskData *theApp)
{
    hci_scan_enable scan_enable;

    /* Get current state */
    switch (appGetState(theApp))
    {
        case appDiscoverable:
        case appDiscoverableConnecting:
            scan_enable = hci_scan_enable_inq_and_page;
            break;

        default:
            scan_enable = hci_scan_enable_off;
            break;
    }

    /* Update scan enable settings */
  	ConnectionWriteScanEnable(scan_enable);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?