| /subsys/usb/device_next/class/ |
| A D | usbd_dfu_flash.c | 36 const uint32_t block, const uint16_t size, in dfu_flash_read() argument 50 if (block == 0) { in dfu_flash_read() 54 if (data->last_block + 1U != block) { in dfu_flash_read() 65 if (block == 0) { in dfu_flash_read() 82 data->last_block = block; in dfu_flash_read() 84 LOG_DBG("uploaded %u block %u len %u", data->uploaded, block, len); in dfu_flash_read() 90 const uint32_t block, const uint16_t size, in dfu_flash_write() argument 97 if (block == 0) { in dfu_flash_write() 110 if (data->last_block + 1U != block) { in dfu_flash_write() 121 data->last_block = block; in dfu_flash_write() [all …]
|
| /subsys/bluetooth/mesh/ |
| A D | blob.h | 72 #define BLOB_BLOCK_REPORT_STATUS_MSG_MAXLEN sizeof(((struct bt_mesh_blob_srv *)0)->block.missing) 73 #define BLOB_BLOCK_STATUS_MSG_MAXLEN (5 + sizeof(((struct bt_mesh_blob_srv *)0)->block.missing)) 107 static inline void blob_chunk_missing_set_all(struct bt_mesh_blob_block *block) in blob_chunk_missing_set_all() argument 109 size_t bytes = block->chunk_count / 8; in blob_chunk_missing_set_all() 111 memset(block->missing, 0xff, bytes); in blob_chunk_missing_set_all() 112 if (block->chunk_count % 8) { in blob_chunk_missing_set_all() 113 block->missing[bytes] = BIT_MASK(block->chunk_count % 8); in blob_chunk_missing_set_all() 117 static inline void blob_chunk_missing_set_none(struct bt_mesh_blob_block *block) in blob_chunk_missing_set_none() argument 119 memset(block->missing, 0, sizeof(block->missing)); in blob_chunk_missing_set_none()
|
| A D | blob_cli.c | 203 memset(cli->block.missing, 0, sizeof(cli->block.missing)); in update_missing_chunks() 270 cli->block.chunk_count = in block_set() 279 memset(cli->block.missing, 0, sizeof(cli->block.missing)); in block_set() 287 cli->block.chunk_count); in block_set() 867 cli->block.chunk_count, cli->block.number + 1, cli->block_count); in block_start() 1147 LOG_DBG("0x%04x: block: %u status: %u", target->addr, block->block.number, block->status); in rx_block_status() 1155 if (block->block.number != cli->block.number) { in rx_block_status() 1172 memcpy(target->pull->missing, block->block.missing, sizeof(block->block.missing)); in rx_block_status() 1183 for (int i = 0; i < ARRAY_SIZE(block->block.missing); ++i) { in rx_block_status() 1184 cli->block.missing[i] |= block->block.missing[i]; in rx_block_status() [all …]
|
| A D | blob_srv.c | 225 srv->block.number = 0xffff; in cancel() 226 memset(srv->block.missing, 0, sizeof(srv->block.missing)); in cancel() 399 bt_hex(srv->block.missing, in block_status_rsp() 528 srv->block.number = 0xffff; in handle_xfer_start() 680 srv->block.chunk_count = DIV_ROUND_UP(srv->block.size, chunk_size); in handle_block_start() 686 memset(srv->block.missing, 0, sizeof(srv->block.missing)); in handle_block_start() 700 srv->block.number, srv->block.number + 1, block_count_get(srv), in handle_block_start() 701 srv->block.size, chunk_size, srv->block.chunk_count); in handle_block_start() 705 &srv->block); in handle_block_start() 879 srv->block.number = 0xffff; in blob_srv_init() [all …]
|
| A D | blob_io_flash.c | 99 const struct bt_mesh_blob_block *block) in block_start() argument 107 return erase_device_block(flash->area, flash->offset + block->offset, block->size); in block_start() 112 const struct bt_mesh_blob_block *block, in rd_chunk() argument 118 flash->offset + block->offset + chunk->offset, in rd_chunk() 124 const struct bt_mesh_blob_block *block, in wr_chunk() argument 131 flash->offset + block->offset + chunk->offset, in wr_chunk() 136 off_t area_offset = flash->offset + block->offset + chunk->offset; in wr_chunk()
|
| A D | transport.c | 111 uint32_t block; member 1137 sys_put_be32(block, &buf[2]); in send_ack() 1156 rx->block != BLOCK_COMPLETE(rx->seg_n)) { in seg_rx_reset() 1192 rx->block = 0U; in seg_discard() 1217 rx->block, rx->obo); in seg_ack() 1324 rx->block = 0U; in seg_rx_alloc() 1414 if (rx->block == BLOCK_COMPLETE(rx->seg_n)) { in trans_seg() 1426 seq_auth, rx->block, rx->obo); in trans_seg() 1506 if (BIT(seg_o) & rx->block) { in trans_seg() 1557 rx->block |= BIT(seg_o); in trans_seg() [all …]
|
| /subsys/fs/ext2/ |
| A D | ext2_diskops.c | 408 uint32_t block; in fetch_level_blocks() local 433 if (block == 0) { in fetch_level_blocks() 619 if (block < lvl0_blks) { in get_level_offsets() 620 offsets[0] = block; in get_level_offsets() 625 block -= lvl0_blks; in get_level_offsets() 628 offsets[1] = block; in get_level_offsets() 633 block -= lvl1_blks; in get_level_offsets() 643 block -= lvl2_blks; in get_level_offsets() 719 uint32_t *block; in alloc_level_blocks() local 728 *block = sys_le32_to_cpu(*block); in alloc_level_blocks() [all …]
|
| A D | ext2_diskops.h | 42 int ext2_fetch_inode_block(struct ext2_inode *inode, uint32_t block); 69 int ext2_fetch_bg_itable(struct ext2_bgroup *bg, uint32_t block); 200 int ext2_free_block(struct ext2_data *fs, uint32_t block);
|
| A D | ext2_disk_access.c | 89 static int disk_access_read_block(struct ext2_data *fs, void *buf, uint32_t block) in disk_access_read_block() argument 95 rc = disk_prepare_range(disk, block * fs->block_size, fs->block_size, in disk_access_read_block() 103 static int disk_access_write_block(struct ext2_data *fs, const void *buf, uint32_t block) in disk_access_write_block() argument 109 rc = disk_prepare_range(disk, block * fs->block_size, fs->block_size, in disk_access_write_block()
|
| A D | ext2_impl.c | 97 b->num = block; in ext2_get_block() 99 ret = fs->backend_ops->read_block(fs, b->data, block); in ext2_get_block() 566 uint32_t block, block_off, offset = 0; in find_dir_entry() local 572 block = offset / fs->block_size; in find_dir_entry() 575 rc = ext2_fetch_inode_block(inode, block); in find_dir_entry() 618 uint32_t block = offset / block_size; in ext2_inode_read() local 621 rc = ext2_fetch_inode_block(inode, block); in ext2_inode_read() 650 uint32_t block = offset / block_size; in ext2_inode_write() local 656 rc = ext2_fetch_inode_block(inode, block); in ext2_inode_write() 812 uint32_t block = dir->f_off / fs->block_size; in ext2_get_direntry() local [all …]
|
| /subsys/mem_mgmt/ |
| A D | mem_attr_heap.c | 29 void *block; in mah_choice() local 38 block = NULL; in mah_choice() 49 block = sys_heap_aligned_alloc(&h->heap, align, size); in mah_choice() 50 if (block != NULL) { in mah_choice() 55 return block; in mah_choice() 58 void mem_attr_heap_free(void *block) in mem_attr_heap_free() argument 60 sys_multi_heap_free(&mah_data.multi_heap, block); in mem_attr_heap_free()
|
| /subsys/fs/ |
| A D | Kconfig.littlefs | 31 int "Minimum size of a block read" 37 int "Minimum size of a block program" 43 int "Size of block caches in bytes" 46 Each cache buffers a portion of a block in RAM. The littlefs 51 device, and a factor of the block size. 62 int "Number of erase cycles before moving data to another block" 66 is moved to another block. Set to a non-positive value to 97 we need to take into account overhead caused per block allocation. 98 For the purpose of heap size calculation the size of each cache block 115 bool "Support for littlefs on block devices" [all …]
|
| A D | littlefs_fs.c | 174 static int lfs_api_read(const struct lfs_config *c, lfs_block_t block, in lfs_api_read() argument 178 size_t offset = block * c->block_size + off; in lfs_api_read() 185 static int lfs_api_prog(const struct lfs_config *c, lfs_block_t block, in lfs_api_prog() argument 189 size_t offset = block * c->block_size + off; in lfs_api_prog() 196 static int lfs_api_erase(const struct lfs_config *c, lfs_block_t block) in lfs_api_erase() argument 199 size_t offset = block * c->block_size; in lfs_api_erase() 208 static int lfs_api_read_blk(const struct lfs_config *c, lfs_block_t block, in lfs_api_read_blk() argument 212 int rc = disk_access_read(disk, buffer, block, in lfs_api_read_blk() 218 static int lfs_api_prog_blk(const struct lfs_config *c, lfs_block_t block, in lfs_api_prog_blk() argument 222 int rc = disk_access_write(disk, buffer, block, size / c->block_size); in lfs_api_prog_blk() [all …]
|
| /subsys/net/lib/coap/ |
| A D | Kconfig | 21 bool "CoAP ./well-known/core services block wise support" 23 This option enables the block wise support of CoAP response 30 int "CoAP ./well-known/core services block wise support" 34 Maximum size of CoAP block. Valid values are 16, 32, 64, 128, 119 int "LWM2M CoAP block-wise transfer size" 123 CoAP block size used by CoAP client when performing block-wise 160 receive network stack notifications about block truncation. 183 int "CoAP server block-wise transfer size" 187 CoAP block size used by CoAP server resources when performing block-wise 256 receive network stack notifications about block truncation.
|
| A D | coap.c | 1444 size_t new_current = GET_NUM(block) << (GET_BLOCK_SIZE(block) + 4); in update_descriptive_block() 1446 if (block == -ENOENT) { in update_descriptive_block() 1480 if (block < 0) { in update_control_block1() 1484 new_current = GET_NUM(block) << (GET_BLOCK_SIZE(block) + 4); in update_control_block1() 1511 if (block < 0) { in update_control_block2() 1515 new_current = GET_NUM(block) << (GET_BLOCK_SIZE(block) + 4); in update_control_block2() 1517 if (GET_MORE(block)) { in update_control_block2() 1521 if (GET_NUM(block) > 0 && GET_BLOCK_SIZE(block) != ctx->block_size) { in update_control_block2() 1562 int block; in coap_next_block_for_option() local 1571 if (block < 0) { in coap_next_block_for_option() [all …]
|
| /subsys/portability/cmsis_rtos_v2/ |
| A D | Kconfig | 24 dynamically allocated control block. 54 be created with dynamically allocated control block. 62 be created with dynamically allocated control block. 70 be created with dynamically allocated control block. 78 be created with dynamically allocated control block. 92 be created with dynamically allocated control block. 106 be created with dynamically allocated control block.
|
| A D | mempool.c | 131 osStatus_t osMemoryPoolFree(osMemoryPoolId_t mp_id, void *block) in osMemoryPoolFree() argument 144 k_mem_slab_free((struct k_mem_slab *)(&mslab->z_mslab), (void *)block); in osMemoryPoolFree()
|
| /subsys/ipc/ipc_service/backends/ |
| A D | ipc_icbmsg.c | 258 struct block_content *block; in buffer_from_index_validate() local 289 return block->data; in buffer_from_index_validate() 342 struct block_content *block; in alloc_tx_buffer() local 417 block->header.size = *size; in alloc_tx_buffer() 418 *buffer = block->data; in alloc_tx_buffer() 440 struct block_content *block; in release_tx_blocks() local 463 block->header.size = new_size; in release_tx_blocks() 584 struct block_content *block; in send_block() local 589 block->header.size = size; in send_block() 650 struct block_content *block; in match_bound_msg() local [all …]
|
| /subsys/portability/cmsis_rtos_v1/ |
| A D | cmsis_mempool.c | 61 osStatus osPoolFree(osPoolId pool_id, void *block) in osPoolFree() argument 71 k_mem_slab_free((struct k_mem_slab *)(osPool->pool), (void *)block); in osPoolFree()
|
| /subsys/mgmt/mcumgr/transport/src/ |
| A D | smp_dummy.c | 211 void *block; in dummy_mcumgr_alloc_rx_buf() local 214 rc = k_mem_slab_alloc(&dummy_mcumgr_slab, &block, K_NO_WAIT); in dummy_mcumgr_alloc_rx_buf() 219 rx_buf = block; in dummy_mcumgr_alloc_rx_buf() 226 void *block; in dummy_mcumgr_free_rx_buf() local 228 block = rx_buf; in dummy_mcumgr_free_rx_buf() 229 k_mem_slab_free(&dummy_mcumgr_slab, block); in dummy_mcumgr_free_rx_buf()
|
| /subsys/net/lib/lwm2m/ |
| A D | Kconfig | 84 LwM2M messages with a big body that exceed the block size will be split 275 int "LWM2M CoAP block-wise transfer size" 279 CoAP block size used by LwM2M when performing block-wise 282 to fit all CoAP headers and full block size. 293 If CoAP block-wise transfer is enabled, this value should be larger than 294 the block size and estimated CoAP header sizes. 377 int "Maximum # of LwM2M block contexts used for outgoing messages" 385 bool "Log allocations of encode buffers for block wise transfer" 389 to optimize the configuration of number of block contexts and indirectly 398 CoAP block-wise transfer we can handle at the same time. [all …]
|
| /subsys/mgmt/updatehub/ |
| A D | updatehub.c | 61 struct coap_block_context block; member 286 &ctx.block); in send_request() 466 ctx.downloaded_size == ctx.block.total_size)) { in install_update_cb() 472 if (coap_update_from_block(&response_packet, &ctx.block) < 0) { in install_update_cb() 477 if (coap_next_block(&response_packet, &ctx.block) == 0) { in install_update_cb() 478 if (ctx.downloaded_size != ctx.block.total_size) { in install_update_cb() 534 if (coap_block_transfer_init(&ctx.block, in install_update() 554 while (ctx.downloaded_size != ctx.block.total_size) { in install_update()
|
| /subsys/net/lib/tftp/ |
| A D | tftp_client.h | 55 uint16_t block; member
|
| A D | tftp_client.c | 177 LOG_DBG("Client acking block number: %d", ntohs(ackhdr->block)); in send_ack() 252 .block = htons(1) in tftp_get() 301 ackhdr.block = htons(block_no); in tftp_get()
|
| /subsys/shell/backends/ |
| A D | shell_websocket.c | 56 static int ws_send(struct shell_websocket *ws, bool block) in ws_send() argument 72 block ? 0 : ZSOCK_MSG_DONTWAIT); in ws_send() 73 if (!block && (ret < 0) && (errno == EAGAIN)) { in ws_send()
|