/*
 * scan_test.c
 *
 *  Created on: 2024Äê7ÔÂ8ÈÕ
 *      Author: Administrator
 */

#include "scan_test.h"
#include "ll_config.h"
#include <app_main.h>
#include "util.h"

Clock_Struct clkOpenScan;
Clock_Struct clkCloseScan;


void user_open_scan(void)
{
    GapScan_enable(0,0,0);
    Util_startClock(&clkCloseScan);
}

void user_close_scan(void)
{
    GapScan_disable();
    Util_startClock(&clkOpenScan);
}

void user_timer_init(void)
{
    Util_constructClock(&clkOpenScan, (void *)BLEAppUtil_invokeFunctionNoData, 1000, 0, false, (uint32_t)user_open_scan);
    Util_constructClock(&clkCloseScan, (void *)BLEAppUtil_invokeFunctionNoData,1000, 0, false, (uint32_t)user_close_scan);
}



