Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 477) sorted by relevance

12345678910>>...20

/Zephyr-Core-2.7.6/tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app/src/gatt/
Dservice_c_2_1.c168 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()
219 if (offset + len > sizeof(value_v2_value)) in write_value_v2()
222 memcpy(value + offset, buf, len); in write_value_v2()
241 uint16_t len, uint16_t offset) in read_long_des_v2d1() argument
245 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_long_des_v2d1()
[all …]
Dservice_c_2_3.c82 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()
133 if (offset + len > sizeof(value_v2_value)) in write_value_v2()
136 memcpy(value + offset, buf, len); in write_value_v2()
156 const void *buf, uint16_t len, uint16_t offset, in write_value_v2_1() argument
161 if (offset >= sizeof(value_v2_1_value)) in write_value_v2_1()
[all …]
Dservice_c_2_2.c82 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()
133 if (offset + len > sizeof(value_v2_value)) in write_value_v2()
136 memcpy(value + offset, buf, len); in write_value_v2()
156 const void *buf, uint16_t len, uint16_t offset, in write_value_v2_1() argument
161 if (offset >= sizeof(value_v2_1_value)) in write_value_v2_1()
[all …]
Dservice_b_5_1.c64 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()
93 if (offset + len > sizeof(value_v8_value)) in write_value_v8()
96 memcpy(value + offset, buf, len); in write_value_v8()
115 uint16_t len, uint16_t offset) in read_des_v8d1() argument
119 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v8d1()
138 uint16_t len, uint16_t offset, uint8_t flags) in write_des_v8d1() argument
142 if (offset >= sizeof(des_v8d1_value)) in write_des_v8d1()
[all …]
Dservice_b_1_1.c71 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()
100 if (offset + len > sizeof(value_v4_value)) in write_value_v4()
103 memcpy(value + offset, buf, len); in write_value_v4()
122 uint16_t len, uint16_t offset) in read_value_v4_1() argument
126 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v4_1()
145 const void *buf, uint16_t len, uint16_t offset, in write_value_v4_1() argument
150 if (offset >= sizeof(value_v4_1_value)) in write_value_v4_1()
[all …]
Dservice_c_1_3.c66 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()
96 if (offset + len > sizeof(value_v9__128_bit_uuid_value)) in write_value_v9__128_bit_uuid()
99 memcpy(value + offset, buf, len); in write_value_v9__128_bit_uuid()
119 void *buf, uint16_t len, uint16_t offset) in read_des_v9d2__128_bit_uuid() argument
123 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v9d2__128_bit_uuid()
144 uint16_t offset, uint8_t flags) in write_des_v9d2__128_bit_uuid() argument
148 if (offset >= sizeof(des_v9d2__128_bit_uuid_value)) in write_des_v9d2__128_bit_uuid()
[all …]
Dservice_a_1.c106 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()
157 if (offset + len > sizeof(value_v2_value)) in write_value_v2()
160 memcpy(value + offset, buf, len); in write_value_v2()
180 const void *buf, uint16_t len, uint16_t offset, in write_value_v2_1() argument
185 if (offset >= sizeof(value_v2_1_value)) in write_value_v2_1()
[all …]
Dservice_c_1_1.c68 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()
98 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 …]
Dservice_c_1_2.c68 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()
98 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 …]
/Zephyr-Core-2.7.6/drivers/flash/
Dflash_sam0.c51 off_t offset; member
89 static int flash_sam0_valid_range(off_t offset, size_t len) in flash_sam0_valid_range() argument
91 if (offset < 0) { in flash_sam0_valid_range()
92 LOG_WRN("0x%lx: before start of flash", (long)offset); in flash_sam0_valid_range()
95 if ((offset + len) > CONFIG_FLASH_SIZE * 1024) { in flash_sam0_valid_range()
96 LOG_WRN("0x%lx: ends past the end of flash", (long)offset); in flash_sam0_valid_range()
114 static int flash_sam0_check_status(off_t offset) in flash_sam0_check_status() argument
131 LOG_ERR("programming error at 0x%lx", (long)offset); in flash_sam0_check_status()
134 LOG_ERR("lock error at 0x%lx", (long)offset); in flash_sam0_check_status()
137 LOG_ERR("NVM error at 0x%lx", (long)offset); in flash_sam0_check_status()
[all …]
Dflash_gecko.c37 static bool write_range_is_valid(off_t offset, uint32_t size);
38 static bool read_range_is_valid(off_t offset, uint32_t size);
39 static int erase_flash_block(off_t offset, size_t size);
42 static int flash_gecko_read(const struct device *dev, off_t offset, in flash_gecko_read() argument
46 if (!read_range_is_valid(offset, size)) { in flash_gecko_read()
54 memcpy(data, (uint8_t *)CONFIG_FLASH_BASE_ADDRESS + offset, size); in flash_gecko_read()
59 static int flash_gecko_write(const struct device *dev, off_t offset, in flash_gecko_write() argument
67 if (!write_range_is_valid(offset, size)) { in flash_gecko_write()
78 address = (uint8_t *)CONFIG_FLASH_BASE_ADDRESS + offset; in flash_gecko_write()
90 static int flash_gecko_erase(const struct device *dev, off_t offset, in flash_gecko_erase() argument
[all …]
Dflash_sam.c73 static bool flash_sam_valid_range(const struct device *dev, off_t offset, in flash_sam_valid_range() argument
76 if (offset > CONFIG_FLASH_SIZE * 1024) { in flash_sam_valid_range()
80 if (len && ((offset + len - 1) > (CONFIG_FLASH_SIZE * 1024))) { in flash_sam_valid_range()
88 static off_t flash_sam_get_page(off_t offset) in flash_sam_get_page() argument
90 return offset / IFLASH_PAGE_SIZE; in flash_sam_get_page()
135 static int flash_sam_write_page(const struct device *dev, off_t offset, in flash_sam_write_page() argument
140 uint32_t *dst = (uint32_t *)((uint8_t *)CONFIG_FLASH_BASE_ADDRESS + offset); in flash_sam_write_page()
142 LOG_DBG("offset = 0x%lx, len = %zu", (long)offset, len); in flash_sam_write_page()
153 EEFC_FCR_FARG(flash_sam_get_page(offset)) | in flash_sam_write_page()
162 static int flash_sam_write(const struct device *dev, off_t offset, in flash_sam_write() argument
[all …]
Dflash_stm32g4x.c29 bool flash_stm32_valid_range(const struct device *dev, off_t offset, in flash_stm32_valid_range() argument
40 if ((offset < BANK2_OFFSET) && (offset + len > FLASH_SIZE / 2)) { in flash_stm32_valid_range()
45 return (!write || (offset % 8 == 0 && len % 8 == 0U)) && in flash_stm32_valid_range()
46 flash_stm32_range_exists(dev, offset, len); in flash_stm32_valid_range()
73 static int write_dword(const struct device *dev, off_t offset, uint64_t val) in write_dword() argument
75 volatile uint32_t *flash = (uint32_t *)(offset + CONFIG_FLASH_BASE_ADDRESS); in write_dword()
98 LOG_ERR("Word at offs %ld not erased", (long)offset); in write_dword()
141 static int erase_page(const struct device *dev, unsigned int offset) in erase_page() argument
165 if ((offset < (FLASH_SIZE / 2)) && !bank_swap) { in erase_page()
168 page = offset / FLASH_PAGE_SIZE; in erase_page()
[all …]
Dflash_stm32l5x.c113 bool flash_stm32_valid_range(const struct device *dev, off_t offset, in flash_stm32_valid_range() argument
127 if ((offset < BANK2_OFFSET) && in flash_stm32_valid_range()
128 (offset + len > FLASH_SIZE / 2)) { in flash_stm32_valid_range()
133 return (!write || (offset % 8 == 0 && len % 8 == 0U)) && in flash_stm32_valid_range()
134 flash_stm32_range_exists(dev, offset, len); in flash_stm32_valid_range()
137 static int write_dword(const struct device *dev, off_t offset, uint64_t val) in write_dword() argument
140 volatile uint32_t *flash = (uint32_t *)(offset in write_dword()
159 LOG_ERR("Word at offs %ld not erased", (long)offset); in write_dword()
182 static int erase_page(const struct device *dev, unsigned int offset) in erase_page() argument
207 if ((offset < (FLASH_SIZE / 2)) && !bank_swap) { in erase_page()
[all …]
Dsoc_flash_b91.c28 static bool flash_b91_is_range_valid(off_t offset, size_t len) in flash_b91_is_range_valid() argument
31 if ((offset < 0) || (len < 1)) { in flash_b91_is_range_valid()
36 if ((offset + len) > FLASH_SIZE) { in flash_b91_is_range_valid()
54 static int flash_b91_erase(const struct device *dev, off_t offset, size_t len) in flash_b91_erase() argument
65 if (!flash_b91_is_range_valid(offset, len)) { in flash_b91_erase()
70 if (((offset % PAGE_SIZE) != 0) || ((len % PAGE_SIZE) != 0)) { in flash_b91_erase()
81 flash_erase_page(offset); in flash_b91_erase()
82 offset += PAGE_SIZE; in flash_b91_erase()
92 static int flash_b91_write(const struct device *dev, off_t offset, in flash_b91_write() argument
103 if (!flash_b91_is_range_valid(offset, len)) { in flash_b91_write()
[all …]
Dflash_stm32h7x.c83 bool flash_stm32_valid_range(const struct device *dev, off_t offset, in flash_stm32_valid_range() argument
94 if ((offset < BANK2_OFFSET) in flash_stm32_valid_range()
95 && (offset + len > REAL_FLASH_SIZE_KB / 2)) { in flash_stm32_valid_range()
103 if ((offset % (FLASH_NB_32BITWORD_IN_FLASHWORD * 4)) != 0) { in flash_stm32_valid_range()
106 (unsigned long) offset, FLASH_NB_32BITWORD_IN_FLASHWORD * 4); in flash_stm32_valid_range()
110 return flash_stm32_range_exists(dev, offset, len); in flash_stm32_valid_range()
188 off_t offset) in get_sector() argument
198 sector.sector_index = offset / FLASH_SECTOR_SIZE; in get_sector()
199 if ((offset < (REAL_FLASH_SIZE_KB / 2)) && !bank_swap) { in get_sector()
203 } else if ((offset >= BANK2_OFFSET) && bank_swap) { in get_sector()
[all …]
/Zephyr-Core-2.7.6/tests/subsys/logging/log_msg/src/
Dlog_msg_test.c147 size_t offset; in test_log_hexdump_data_get_single_chunk() local
160 offset = 0; in test_log_hexdump_data_get_single_chunk()
167 offset); in test_log_hexdump_data_get_single_chunk()
173 zassert_true(memcmp(&data[offset], in test_log_hexdump_data_get_single_chunk()
179 offset = 0; in test_log_hexdump_data_get_single_chunk()
186 offset); in test_log_hexdump_data_get_single_chunk()
191 zassert_true(memcmp(&data[offset], in test_log_hexdump_data_get_single_chunk()
199 offset = 4; in test_log_hexdump_data_get_single_chunk()
206 offset); in test_log_hexdump_data_get_single_chunk()
212 zassert_true(memcmp(&data[offset], in test_log_hexdump_data_get_single_chunk()
[all …]
/Zephyr-Core-2.7.6/subsys/net/lib/lwm2m/
Dbuf_util.h37 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-Core-2.7.6/subsys/mgmt/mcumgr/
Dbuf.c28 cbor_nb_reader_get8(struct cbor_decoder_reader *d, int offset) in cbor_nb_reader_get8() argument
34 if (offset < 0 || offset >= cnr->nb->len) { in cbor_nb_reader_get8()
38 return cnr->nb->data[offset]; in cbor_nb_reader_get8()
42 cbor_nb_reader_get16(struct cbor_decoder_reader *d, int offset) in cbor_nb_reader_get16() argument
49 if (offset < 0 || offset > cnr->nb->len - (int)sizeof(val)) { in cbor_nb_reader_get16()
53 memcpy(&val, cnr->nb->data + offset, sizeof(val)); in cbor_nb_reader_get16()
58 cbor_nb_reader_get32(struct cbor_decoder_reader *d, int offset) in cbor_nb_reader_get32() argument
65 if (offset < 0 || offset > cnr->nb->len - (int)sizeof(val)) { in cbor_nb_reader_get32()
69 memcpy(&val, cnr->nb->data + offset, sizeof(val)); in cbor_nb_reader_get32()
74 cbor_nb_reader_get64(struct cbor_decoder_reader *d, int offset) in cbor_nb_reader_get64() argument
[all …]
/Zephyr-Core-2.7.6/subsys/net/lib/dns/
Ddns_sd.c302 uint16_t offset = buf_offset; in add_a_record() local
315 if (offset > buf_size || total_size >= buf_size - offset) { in add_a_record()
317 total_size, (int)buf_size - (int)offset); in add_a_record()
325 memcpy(&buf[offset], &inst_offs, sizeof(inst_offs)); in add_a_record()
326 offset += sizeof(inst_offs); in add_a_record()
328 rr = (struct dns_rr *)&buf[offset]; in add_a_record()
333 offset += sizeof(*rr); in add_a_record()
335 rdata = (struct dns_a_rdata *)&buf[offset]; in add_a_record()
337 offset += sizeof(*rdata); in add_a_record()
339 __ASSERT_NO_MSG(total_size == offset - buf_offset); in add_a_record()
[all …]
/Zephyr-Core-2.7.6/tests/subsys/fs/multi-fs/src/
Dtest_ram_backend.c28 static int test_flash_ram_erase(const struct device *dev, off_t offset, in test_flash_ram_erase() argument
32 off_t end_offset = offset + len; in test_flash_ram_erase()
34 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_erase()
35 zassert_true(offset + len <= FLASH_AREA_SIZE(storage), in test_flash_ram_erase()
38 while (offset < end_offset) { in test_flash_ram_erase()
39 flash_get_page_info_by_offs(dev, offset, &info); in test_flash_ram_erase()
41 offset = info.start_offset + info.size; in test_flash_ram_erase()
47 static int test_flash_ram_write(const struct device *dev, off_t offset, in test_flash_ram_write() argument
50 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_write()
51 zassert_true(offset + len <= FLASH_AREA_SIZE(storage), in test_flash_ram_write()
[all …]
/Zephyr-Core-2.7.6/tests/kernel/gen_isr_table/src/
Dmain.c28 #define IRQ_LINE(offset) offset argument
29 #define TABLE_INDEX(offset) offset argument
74 #define IRQ_LINE(offset) (TEST_NUM_IRQS - ((offset) + 1)) argument
75 #define TABLE_INDEX(offset) (TEST_IRQ_TABLE_SIZE - ((offset) + 1)) argument
142 int test_irq(int offset) in test_irq() argument
145 TC_PRINT("triggering irq %d\n", IRQ_LINE(offset)); in test_irq()
146 trigger_irq(IRQ_LINE(offset)); in test_irq()
151 if (trigger_check[offset] != 1) { in test_irq()
153 IRQ_LINE(offset), in test_irq()
154 trigger_check[offset]); in test_irq()
[all …]
/Zephyr-Core-2.7.6/tests/drivers/i2c/i2c_slave_api/src/
Dmain.c73 const uint8_t *comp_buffer, unsigned int offset) in run_partial_read() argument
78 i2c->name, addr, offset); in run_partial_read()
81 offset, i2c_buffer, TEST_DATA_SIZE-offset); in run_partial_read()
84 if (memcmp(i2c_buffer, &comp_buffer[offset], TEST_DATA_SIZE-offset)) { in run_partial_read()
85 to_display_format(i2c_buffer, TEST_DATA_SIZE-offset, in run_partial_read()
87 to_display_format(&comp_buffer[offset], TEST_DATA_SIZE-offset, in run_partial_read()
100 unsigned int offset) in run_program_read() argument
105 i2c->name, addr, offset); in run_program_read()
107 for (i = 0 ; i < TEST_DATA_SIZE-offset ; ++i) { in run_program_read()
112 offset, i2c_buffer, TEST_DATA_SIZE-offset); in run_program_read()
[all …]
/Zephyr-Core-2.7.6/samples/drivers/soc_flash_nrf/src/
Dmain.c42 uint32_t i, offset; in main() local
64 offset = FLASH_TEST_OFFSET + (i << 2); in main()
66 offset); in main()
67 if (flash_write(flash_dev, offset, &buf_array_1[i], in main()
72 printf(" Attempted to read 0x%x\n", offset); in main()
73 if (flash_read(flash_dev, offset, &buf_word, in main()
86 offset = FLASH_TEST_OFFSET - FLASH_PAGE_SIZE * 2; in main()
87 printf("\nTest 3: Flash erase (4 pages at 0x%x)\n", offset); in main()
88 if (flash_erase(flash_dev, offset, FLASH_PAGE_SIZE * 4) != 0) { in main()
96 offset = FLASH_TEST_OFFSET + (i << 2); in main()
[all …]
/Zephyr-Core-2.7.6/drivers/dma/
Ddma_pl330.c169 uint32_t offset = 0, ccr; in dma_pl330_setup_ch() local
182 offset += dma_pl330_gen_mov(dma_exec_addr, in dma_pl330_setup_ch()
185 offset += dma_pl330_gen_mov(dma_exec_addr + offset, in dma_pl330_setup_ch()
190 offset += dma_pl330_gen_mov(dma_exec_addr + offset, in dma_pl330_setup_ch()
199 dma_pl330_gen_op(OP_DMA_LOOP_COUNT1, dma_exec_addr + offset, in dma_pl330_setup_ch()
201 offset = offset + 2; in dma_pl330_setup_ch()
202 dma_pl330_gen_op(OP_DMA_LOOP, dma_exec_addr + offset, in dma_pl330_setup_ch()
204 offset = offset + 2; in dma_pl330_setup_ch()
205 lp1_start = offset; in dma_pl330_setup_ch()
206 lp0_start = offset; in dma_pl330_setup_ch()
[all …]

12345678910>>...20