123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- extern "C" {
- STATIC_ASSERT((_max_clients) <= BLE_CONN_STATE_MAX_CONNECTIONS); \
- static uint32_t CONCAT_2(_name, _ctx_data_pool)[(_max_clients)*BYTES_TO_WORDS(_link_ctx_size)]; \
- static blcm_link_ctx_storage_t _name = \
- { \
- .p_ctx_data_pool = CONCAT_2(_name, _ctx_data_pool), \
- .max_links_cnt = (_max_clients), \
- .link_ctx_size = sizeof(CONCAT_2(_name, _ctx_data_pool))/(_max_clients) \
- }
- typedef struct
- {
- void * const p_ctx_data_pool;
- uint8_t const max_links_cnt;
- uint16_t const link_ctx_size;
- } blcm_link_ctx_storage_t;
- ret_code_t blcm_link_ctx_get(blcm_link_ctx_storage_t const * const p_link_ctx_storage,
- uint16_t const conn_handle,
- void ** const pp_ctx_data);
- }
|