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_le_fixed_chan_register(&chan); }
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; }
void bt_l2cap_init(void) { static struct bt_l2cap_fixed_chan chan = { .cid = BT_L2CAP_CID_LE_SIG, .accept = l2cap_accept, }; bt_l2cap_le_fixed_chan_register(&chan); if (IS_ENABLED(CONFIG_BLUETOOTH_BREDR)) { bt_l2cap_br_init(); } #if defined(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL) NET_BUF_POOL_INIT(le_data_pool); #endif }
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 */ }