/Zephyr-latest/tests/subsys/debug/symtab/src/ |
D | main.c | 30 const uintptr_t last_addr = first_addr + symtab->entries[symtab->length - 1].offset; in ZTEST() 31 uint32_t offset; in ZTEST() local 38 offset = -1; in ZTEST() 39 symbol_name = symtab_find_symbol_name((uintptr_t)main, &offset); in ZTEST() 41 zassert_equal(offset, 0); in ZTEST() 80 uint32_t offset; in ZTEST() local 84 offset = -1; in ZTEST() 85 symbol_name = symtab_find_symbol_name(first_addr - 1, &offset); in ZTEST() 87 zassert_equal(offset, 0); in ZTEST() 97 uint32_t offset; in ZTEST() local [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/ll/edtt/gatt_test_app/src/gatt/ |
D | service_c_2_1.c | 168 uint16_t len, uint16_t offset) in read_value_v10() argument 172 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v10() 190 uint16_t len, uint16_t offset) in read_str_value() argument 194 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 213 uint16_t len, uint16_t offset, uint8_t flags) in write_value_v2() argument 217 if (offset >= sizeof(value_v2_value)) { in write_value_v2() 220 if (offset + len > sizeof(value_v2_value)) { in write_value_v2() 224 memcpy(value + offset, buf, len); in write_value_v2() 243 uint16_t len, uint16_t offset) in read_long_des_v2d1() argument 247 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_long_des_v2d1() [all …]
|
D | service_c_2_2.c | 82 uint16_t len, uint16_t offset) in read_value_v10() argument 86 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v10() 104 uint16_t len, uint16_t offset) in read_str_value() argument 108 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 127 uint16_t len, uint16_t offset, uint8_t flags) in write_value_v2() argument 131 if (offset >= sizeof(value_v2_value)) { in write_value_v2() 134 if (offset + len > sizeof(value_v2_value)) { in write_value_v2() 138 memcpy(value + offset, buf, len); in write_value_v2() 158 const void *buf, uint16_t len, uint16_t offset, in write_value_v2_1() argument 163 if (offset >= sizeof(value_v2_1_value)) { in write_value_v2_1() [all …]
|
D | service_c_2_3.c | 82 uint16_t len, uint16_t offset) in read_value_v10() argument 86 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v10() 104 uint16_t len, uint16_t offset) in read_str_value() argument 108 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 127 uint16_t len, uint16_t offset, uint8_t flags) in write_value_v2() argument 131 if (offset >= sizeof(value_v2_value)) { in write_value_v2() 134 if (offset + len > sizeof(value_v2_value)) { in write_value_v2() 138 memcpy(value + offset, buf, len); in write_value_v2() 158 const void *buf, uint16_t len, uint16_t offset, in write_value_v2_1() argument 163 if (offset >= sizeof(value_v2_1_value)) { in write_value_v2_1() [all …]
|
D | service_b_5_1.c | 64 uint16_t len, uint16_t offset) in read_value_v8() argument 68 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v8() 87 uint16_t len, uint16_t offset, uint8_t flags) in write_value_v8() argument 91 if (offset >= sizeof(value_v8_value)) { in write_value_v8() 94 if (offset + len > sizeof(value_v8_value)) { in write_value_v8() 98 memcpy(value + offset, buf, len); in write_value_v8() 117 uint16_t len, uint16_t offset) in read_des_v8d1() argument 121 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v8d1() 140 uint16_t len, uint16_t offset, uint8_t flags) in write_des_v8d1() argument 144 if (offset >= sizeof(des_v8d1_value)) { in write_des_v8d1() [all …]
|
D | service_b_1_1.c | 71 uint16_t len, uint16_t offset) in read_value_v4() argument 75 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v4() 94 uint16_t len, uint16_t offset, uint8_t flags) in write_value_v4() argument 98 if (offset >= sizeof(value_v4_value)) { in write_value_v4() 101 if (offset + len > sizeof(value_v4_value)) { in write_value_v4() 105 memcpy(value + offset, buf, len); in write_value_v4() 124 uint16_t len, uint16_t offset) in read_value_v4_1() argument 128 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v4_1() 147 const void *buf, uint16_t len, uint16_t offset, in write_value_v4_1() argument 152 if (offset >= sizeof(value_v4_1_value)) { in write_value_v4_1() [all …]
|
D | service_c_1_3.c | 66 void *buf, uint16_t len, uint16_t offset) in read_value_v9__128_bit_uuid() argument 70 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v9__128_bit_uuid() 90 uint16_t offset, uint8_t flags) in write_value_v9__128_bit_uuid() argument 94 if (offset >= sizeof(value_v9__128_bit_uuid_value)) { in write_value_v9__128_bit_uuid() 97 if (offset + len > sizeof(value_v9__128_bit_uuid_value)) { in write_value_v9__128_bit_uuid() 101 memcpy(value + offset, buf, len); in write_value_v9__128_bit_uuid() 121 void *buf, uint16_t len, uint16_t offset) in read_des_v9d2__128_bit_uuid() argument 125 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v9d2__128_bit_uuid() 146 uint16_t offset, uint8_t flags) in write_des_v9d2__128_bit_uuid() argument 150 if (offset >= sizeof(des_v9d2__128_bit_uuid_value)) { in write_des_v9d2__128_bit_uuid() [all …]
|
D | service_c_1_2.c | 68 void *buf, uint16_t len, uint16_t offset) in read_value_v9__128_bit_uuid() argument 72 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v9__128_bit_uuid() 92 uint16_t offset, uint8_t flags) in write_value_v9__128_bit_uuid() argument 96 if (offset >= sizeof(value_v9__128_bit_uuid_value)) { in write_value_v9__128_bit_uuid() 99 if (offset + len > sizeof(value_v9__128_bit_uuid_value)) { in write_value_v9__128_bit_uuid() 103 memcpy(value + offset, buf, len); in write_value_v9__128_bit_uuid() 123 void *buf, uint16_t len, uint16_t offset) in read_des_v9d2__128_bit_uuid() argument 127 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v9d2__128_bit_uuid() 148 uint16_t offset, uint8_t flags) in write_des_v9d2__128_bit_uuid() argument 152 if (offset >= sizeof(des_v9d2__128_bit_uuid_value)) { in write_des_v9d2__128_bit_uuid() [all …]
|
D | service_a_1.c | 106 uint16_t len, uint16_t offset) in read_value_v1() argument 110 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v1() 128 uint16_t len, uint16_t offset) in read_str_value() argument 132 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 151 uint16_t len, uint16_t offset, uint8_t flags) in write_value_v2() argument 155 if (offset >= sizeof(value_v2_value)) { in write_value_v2() 158 if (offset + len > sizeof(value_v2_value)) { in write_value_v2() 162 memcpy(value + offset, buf, len); in write_value_v2() 182 const void *buf, uint16_t len, uint16_t offset, in write_value_v2_1() argument 187 if (offset >= sizeof(value_v2_1_value)) { in write_value_v2_1() [all …]
|
D | service_c_1_1.c | 68 void *buf, uint16_t len, uint16_t offset) in read_value_v9__128_bit_uuid() argument 72 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v9__128_bit_uuid() 92 uint16_t offset, uint8_t flags) in write_value_v9__128_bit_uuid() argument 96 if (offset >= sizeof(value_v9__128_bit_uuid_value)) { in write_value_v9__128_bit_uuid() 99 if (offset + len > sizeof(value_v9__128_bit_uuid_value)) { in write_value_v9__128_bit_uuid() 103 memcpy(value + offset, buf, len); in write_value_v9__128_bit_uuid() 123 void *buf, uint16_t len, uint16_t offset) in read_des_v9d2__128_bit_uuid() argument 127 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v9d2__128_bit_uuid() 148 uint16_t offset, uint8_t flags) in write_des_v9d2__128_bit_uuid() argument 152 if (offset >= sizeof(des_v9d2__128_bit_uuid_value)) { in write_des_v9d2__128_bit_uuid() [all …]
|
/Zephyr-latest/arch/arm/core/ |
D | elf.c | 102 uint32_t sym_base_addr, const char *sym_name, int32_t *offset) in prel31_decode() argument 106 *offset = sign_extend(*(int32_t *)loc, SHIFT_PREL31_SIGN); in prel31_decode() 107 *offset += sym_base_addr - loc; in prel31_decode() 108 if (*offset >= PREL31_UPPER_BOUNDARY || *offset < PREL31_LOWER_BOUNDARY) { in prel31_decode() 119 static inline void prel31_reloc(uint32_t loc, int32_t *offset) in prel31_reloc() argument 122 *(uint32_t *)loc |= *offset & GENMASK(30, 0); in prel31_reloc() 129 int32_t offset; in prel31_handler() local 131 ret = prel31_decode(reloc_type, loc, sym_base_addr, sym_name, &offset); in prel31_handler() 133 prel31_reloc(loc, &offset); in prel31_handler() 140 uint32_t sym_base_addr, const char *sym_name, int32_t *offset) in jumps_decode() argument [all …]
|
/Zephyr-latest/drivers/mm/ |
D | mm_drv_common.c | 49 size_t offset; in sys_mm_drv_is_virt_region_mapped() local 52 for (offset = 0; offset < size; offset += CONFIG_MM_DRV_PAGE_SIZE) { in sys_mm_drv_is_virt_region_mapped() 53 uint8_t *va = (uint8_t *)virt + offset; in sys_mm_drv_is_virt_region_mapped() 66 size_t offset; in sys_mm_drv_is_virt_region_unmapped() local 69 for (offset = 0; offset < size; offset += CONFIG_MM_DRV_PAGE_SIZE) { in sys_mm_drv_is_virt_region_unmapped() 70 uint8_t *va = (uint8_t *)virt + offset; in sys_mm_drv_is_virt_region_unmapped() 95 size_t offset; in unmap_locked() local 97 for (offset = 0; offset < size; offset += CONFIG_MM_DRV_PAGE_SIZE) { in unmap_locked() 98 uint8_t *va = (uint8_t *)virt + offset; in unmap_locked() 121 size_t offset; in sys_mm_drv_simple_map_region() local [all …]
|
/Zephyr-latest/subsys/net/lib/lwm2m/ |
D | buf_util.h | 37 uint16_t offset, uint8_t *src, uint16_t src_len) in buf_insert() argument 48 memmove(dst + offset + src_len, dst + offset, *dst_len - offset); in buf_insert() 51 memcpy(dst + offset, src, src_len); in buf_insert() 58 uint16_t *offset) in buf_read() argument 64 if (*offset + len > src_len) { in buf_read() 70 memcpy(dst, src + *offset, len); in buf_read() 73 *offset += len; in buf_read() 77 static inline int buf_skip(uint16_t len, uint8_t *src, uint16_t src_len, uint16_t *offset) in buf_skip() argument 79 return buf_read(NULL, len, src, src_len, offset); in buf_skip() 83 uint16_t *offset) in buf_read_u8() argument [all …]
|
/Zephyr-latest/tests/subsys/fs/multi-fs/src/ |
D | test_ram_backend.c | 21 static int test_flash_ram_erase(const struct device *dev, off_t offset, in test_flash_ram_erase() argument 25 off_t end_offset = offset + len; in test_flash_ram_erase() 27 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_erase() 28 zassert_true(offset + len <= TEST_PARTITION_SIZE, in test_flash_ram_erase() 31 while (offset < end_offset) { in test_flash_ram_erase() 32 flash_get_page_info_by_offs(dev, offset, &info); in test_flash_ram_erase() 34 offset = info.start_offset + info.size; in test_flash_ram_erase() 40 static int test_flash_ram_write(const struct device *dev, off_t offset, in test_flash_ram_write() argument 43 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_write() 44 zassert_true(offset + len <= TEST_PARTITION_SIZE, in test_flash_ram_write() [all …]
|
/Zephyr-latest/drivers/flash/ |
D | soc_flash_b91.c | 39 static bool flash_b91_is_range_valid(off_t offset, size_t len) in flash_b91_is_range_valid() argument 42 if ((offset < 0) || (len < 1)) { in flash_b91_is_range_valid() 47 if ((offset + len) > FLASH_SIZE) { in flash_b91_is_range_valid() 65 static int flash_b91_erase(const struct device *dev, off_t offset, size_t len) in flash_b91_erase() argument 76 if (!flash_b91_is_range_valid(offset, len)) { in flash_b91_erase() 81 if (((offset % PAGE_SIZE) != 0) || ((len % PAGE_SIZE) != 0)) { in flash_b91_erase() 92 if ((page_nums >= BLOCK_64K_PAGES) && ((offset % BLOCK_64K_SIZE) == 0)) { in flash_b91_erase() 94 flash_erase_64kblock(offset); in flash_b91_erase() 96 offset += BLOCK_64K_SIZE; in flash_b91_erase() 97 } else if ((page_nums >= BLOCK_32K_PAGES) && ((offset % BLOCK_32K_SIZE) == 0)) { in flash_b91_erase() [all …]
|
D | flash_gd32_v2.c | 96 static int gd32_fmc_v2_bank0_write(off_t offset, const void *data, size_t len) in gd32_fmc_v2_bank0_write() argument 98 flash_prg_t *prg_flash = (flash_prg_t *)((uint8_t *)SOC_NV_FLASH_ADDR + offset); in gd32_fmc_v2_bank0_write() 168 static int gd32_fmc_v2_bank0_erase_block(off_t offset, size_t size) in gd32_fmc_v2_bank0_erase_block() argument 170 uint32_t page_addr = SOC_NV_FLASH_ADDR + offset; in gd32_fmc_v2_bank0_erase_block() 211 static int gd32_fmc_v2_bank1_write(off_t offset, const void *data, size_t len) in gd32_fmc_v2_bank1_write() argument 213 flash_prg_t *prg_flash = (flash_prg_t *)((uint8_t *)SOC_NV_FLASH_ADDR + offset); in gd32_fmc_v2_bank1_write() 283 static int gd32_fmc_v2_bank1_erase_block(off_t offset, size_t size) in gd32_fmc_v2_bank1_erase_block() argument 285 uint32_t page_addr = SOC_NV_FLASH_ADDR + offset; in gd32_fmc_v2_bank1_erase_block() 302 bool flash_gd32_valid_range(off_t offset, uint32_t len, bool write) in flash_gd32_valid_range() argument 304 if ((offset > SOC_NV_FLASH_SIZE) || in flash_gd32_valid_range() [all …]
|
D | flash_sam0.c | 99 static int flash_sam0_valid_range(off_t offset, size_t len) in flash_sam0_valid_range() argument 101 if (offset < 0) { in flash_sam0_valid_range() 102 LOG_WRN("0x%lx: before start of flash", (long)offset); in flash_sam0_valid_range() 105 if ((offset + len) > CONFIG_FLASH_SIZE * 1024) { in flash_sam0_valid_range() 106 LOG_WRN("0x%lx: ends past the end of flash", (long)offset); in flash_sam0_valid_range() 124 static int flash_sam0_check_status(off_t offset) in flash_sam0_check_status() argument 141 LOG_ERR("programming error at 0x%lx", (long)offset); in flash_sam0_check_status() 144 LOG_ERR("lock error at 0x%lx", (long)offset); in flash_sam0_check_status() 147 LOG_ERR("NVM error at 0x%lx", (long)offset); in flash_sam0_check_status() 161 static int flash_sam0_write_page(const struct device *dev, off_t offset, in flash_sam0_write_page() argument [all …]
|
D | flash_sam.c | 55 static bool sam_flash_validate_offset_len(off_t offset, size_t len) in sam_flash_validate_offset_len() argument 57 if (offset < 0) { in sam_flash_validate_offset_len() 61 if ((offset + len) < len) { in sam_flash_validate_offset_len() 73 static bool sam_flash_offset_is_on_write_page_boundary(off_t offset) in sam_flash_offset_is_on_write_page_boundary() argument 75 return sam_flash_aligned(offset, SAM_FLASH_WRITE_PAGE_SIZE); in sam_flash_offset_is_on_write_page_boundary() 137 static bool sam_flash_section_is_within_area(const struct device *dev, off_t offset, size_t len) in sam_flash_section_is_within_area() argument 141 if ((offset + ((off_t)len)) < offset) { in sam_flash_section_is_within_area() 145 if ((offset >= 0) && ((offset + len) <= config->area_size)) { in sam_flash_section_is_within_area() 150 (size_t)offset, (size_t)(offset + len), (size_t)config->area_size); in sam_flash_section_is_within_area() 156 off_t offset, size_t len) in sam_flash_section_is_aligned_with_write_block_size() argument [all …]
|
D | flash_gecko.c | 33 static bool write_range_is_valid(off_t offset, uint32_t size); 34 static bool read_range_is_valid(off_t offset, uint32_t size); 35 static int erase_flash_block(off_t offset, size_t size); 38 static int flash_gecko_read(const struct device *dev, off_t offset, in flash_gecko_read() argument 42 if (!read_range_is_valid(offset, size)) { in flash_gecko_read() 50 memcpy(data, (uint8_t *)CONFIG_FLASH_BASE_ADDRESS + offset, size); in flash_gecko_read() 55 static int flash_gecko_write(const struct device *dev, off_t offset, in flash_gecko_write() argument 63 if (!write_range_is_valid(offset, size)) { in flash_gecko_write() 74 address = (uint8_t *)CONFIG_FLASH_BASE_ADDRESS + offset; in flash_gecko_write() 86 static int flash_gecko_erase(const struct device *dev, off_t offset, in flash_gecko_erase() argument [all …]
|
/Zephyr-latest/tests/kernel/gen_isr_table/src/ |
D | main.c | 48 #define IRQ_LINE(offset) offset argument 50 #define TABLE_INDEX(offset) offset + CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET argument 52 #define TABLE_INDEX(offset) offset argument 100 #define IRQ_LINE(offset) (TEST_NUM_IRQS - ((offset) + 1)) argument 101 #define TABLE_INDEX(offset) (TEST_IRQ_TABLE_SIZE - ((offset) + 1)) argument 181 int test_irq(int offset) in test_irq() argument 184 TC_PRINT("triggering irq %d\n", IRQ_LINE(offset)); in test_irq() 185 trigger_irq(IRQ_LINE(offset)); in test_irq() 190 if (trigger_check[offset] != 1) { in test_irq() 192 IRQ_LINE(offset), in test_irq() [all …]
|
/Zephyr-latest/subsys/net/lib/dns/ |
D | dns_sd.c | 308 uint16_t offset = buf_offset; in add_a_record() local 321 if (offset > buf_size || total_size >= buf_size - offset) { in add_a_record() 323 total_size, (int)buf_size - (int)offset); in add_a_record() 331 memcpy(&buf[offset], &inst_offs, sizeof(inst_offs)); in add_a_record() 332 offset += sizeof(inst_offs); in add_a_record() 334 rr = (struct dns_rr *)&buf[offset]; in add_a_record() 339 offset += sizeof(*rr); in add_a_record() 341 rdata = (struct dns_a_rdata *)&buf[offset]; in add_a_record() 343 offset += sizeof(*rdata); in add_a_record() 345 __ASSERT_NO_MSG(total_size == offset - buf_offset); in add_a_record() [all …]
|
/Zephyr-latest/drivers/pinctrl/ |
D | pinctrl_b91.c | 90 static inline int pinctrl_b91_get_offset(uint32_t pin, uint8_t *offset) in pinctrl_b91_get_offset() argument 94 *offset = B91_PIN_0_FUNC_POS; in pinctrl_b91_get_offset() 97 *offset = B91_PIN_1_FUNC_POS; in pinctrl_b91_get_offset() 100 *offset = B91_PIN_2_FUNC_POS; in pinctrl_b91_get_offset() 103 *offset = B91_PIN_3_FUNC_POS; in pinctrl_b91_get_offset() 106 *offset = B91_PIN_4_FUNC_POS; in pinctrl_b91_get_offset() 109 *offset = B91_PIN_5_FUNC_POS; in pinctrl_b91_get_offset() 112 *offset = B91_PIN_6_FUNC_POS; in pinctrl_b91_get_offset() 115 *offset = B91_PIN_7_FUNC_POS; in pinctrl_b91_get_offset() 130 uint8_t offset = 0; in pinctrl_configure_pin() local [all …]
|
/Zephyr-latest/tests/drivers/i2c/i2c_target_api/src/ |
D | main.c | 76 uint8_t addr_width, const uint8_t *comp_buffer, unsigned int offset) in run_partial_read() argument 82 i2c->name, addr, offset); in run_partial_read() 86 start_addr[0] = (uint8_t) (offset & 0xFF); in run_partial_read() 89 sys_put_be16((uint16_t)(offset & 0xFFFF), start_addr); in run_partial_read() 96 start_addr, (addr_width >> 3), i2c_buffer, TEST_DATA_SIZE-offset); in run_partial_read() 99 if (memcmp(i2c_buffer, &comp_buffer[offset], TEST_DATA_SIZE-offset)) { in run_partial_read() 100 to_display_format(i2c_buffer, TEST_DATA_SIZE-offset, in run_partial_read() 102 to_display_format(&comp_buffer[offset], TEST_DATA_SIZE-offset, in run_partial_read() 115 uint8_t addr_width, unsigned int offset) in run_program_read() argument 122 i2c->name, addr, offset); in run_program_read() [all …]
|
/Zephyr-latest/drivers/dma/ |
D | dma_pl330.c | 162 uint32_t offset = 0, ccr; in dma_pl330_setup_ch() local 175 offset += dma_pl330_gen_mov(dma_exec_addr, in dma_pl330_setup_ch() 178 offset += dma_pl330_gen_mov(dma_exec_addr + offset, in dma_pl330_setup_ch() 183 offset += dma_pl330_gen_mov(dma_exec_addr + offset, in dma_pl330_setup_ch() 192 dma_pl330_gen_op(OP_DMA_LOOP_COUNT1, dma_exec_addr + offset, in dma_pl330_setup_ch() 194 offset = offset + 2; in dma_pl330_setup_ch() 195 dma_pl330_gen_op(OP_DMA_LOOP, dma_exec_addr + offset, in dma_pl330_setup_ch() 197 offset = offset + 2; in dma_pl330_setup_ch() 198 lp1_start = offset; in dma_pl330_setup_ch() 199 lp0_start = offset; in dma_pl330_setup_ch() [all …]
|
/Zephyr-latest/tests/net/lib/http_server/core/src/ |
D | main.c | 253 static size_t offset; in dynamic_cb() local 256 offset = 0; in dynamic_cb() 274 if (request_ctx->data_len + offset > sizeof(dynamic_payload)) { in dynamic_cb() 279 memcpy(dynamic_payload + offset, request_ctx->data, request_ctx->data_len); in dynamic_cb() 280 offset += request_ctx->data_len; in dynamic_cb() 285 dynamic_payload_len = offset; in dynamic_cb() 286 offset = 0; in dynamic_cb() 323 ptrdiff_t offset; in dynamic_request_headers_cb() local 341 offset = clone->buffer - client->header_capture_ctx.buffer; in dynamic_request_headers_cb() 345 hdrs_dst[i].name = hdrs_src[i].name + offset; in dynamic_request_headers_cb() [all …]
|