当前位置:   article > 正文

realtek uart bluetooth 调试记录1 之uart 端口调用_using device /dev/ttys1 for bluetooth

using device /dev/ttys1 for bluetooth

文件:android4sam_v4.4/hardware/realtek/bt/libbt-vendor/include/vnd_sama5d4.txt
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1"

文件:android4sam_v4.4/hardware/realtek/bt/libbt-vendor/src/bt_vendor_rtk.c
static int init(const bt_vendor_callbacks_t* p_cb, unsigned char *local_bdaddr)
{
    ALOGI("init@dern");


    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;
}


/*******************************************************************************
**
** Function        userial_vendor_init
**
** Description     Initialize userial vendor-specific control block
**
** Returns         None
**
*******************************************************************************/
void userial_vendor_init(void)
{
    vnd_userial.fd = -1;
    vnd_userial.dev_id = 0;
    snprintf(vnd_userial.port_name, VND_PORT_NAME_MAXLEN, "%s", \
            BLUETOOTH_UART_DEVICE_PORT);

    ALOGD("BLUETOOTH_UART_DEVICE_PORT=%s\n", BLUETOOTH_UART_DEVICE_PORT);
}



声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/192574
推荐阅读
相关标签
  

闽ICP备14008679号