Home
last modified time | relevance | path

Searched refs:buff (Results 1 – 25 of 37) sorted by relevance

12

/Zephyr-Core-3.5.0/samples/drivers/spi_bitbang/src/
Dmain.c32 uint16_t buff[5] = { 0x0101, 0x00ff, 0x00a5, 0x0000, 0x0102}; in test_basic_write_9bit_words() local
33 int len = 5 * sizeof(buff[0]); in test_basic_write_9bit_words()
35 struct spi_buf tx_buf = { .buf = buff, .len = len }; in test_basic_write_9bit_words()
42 buff[0], buff[1], buff[2], buff[3], buff[4]); in test_basic_write_9bit_words()
60 uint16_t buff[datacount] = { 0x0101, 0x0102, 0x0003, 0x0004, 0x0105}; in test_9bit_loopback_partial() local
63 const int stride = sizeof(buff[0]); in test_9bit_loopback_partial()
66 {.buf = buff, .len = (2) * stride}, in test_9bit_loopback_partial()
67 {.buf = buff + (2), .len = (datacount - 2)*stride}, in test_9bit_loopback_partial()
80 printf(" tx (i) : %04x %04x\n", buff[0], buff[1]); in test_9bit_loopback_partial()
81 printf(" tx (ii) : %04x %04x %04x\n", buff[2], buff[3], buff[4]); in test_9bit_loopback_partial()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/bme680/
Dbme680.c212 uint8_t buff[BME680_LEN_FIELD] = { 0 }; in bme680_sample_fetch() local
221 ret = bme680_reg_read(dev, BME680_REG_FIELD0, buff, size); in bme680_sample_fetch()
226 data->new_data = buff[0] & BME680_MSK_NEW_DATA; in bme680_sample_fetch()
227 data->heatr_stab = buff[14] & BME680_MSK_HEATR_STAB; in bme680_sample_fetch()
229 adc_press = (uint32_t)(((uint32_t)buff[2] << 12) | ((uint32_t)buff[3] << 4) in bme680_sample_fetch()
230 | ((uint32_t)buff[4] >> 4)); in bme680_sample_fetch()
231 adc_temp = (uint32_t)(((uint32_t)buff[5] << 12) | ((uint32_t)buff[6] << 4) in bme680_sample_fetch()
232 | ((uint32_t)buff[7] >> 4)); in bme680_sample_fetch()
233 adc_hum = (uint16_t)(((uint32_t)buff[8] << 8) | (uint32_t)buff[9]); in bme680_sample_fetch()
234 adc_gas_res = (uint16_t)((uint32_t)buff[13] << 2 | (((uint32_t)buff[14]) >> 6)); in bme680_sample_fetch()
[all …]
/Zephyr-Core-3.5.0/tests/subsys/mgmt/mcumgr/smp_reassembly/src/
Dmain.c18 static uint8_t buff[TRANSPORT_NETBUF_SIZE]; variable
36 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
43 zassert_equal(-ENOSR, smp_reassembly_collect(&smpt, buff, TRANSPORT_NETBUF_SIZE + 1), in ZTEST()
47 smp_reassembly_collect(&smpt, buff, sizeof(struct smp_hdr) - 1), in ZTEST()
52 smp_reassembly_collect(&smpt, buff, sizeof(struct smp_hdr) + 1), in ZTEST()
59 ret = smp_reassembly_collect(&smpt, buff, frag_used); in ZTEST()
71 ret = smp_reassembly_collect(&smpt, buff, frag_used); in ZTEST()
83 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
92 ret = smp_reassembly_collect(&smpt, buff, frag_used); in ZTEST()
103 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
[all …]
/Zephyr-Core-3.5.0/modules/fatfs/
Dzfs_diskio.c44 DRESULT disk_read(BYTE pdrv, BYTE *buff, LBA_t sector, UINT count) in disk_read() argument
48 if (disk_access_read(pdrv_str[pdrv], buff, sector, count) != 0) { in disk_read()
57 DRESULT disk_write(BYTE pdrv, const BYTE *buff, LBA_t sector, UINT count) in disk_write() argument
61 if (disk_access_write(pdrv_str[pdrv], buff, sector, count) != 0) { in disk_write()
69 DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff) in disk_ioctl() argument
79 DISK_IOCTL_CTRL_SYNC, buff) != 0) { in disk_ioctl()
86 DISK_IOCTL_GET_SECTOR_COUNT, buff) != 0) { in disk_ioctl()
99 *(uint16_t *)buff = (uint16_t)sector_size; in disk_ioctl()
107 DISK_IOCTL_GET_ERASE_BLOCK_SZ, buff) != 0) { in disk_ioctl()
/Zephyr-Core-3.5.0/modules/hal_nordic/nrf_802154/serialization/platform/
Dnrf_802154_spinel_response_notifier.c32 nrf_802154_spinel_notify_buff_t buff; member
83 result = &notify_buff.buff; in nrf_802154_spinel_response_notifier_property_await()
98 buff); in nrf_802154_spinel_response_notifier_free()
121 assert(data_len <= sizeof(notify_buff.buff.data)); in nrf_802154_spinel_response_notifier_property_notify()
123 memcpy(notify_buff.buff.data, p_data, data_len); in nrf_802154_spinel_response_notifier_property_notify()
124 notify_buff.buff.data_len = data_len; in nrf_802154_spinel_response_notifier_property_notify()
/Zephyr-Core-3.5.0/drivers/mfd/
Dmfd_npm1300.c161 uint8_t buff[] = {base, offset}; in mfd_npm1300_reg_read_burst() local
163 return i2c_write_read_dt(&config->i2c, buff, sizeof(buff), data, len); in mfd_npm1300_reg_read_burst()
174 uint8_t buff[] = {base, offset, data}; in mfd_npm1300_reg_write() local
176 return i2c_write_dt(&config->i2c, buff, sizeof(buff)); in mfd_npm1300_reg_write()
183 uint8_t buff[] = {base, offset, data1, data2}; in mfd_npm1300_reg_write2() local
185 return i2c_write_dt(&config->i2c, buff, sizeof(buff)); in mfd_npm1300_reg_write2()
212 uint8_t buff[5] = {TIME_BASE, TIME_OFFSET_TIMER}; in mfd_npm1300_set_timer() local
219 sys_put_be24(ticks, &buff[2]); in mfd_npm1300_set_timer()
221 int ret = i2c_write_dt(&config->i2c, buff, sizeof(buff)); in mfd_npm1300_set_timer()
/Zephyr-Core-3.5.0/drivers/disk/
Dramdisk.c49 static int disk_ram_access_read(struct disk_info *disk, uint8_t *buff, in disk_ram_access_read() argument
62 memcpy(buff, lba_to_address(dev, sector), count * config->sector_size); in disk_ram_access_read()
67 static int disk_ram_access_write(struct disk_info *disk, const uint8_t *buff, in disk_ram_access_write() argument
80 memcpy(lba_to_address(dev, sector), buff, count * config->sector_size); in disk_ram_access_write()
85 static int disk_ram_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in disk_ram_access_ioctl() argument
93 *(uint32_t *)buff = config->sector_count; in disk_ram_access_ioctl()
96 *(uint32_t *)buff = config->sector_size; in disk_ram_access_ioctl()
99 *(uint32_t *)buff = 1U; in disk_ram_access_ioctl()
Dflashdisk.c155 static int disk_flash_access_read(struct disk_info *disk, uint8_t *buff, in disk_flash_access_read() argument
188 memcpy(buff, &ctx->cache[offset], len); in disk_flash_access_read()
189 } else if (flash_read(disk->dev, fl_addr + offset, buff, len) < 0) { in disk_flash_access_read()
196 buff += len; in disk_flash_access_read()
266 uint32_t size, const void *buff) in flashdisk_cache_write() argument
291 if (ctx->cache_dirty || memcmp(&ctx->cache[offset], buff, size)) { in flashdisk_cache_write()
293 memcpy(&ctx->cache[offset], buff, size); in flashdisk_cache_write()
300 static int disk_flash_access_write(struct disk_info *disk, const uint8_t *buff, in disk_flash_access_write() argument
334 if (flashdisk_cache_write(ctx, fl_addr, remaining, buff) < 0) { in disk_flash_access_write()
344 if (flashdisk_cache_write(ctx, fl_addr, size, buff) < 0) { in disk_flash_access_write()
[all …]
/Zephyr-Core-3.5.0/tests/drivers/i2c/i2c_tca954x/src/
Dmain.c34 uint8_t buff[1]; in ZTEST() local
42 i2c_read(i2c0, buff, 1, 0x42); in ZTEST()
43 i2c_read(i2c1, buff, 1, 0x42); in ZTEST()
/Zephyr-Core-3.5.0/drivers/sensor/ist8310/
Dist8310.c41 uint8_t buff[6]; in ist8310_sample_fetch() local
43 if (ist8310_reg_read(dev, IST8310_STATUS_REGISTER1, (uint8_t *)buff, 1) < 0) { in ist8310_sample_fetch()
48 if ((buff[0] & STAT1_DRDY) == 0) { in ist8310_sample_fetch()
57 if (ist8310_reg_read(dev, IST8310_OUTPUT_VALUE_X_L, (uint8_t *)buff, 6) < 0) { in ist8310_sample_fetch()
62 drv_data->sample_x = (sys_le16_to_cpu(*(uint16_t *)&buff[0])); in ist8310_sample_fetch()
63 drv_data->sample_y = (sys_le16_to_cpu(*(uint16_t *)&buff[2])); in ist8310_sample_fetch()
64 drv_data->sample_z = (sys_le16_to_cpu(*(uint16_t *)&buff[4])); in ist8310_sample_fetch()
/Zephyr-Core-3.5.0/drivers/disk/nvme/
Dnvme_disk.c150 static int nvme_disk_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in nvme_disk_ioctl() argument
160 if (!buff) { in nvme_disk_ioctl()
165 *(uint32_t *)buff = nvme_namespace_get_num_sectors(ns); in nvme_disk_ioctl()
169 if (!buff) { in nvme_disk_ioctl()
174 *(uint32_t *)buff = nvme_namespace_get_sector_size(ns); in nvme_disk_ioctl()
178 if (!buff) { in nvme_disk_ioctl()
183 *(uint32_t *)buff = nvme_namespace_get_sector_size(ns); in nvme_disk_ioctl()
/Zephyr-Core-3.5.0/scripts/tracing/
Dtrace_capture_usb.py86 buff = usb.util.create_buffer(8192)
87 read_endpoint.read(buff, 10000)
91 buff = usb.util.create_buffer(8192)
92 length = read_endpoint.read(buff, 100000)
94 file_desc.write(chr(buff[index]).encode('latin1'))
/Zephyr-Core-3.5.0/subsys/rtio/
Drtio_handlers.c55 static inline void z_vrfy_rtio_release_buffer(struct rtio *r, void *buff, uint32_t buff_len) in z_vrfy_rtio_release_buffer() argument
58 z_impl_rtio_release_buffer(r, buff, buff_len); in z_vrfy_rtio_release_buffer()
63 uint8_t **buff, uint32_t *buff_len) in z_vrfy_rtio_cqe_get_mempool_buffer() argument
67 Z_OOPS(Z_SYSCALL_MEMORY_READ(buff, sizeof(void *))); in z_vrfy_rtio_cqe_get_mempool_buffer()
69 return z_impl_rtio_cqe_get_mempool_buffer(r, cqe, buff, buff_len); in z_vrfy_rtio_cqe_get_mempool_buffer()
/Zephyr-Core-3.5.0/drivers/flash/
Dflash_stm32wbax.c108 static int write_qword(const struct device *dev, off_t offset, const uint32_t *buff) in write_qword() argument
142 flash[0] = buff[0]; in write_qword()
143 flash[1] = buff[1]; in write_qword()
144 flash[2] = buff[2]; in write_qword()
145 flash[3] = buff[3]; in write_qword()
Dflash_stm32l5x.c158 static int write_nwords(const struct device *dev, off_t offset, const uint32_t *buff, size_t n) in write_nwords() argument
188 if (buff[i] != 0) { in write_nwords()
210 flash[i] = buff[i]; in write_nwords()
/Zephyr-Core-3.5.0/subsys/shell/
Dshell_utils.c237 void z_shell_pattern_remove(char *buff, uint16_t *buff_len, const char *pattern) in z_shell_pattern_remove() argument
239 char *pattern_addr = strstr(buff, pattern); in z_shell_pattern_remove()
247 if (pattern_addr > buff) { in z_shell_pattern_remove()
461 static void buffer_trim(char *buff, uint16_t *buff_len) in buffer_trim() argument
466 if (buff[0] == '\0') { in buffer_trim()
470 while (isspace((int) buff[*buff_len - 1U]) != 0) { in buffer_trim()
473 buff[0] = '\0'; in buffer_trim()
477 buff[*buff_len] = '\0'; in buffer_trim()
482 while (isspace((int) buff[i++]) != 0) { in buffer_trim()
488 memmove(buff, buff + i, (*buff_len + 1U) - i); /* +1 for '\0' */ in buffer_trim()
Dshell_wildcard.c13 static enum shell_wildcard_status command_add(char *buff, uint16_t *buff_len, in command_add() argument
26 completion_addr = strstr(buff, pattern); in command_add()
Dshell_utils.h40 void z_shell_pattern_remove(char *buff, uint16_t *buff_len,
/Zephyr-Core-3.5.0/drivers/misc/ft8xx/
Dft8xx_drv.c47 static void insert_addr(uint32_t addr, uint8_t *buff) in insert_addr() argument
49 buff[0] = (addr >> 16) & 0x3f; in insert_addr()
50 buff[1] = (addr >> 8) & 0xff; in insert_addr()
51 buff[2] = (addr) & 0xff; in insert_addr()
/Zephyr-Core-3.5.0/include/zephyr/rtio/
Drtio.h404 uintptr_t buff = (uintptr_t)mem_pool->buffer; in __rtio_compute_mempool_block_index() local
407 if (addr < buff || addr >= buff + buff_size) { in __rtio_compute_mempool_block_index()
410 return (addr - buff) / block_size; in __rtio_compute_mempool_block_index()
1051 uint8_t **buff, uint32_t *buff_len);
1054 uint8_t **buff, uint32_t *buff_len) in z_impl_rtio_cqe_get_mempool_buffer() argument
1062 *buff = r->block_pool->buffer + blk_idx * blk_size; in z_impl_rtio_cqe_get_mempool_buffer()
1064 __ASSERT_NO_MSG(*buff >= r->block_pool->buffer); in z_impl_rtio_cqe_get_mempool_buffer()
1065 __ASSERT_NO_MSG(*buff < in z_impl_rtio_cqe_get_mempool_buffer()
1073 ARG_UNUSED(buff); in z_impl_rtio_cqe_get_mempool_buffer()
1234 __syscall void rtio_release_buffer(struct rtio *r, void *buff, uint32_t buff_len);
[all …]
/Zephyr-Core-3.5.0/include/zephyr/storage/
Ddisk_access.h108 int disk_access_ioctl(const char *pdrv, uint8_t cmd, void *buff);
/Zephyr-Core-3.5.0/drivers/sensor/vcnl4040/
Dvcnl4040.c22 uint8_t buff[2] = { 0 }; in vcnl4040_read() local
26 &reg, sizeof(reg), buff, sizeof(buff)); in vcnl4040_read()
29 *out = sys_get_le16(buff); in vcnl4040_read()
/Zephyr-Core-3.5.0/include/zephyr/drivers/
Ddisk.h90 int (*ioctl)(struct disk_info *disk, uint8_t cmd, void *buff);
/Zephyr-Core-3.5.0/subsys/net/lib/lwm2m/
Dlwm2m_shell.c168 const char *buff; in cmd_read() local
171 ret = lwm2m_get_res_buf(&path, (void **)&buff, in cmd_read()
176 shell_hexdump(sh, buff, buff_len); in cmd_read()
178 const char *buff; in cmd_read() local
181 ret = lwm2m_get_res_buf(&path, (void **)&buff, in cmd_read()
186 shell_print(sh, "%.*s\n", buff_len, buff); in cmd_read()
/Zephyr-Core-3.5.0/drivers/ipm/
Dipm_stm32_hsem.c79 const void *buff, int size) in stm32_hsem_mailbox_ipm_send() argument
84 ARG_UNUSED(buff); in stm32_hsem_mailbox_ipm_send()

12