예제 #1
0
파일: hidh_conn.c 프로젝트: morrey/bt_bcm
/*******************************************************************************
**
** Function         hidh_l2cif_reg
**
** Description      This function initializes the SDP unit.
**
** Returns          void
**
*******************************************************************************/
tHID_STATUS hidh_conn_reg (void)
{
    int xx;

    /* Initialize the L2CAP configuration. We only care about MTU and flush */
    memset(&hh_cb.l2cap_cfg, 0, sizeof(tL2CAP_CFG_INFO));

    hh_cb.l2cap_cfg.mtu_present          = TRUE;
    hh_cb.l2cap_cfg.mtu                  = HID_HOST_MTU;
    hh_cb.l2cap_cfg.flush_to_present     = TRUE;
    hh_cb.l2cap_cfg.flush_to             = HID_HOST_FLUSH_TO;

    /* Now, register with L2CAP */
    if (!L2CA_Register (HID_PSM_CONTROL, (tL2CAP_APPL_INFO *) &hst_reg_info))
    {
        HIDH_TRACE_ERROR ("HID-Host Control Registration failed");
        return (HID_ERR_L2CAP_FAILED) ;
    }
    if (!L2CA_Register (HID_PSM_INTERRUPT, (tL2CAP_APPL_INFO *) &hst_reg_info))
    {
        L2CA_Deregister( HID_PSM_CONTROL ) ;
        HIDH_TRACE_ERROR ("HID-Host Interrupt Registration failed");
        return (HID_ERR_L2CAP_FAILED) ;
    }

    for (xx = 0; xx < HID_HOST_MAX_DEVICES; xx++)
    {
        hh_cb.devices[xx].in_use = FALSE ;
        hh_cb.devices[xx].conn.conn_state = HID_CONN_STATE_UNUSED;
    }

    return (HID_SUCCESS);
}
/*******************************************************************************
**
** Function         AVDT_Deregister
**
** Description      This function is called to deregister use AVDTP protocol.
**                  It is called when AVDTP is no longer being used by any
**                  application in the system.  Before this function can be
**                  called, all streams must be removed with AVDT_RemoveStream().
**
**
** Returns          void
**
*******************************************************************************/
void AVDT_Deregister(void)
{
    BTTRC_AVDT_API0(AVDT_TRACE_API_DEREGISTER);

    /* deregister PSM with L2CAP */
    L2CA_Deregister(AVDT_PSM);
}
예제 #3
0
/*******************************************************************************
**
** Function         BNEP_Deregister
**
** Description      This function is called by the upper layer to de-register
**                  its callbacks.
**
** Parameters:      void
**
**
** Returns          void
**
*******************************************************************************/
void BNEP_Deregister (void)
{
    /* Clear all the call backs registered */
    bnep_cb.p_conn_ind_cb       = NULL;
    bnep_cb.p_conn_state_cb     = NULL;
    bnep_cb.p_data_ind_cb       = NULL;
    bnep_cb.p_data_buf_cb       = NULL;
    bnep_cb.p_filter_ind_cb     = NULL;
    bnep_cb.p_mfilter_ind_cb    = NULL;

    bnep_cb.profile_registered  = FALSE;
    L2CA_Deregister (BT_PSM_BNEP);
}
static bt_status_t L2cap_DeRegister (UINT16 psm)
{
    L2CA_Deregister(psm);
    return BT_STATUS_SUCCESS;
}
예제 #5
0
파일: avdt_api.c 프로젝트: Exchizz/esp-idf
/*******************************************************************************
**
** Function         AVDT_Deregister
**
** Description      This function is called to deregister use AVDTP protocol.
**                  It is called when AVDTP is no longer being used by any
**                  application in the system.  Before this function can be
**                  called, all streams must be removed with AVDT_RemoveStream().
**
**
** Returns          void
**
*******************************************************************************/
void AVDT_Deregister(void)
{
    /* deregister PSM with L2CAP */
    L2CA_Deregister(AVDT_PSM);
}