/* Allocate an event to send a connection complete event when initiating */
static int ble_ll_init_alloc_conn_comp_ev(void)
/* Allocate an event to send a connection complete event when initiating */
static int ble_ll_init_alloc_conn_comp_ev(void)
{
    int rc;
    uint8_t *evbuf;
    rc = 0;
    evbuf = g_ble_ll_conn_comp_ev;
    if (evbuf == NULL) {
        evbuf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_HI);
        if (!evbuf) {
            rc = -1;
        } else {
            g_ble_ll_conn_comp_ev = evbuf;
        }
    }
    return rc;
}