Lines Matching refs:load

5746 	struct ccc_load *load = user_data;  in ccc_load()  local
5757 if (!load->entry) { in ccc_load()
5758 ccc_clear(ccc, load->addr_with_id.addr, load->addr_with_id.id); in ccc_load()
5760 } else if (!load->count) { in ccc_load()
5765 if (load->entry->handle != handle) { in ccc_load()
5770 if (load->entry->handle < handle) { in ccc_load()
5772 " found", load->entry->handle); in ccc_load()
5778 LOG_DBG("Restoring CCC: handle 0x%04x value 0x%04x", load->entry->handle, in ccc_load()
5779 load->entry->value); in ccc_load()
5781 cfg = ccc_find_cfg(ccc, load->addr_with_id.addr, load->addr_with_id.id); in ccc_load()
5788 bt_addr_le_copy(&cfg->peer, load->addr_with_id.addr); in ccc_load()
5789 cfg->id = load->addr_with_id.id; in ccc_load()
5792 cfg->value = load->entry->value; in ccc_load()
5795 load->entry++; in ccc_load()
5796 load->count--; in ccc_load()
5798 return load->count ? BT_GATT_ITER_CONTINUE : BT_GATT_ITER_STOP; in ccc_load()
5806 struct ccc_load load; in ccc_set() local
5818 load.addr_with_id.id = BT_ID_DEFAULT; in ccc_set()
5827 load.addr_with_id.id = (uint8_t)next_id; in ccc_set()
5836 load.addr_with_id.addr = &addr; in ccc_set()
5846 load.entry = ccc_store; in ccc_set()
5847 load.count = len / sizeof(*ccc_store); in ccc_set()
5849 for (size_t i = 0; i < load.count; i++) { in ccc_set()
5854 load.entry = NULL; in ccc_set()
5855 load.count = 0; in ccc_set()
5858 bt_gatt_foreach_attr(0x0001, 0xffff, ccc_load, &load); in ccc_set()
5860 LOG_DBG("Restored CCC for id:%" PRIu8 " addr:%s", load.addr_with_id.id, in ccc_set()
5861 bt_addr_le_str(load.addr_with_id.addr)); in ccc_set()