コード例 #1
0
static int init(const bt_vendor_callbacks_t* p_cb, unsigned char *local_bdaddr)
{
    BTVNDDBG("init");

    if (p_cb == NULL)
    {
        BTVNDERR("init failed with no user callbacks!");
        return -1;
    }

#if (VENDOR_LIB_RUNTIME_TUNING_ENABLED == TRUE)
    BTVNDDBG("*****************************************************************");
    BTVNDDBG("*****************************************************************");
    BTVNDDBG("** Warning - BT Vendor Lib is loaded in debug tuning mode!");
    BTVNDDBG("**");
    BTVNDDBG("** If this is not intentional, rebuild libbt-vendor.so ");
    BTVNDDBG("** with VENDOR_LIB_RUNTIME_TUNING_ENABLED=FALSE and ");
    BTVNDDBG("** check if any run-time tuning parameters needed to be");
    BTVNDDBG("** carried to the build-time configuration accordingly.");
    BTVNDDBG("*****************************************************************");
    BTVNDDBG("*****************************************************************");
#endif

    userial_vendor_init();
    upio_init();

    vnd_load_conf(VENDOR_LIB_CONF_FILE);

    /* Properties values override previous configuration */
    vnd_load_prop();

    /* store reference to user callbacks */
    bt_vendor_cbacks = (bt_vendor_callbacks_t *) p_cb;

    /* This is handed over from the stack */
    memcpy(vnd_local_bd_addr, local_bdaddr, 6);

#ifdef USE_CELLULAR_COEX
    hci_bind_client_init();
#endif

    return 0;
}
コード例 #2
0
static int init(const bt_vendor_callbacks_t* p_cb, unsigned char *local_bdaddr)
{
    ALOGI("init");

    if (p_cb == NULL)
    {
        ALOGE("init failed with no user callbacks!");
        return -1;
    }

    userial_vendor_init();

    /* store reference to user callbacks */
    bt_vendor_cbacks = (bt_vendor_callbacks_t *) p_cb;

    /* This is handed over from the stack */
    memcpy(vnd_local_bd_addr, local_bdaddr, 6);

    return 0;
}