/**
 * @file ble_spp_client.h
 * @author LokLiang
 * @brief BLE 主机接口（客户端）
 * @version 0.1
 * @date 2023-09-21
 *
 * @copyright Copyright (c) 2023
 *
 */

#pragma once

#include "drivers/data_port/sb_data_port.h"
#include "os/os.h"

typedef enum
{
    BLE_CLIENT_STATUS_STOP,
    BLE_CLIENT_STATUS_SCANNING,
    BLE_CLIENT_STATUS_CONNECTED,
    BLE_CLIENT_STATUS_DISCONNECTED,
} ble_client_status_t;

typedef void (*ble_client_connect_cb)(ble_client_status_t);

sb_data_port_t *sb_ble_client_port_init(uint32_t buffer_size, int rx_task_priority);
sb_data_port_t *ble_client_port_bind(void);

void ble_client_start(const char *tar_name, ble_client_connect_cb cb);
void ble_client_stop(void);
ble_client_status_t ble_client_get_gap_status(void);
