void ip_buf_init(void) { NET_DBG("Allocating %d RX and %d TX buffers for IP stack\n", IP_BUF_RX_SIZE, IP_BUF_TX_SIZE); net_buf_pool_init(rx_buffers); net_buf_pool_init(tx_buffers); }
void bt_l2cap_init(void) { static struct bt_l2cap_fixed_chan chan = { .cid = BT_L2CAP_CID_LE_SIG, .accept = l2cap_accept, }; net_buf_pool_init(le_sig_pool); #if defined(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL) net_buf_pool_init(le_data_pool); #endif /* CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL */ bt_l2cap_le_fixed_chan_register(&chan); #if defined(CONFIG_BLUETOOTH_BREDR) bt_l2cap_br_init(); #endif /* CONFIG_BLUETOOTH_BREDR */ }
void bt_att_init(void) { static struct bt_l2cap_fixed_chan chan = { .cid = BT_L2CAP_CID_ATT, .accept = bt_att_accept, }; net_buf_pool_init(att_pool); bt_l2cap_fixed_chan_register(&chan); }
int bt_conn_init(void) { int err; net_buf_pool_init(frag_pool); net_buf_pool_init(dummy_pool); bt_att_init(); err = bt_smp_init(); if (err) { return err; } bt_l2cap_init(); background_scan_init(); return 0; }
int bt_smp_init(void) { static struct bt_l2cap_fixed_chan chan = { .cid = BT_L2CAP_CID_SMP, .accept = bt_smp_accept, }; net_buf_pool_init(smp_pool); bt_l2cap_le_fixed_chan_register(&chan); return 0; }
static void h5_init(void) { BT_DBG(""); h5.link_state = UNINIT; h5.rx_state = START; h5.tx_win = 4; /* TX fiber */ nano_fifo_init(&h5.tx_queue); fiber_start(tx_stack, sizeof(tx_stack), (nano_fiber_entry_t)tx_fiber, 0, 0, 7, 0); /* RX fiber */ net_buf_pool_init(signal_pool); nano_fifo_init(&h5.rx_queue); fiber_start(rx_stack, sizeof(rx_stack), (nano_fiber_entry_t)rx_fiber, 0, 0, 7, 0); /* Unack queue */ nano_fifo_init(&h5.unack_queue); }
void l2_buf_init(void) { NET_DBG("Allocating %d L2 buffers\n", NET_NUM_L2_BUFS); net_buf_pool_init(l2_buffers); }