/Zephyr-Core-2.7.6/tests/lib/sprintf/src/ |
D | main.c | 89 char buffer[400]; in test_sprintf_double() local 107 sprintf(buffer, "%e", var.d); in test_sprintf_double() 108 zassert_true((strcmp(buffer, "inf") == 0), in test_sprintf_double() 109 "sprintf(inf) - incorrect output '%s'\n", buffer); in test_sprintf_double() 111 sprintf(buffer, "%E", var.d); in test_sprintf_double() 112 zassert_true((strcmp(buffer, "INF") == 0), in test_sprintf_double() 113 "sprintf(INF) - incorrect output '%s'\n", buffer); in test_sprintf_double() 115 sprintf(buffer, "%f", var.d); in test_sprintf_double() 116 zassert_true((strcmp(buffer, "inf") == 0), in test_sprintf_double() 117 "sprintf(inf) - incorrect output '%s'\n", buffer); in test_sprintf_double() [all …]
|
/Zephyr-Core-2.7.6/lib/os/ |
D | mpsc_pbuf.c | 10 #define MPSC_PBUF_DBG(buffer, ...) do { \ argument 13 if (buffer) { \ 14 mpsc_state_print(buffer); \ 19 static inline void mpsc_state_print(struct mpsc_pbuf_buffer *buffer) in mpsc_state_print() argument 23 buffer->wr_idx, buffer->tmp_wr_idx, in mpsc_state_print() 24 buffer->rd_idx, buffer->tmp_rd_idx); in mpsc_state_print() 28 void mpsc_pbuf_init(struct mpsc_pbuf_buffer *buffer, in mpsc_pbuf_init() argument 33 memset(buffer, 0, offsetof(struct mpsc_pbuf_buffer, buf)); in mpsc_pbuf_init() 34 buffer->get_wlen = cfg->get_wlen; in mpsc_pbuf_init() 35 buffer->notify_drop = cfg->notify_drop; in mpsc_pbuf_init() [all …]
|
/Zephyr-Core-2.7.6/tests/lib/mpsc_pbuf/src/ |
D | main.c | 58 static void drop(const struct mpsc_pbuf_buffer *buffer, const union mpsc_pbuf_generic *item) in drop() argument 83 static void init(struct mpsc_pbuf_buffer *buffer, bool overwrite, bool pow2) in init() argument 88 mpsc_pbuf_init(buffer, &cfg); in init() 108 struct mpsc_pbuf_buffer buffer; in item_put_no_overwrite() local 110 init(&buffer, false, pow2); in item_put_no_overwrite() 112 int repeat = buffer.size*2; in item_put_no_overwrite() 119 mpsc_pbuf_put_word(&buffer, test_1word.item); in item_put_no_overwrite() 121 t = (union test_item *)mpsc_pbuf_claim(&buffer); in item_put_no_overwrite() 124 mpsc_pbuf_free(&buffer, &t->item); in item_put_no_overwrite() 128 zassert_equal(mpsc_pbuf_claim(&buffer), NULL, NULL); in item_put_no_overwrite() [all …]
|
/Zephyr-Core-2.7.6/tests/unit/base64/ |
D | main.c | 69 unsigned char buffer[128]; in test_base64_codec() local 76 rc = base64_encode(buffer, sizeof(buffer), &len, src, 64); in test_base64_codec() 78 rc = memcmp(base64_test_enc, buffer, 88); in test_base64_codec() 84 rc = base64_decode(buffer, sizeof(buffer), &len, src, 88); in test_base64_codec() 86 rc = memcmp(base64_test_dec, buffer, 64); in test_base64_codec() 90 rc = base64_encode(buffer, sizeof(buffer), &len, src, 0); in test_base64_codec() 95 rc = base64_encode(buffer, sizeof(buffer), &len, src, slen); in test_base64_codec() 102 rc = base64_encode(buffer, sizeof(buffer), &len, src, slen); in test_base64_codec() 108 rc = base64_decode(buffer, sizeof(buffer), &len, src, 88); in test_base64_codec() 112 rc = base64_decode(buffer, sizeof(buffer), &len, src, 88); in test_base64_codec() [all …]
|
/Zephyr-Core-2.7.6/drivers/misc/ft8xx/ |
D | ft8xx_common.c | 23 uint8_t buffer[2]; in ft8xx_wr16() local 25 *(uint16_t *)buffer = sys_cpu_to_le16(data); in ft8xx_wr16() 26 err = ft8xx_drv_write(address, buffer, sizeof(buffer)); in ft8xx_wr16() 33 uint8_t buffer[4]; in ft8xx_wr32() local 35 *(uint32_t *)buffer = sys_cpu_to_le32(data); in ft8xx_wr32() 36 err = ft8xx_drv_write(address, buffer, sizeof(buffer)); in ft8xx_wr32() 54 uint8_t buffer[2] = {0}; in ft8xx_rd16() local 56 err = ft8xx_drv_read(address, buffer, sizeof(buffer)); in ft8xx_rd16() 59 return sys_le16_to_cpu(*(const uint16_t *)buffer); in ft8xx_rd16() 65 uint8_t buffer[4] = {0}; in ft8xx_rd32() local [all …]
|
/Zephyr-Core-2.7.6/arch/arm/core/aarch32/cortex_m/ |
D | fpu.c | 17 void z_arm_save_fp_context(struct fpu_ctx_full *buffer) in z_arm_save_fp_context() argument 20 __ASSERT_NO_MSG(buffer != NULL); in z_arm_save_fp_context() 29 :: "r" (buffer->caller_saved), "r" (buffer->callee_saved) : in z_arm_save_fp_context() 32 buffer->fpscr = __get_FPSCR(); in z_arm_save_fp_context() 33 buffer->ctx_saved = true; in z_arm_save_fp_context() 46 void z_arm_restore_fp_context(const struct fpu_ctx_full *buffer) in z_arm_restore_fp_context() argument 49 if (buffer->ctx_saved) { in z_arm_restore_fp_context() 56 __set_FPSCR(buffer->fpscr); in z_arm_restore_fp_context() 61 :: "r" (buffer->caller_saved), "r" (buffer->callee_saved) : in z_arm_restore_fp_context()
|
/Zephyr-Core-2.7.6/modules/canopennode/ |
D | CO_driver.c | 83 CO_CANrx_t *buffer = (CO_CANrx_t *)arg; in canopen_rx_isr_callback() local 86 if (!buffer || !buffer->pFunct) { in canopen_rx_isr_callback() 94 buffer->pFunct(buffer->object, &rxMsg); in canopen_rx_isr_callback() 119 CO_CANtx_t *buffer; in canopen_tx_retry() local 126 buffer = &CANmodule->tx_array[i]; in canopen_tx_retry() 127 if (buffer->bufferFull) { in canopen_tx_retry() 129 msg.id = buffer->ident; in canopen_tx_retry() 130 msg.dlc = buffer->DLC; in canopen_tx_retry() 131 msg.rtr = (buffer->rtr ? 1 : 0); in canopen_tx_retry() 132 memcpy(msg.data, buffer->data, buffer->DLC); in canopen_tx_retry() [all …]
|
/Zephyr-Core-2.7.6/subsys/testsuite/coverage/ |
D | coverage.c | 53 static inline void buff_write_u64(void *buffer, size_t *off, uint64_t v) in buff_write_u64() argument 55 *((uint32_t *)((uint8_t *)buffer + *off) + 0) = (uint32_t)(v & MASK_32BIT); in buff_write_u64() 56 *((uint32_t *)((uint8_t *)buffer + *off) + 1) = (uint32_t)((v >> 32) & in buff_write_u64() 64 static inline void buff_write_u32(void *buffer, size_t *off, uint32_t v) in buff_write_u32() argument 66 *((uint32_t *)((uint8_t *)buffer + *off)) = v; in buff_write_u32() 118 size_t populate_buffer(uint8_t *buffer, struct gcov_info *info) in populate_buffer() argument 128 buff_write_u32(buffer, in populate_buffer() 132 buff_write_u32(buffer, in populate_buffer() 136 buff_write_u32(buffer, in populate_buffer() 147 buff_write_u32(buffer, in populate_buffer() [all …]
|
/Zephyr-Core-2.7.6/dts/arm/xilinx/ |
D | zynqmp.dtsi | 106 hw-rx-buffer-size = <XLNX_GEM_HW_RX_BUFFER_SIZE_8KB>; 107 hw-rx-buffer-offset = <0>; 108 hw-tx-buffer-size-full; 109 rx-buffer-descriptors = <32>; 110 tx-buffer-descriptors = <32>; 111 rx-buffer-size = <512>; 112 tx-buffer-size = <512>; 134 hw-rx-buffer-size = <XLNX_GEM_HW_RX_BUFFER_SIZE_8KB>; 135 hw-rx-buffer-offset = <0>; 136 hw-tx-buffer-size-full; [all …]
|
/Zephyr-Core-2.7.6/include/sys/ |
D | mpsc_pbuf.h | 80 typedef void (*mpsc_pbuf_notify_drop)(const struct mpsc_pbuf_buffer *buffer, 140 void mpsc_pbuf_init(struct mpsc_pbuf_buffer *buffer, 159 union mpsc_pbuf_generic *mpsc_pbuf_alloc(struct mpsc_pbuf_buffer *buffer, 168 void mpsc_pbuf_commit(struct mpsc_pbuf_buffer *buffer, 181 void mpsc_pbuf_put_word(struct mpsc_pbuf_buffer *buffer, 196 void mpsc_pbuf_put_word_ext(struct mpsc_pbuf_buffer *buffer, 211 void mpsc_pbuf_put_data(struct mpsc_pbuf_buffer *buffer, 220 const union mpsc_pbuf_generic *mpsc_pbuf_claim(struct mpsc_pbuf_buffer *buffer); 228 void mpsc_pbuf_free(struct mpsc_pbuf_buffer *buffer, 238 bool mpsc_pbuf_is_pending(struct mpsc_pbuf_buffer *buffer);
|
/Zephyr-Core-2.7.6/tests/drivers/entropy/api/src/ |
D | main.c | 27 static int random_entropy(const struct device *dev, char *buffer, char num) in random_entropy() argument 32 (void)memset(buffer, num, BUFFER_LENGTH); in random_entropy() 40 ret = entropy_get_entropy(dev, buffer, BUFFER_LENGTH - 1); in random_entropy() 45 if (buffer[BUFFER_LENGTH - 1] != num) { in random_entropy() 51 TC_PRINT(" 0x%02x\n", buffer[i]); in random_entropy() 52 if (buffer[i] == num) { in random_entropy() 71 uint8_t buffer[BUFFER_LENGTH] = { 0 }; in get_entropy() local 83 ret = random_entropy(dev, buffer, 0); in get_entropy() 91 ret = random_entropy(dev, buffer, 0xa5); in get_entropy()
|
/Zephyr-Core-2.7.6/samples/bluetooth/iso_broadcast_benchmark/src/ |
D | broadcaster.c | 83 static size_t get_chars(char *buffer, size_t max_size) in get_chars() argument 94 buffer[pos++] = c; in get_chars() 97 buffer[pos] = '\0'; in get_chars() 104 char buffer[4]; in parse_rtn_arg() local 111 char_count = get_chars(buffer, sizeof(buffer) - 1); in parse_rtn_arg() 116 rtn = strtoul(buffer, NULL, 0); in parse_rtn_arg() 127 char buffer[9]; in parse_interval_arg() local 134 char_count = get_chars(buffer, sizeof(buffer) - 1); in parse_interval_arg() 139 interval = strtoul(buffer, NULL, 0); in parse_interval_arg() 150 char buffer[6]; in parse_latency_arg() local [all …]
|
/Zephyr-Core-2.7.6/samples/modules/nanopb/src/ |
D | main.c | 15 bool encode_message(uint8_t *buffer, size_t buffer_size, size_t *message_length) in encode_message() argument 29 pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size); in encode_message() 45 bool decode_message(uint8_t *buffer, size_t message_length) in decode_message() argument 53 pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); in decode_message() 72 uint8_t buffer[SimpleMessage_size]; in main() local 76 if (!encode_message(buffer, sizeof(buffer), &message_length)) { in main() 85 decode_message(buffer, message_length); in main()
|
/Zephyr-Core-2.7.6/doc/reference/data_structures/ |
D | ring_buffers.rst | 6 A :dfn:`ring buffer` is a circular buffer, whose contents are stored in 12 buffer of memory. 17 can be enqueued and dequeued from the ring buffer in 25 legal to mix these two modes on a single ring buffer instance. A ring 26 buffer initialized with a byte count must be used only with the 39 ring buffer is referenced by its memory address. 41 A ring buffer has the following key properties: 43 * A **data buffer** of 32-bit words or bytes. The data buffer contains the data 44 items or raw bytes that have been added to the ring buffer but not yet 47 * A **data buffer size**, measured in 32-bit words or bytes. This governs the [all …]
|
/Zephyr-Core-2.7.6/drivers/can/ |
D | can_common.c | 51 static inline void can_work_buffer_init(struct can_frame_buffer *buffer) in can_work_buffer_init() argument 53 buffer->head = 0; in can_work_buffer_init() 54 buffer->tail = 0; in can_work_buffer_init() 58 struct can_frame_buffer *buffer) in can_work_buffer_put() argument 60 uint16_t next_head = WORK_BUF_MOD_SIZE(buffer->head + 1); in can_work_buffer_put() 62 if (buffer->head == WORK_BUF_FULL) { in can_work_buffer_put() 66 buffer->buf[buffer->head] = *frame; in can_work_buffer_put() 69 if (next_head == buffer->tail) { in can_work_buffer_put() 70 buffer->head = WORK_BUF_FULL; in can_work_buffer_put() 72 buffer->head = next_head; in can_work_buffer_put() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/nxp_kinetis_temp/ |
D | temp_kinetis.c | 39 uint16_t buffer[TEMP_KINETIS_ADC_SAMPLES]; member 60 memcpy(previous, data->buffer, sizeof(previous)); in temp_kinetis_sample_fetch() 69 LOG_DBG("sensor = %d, bandgap = %d", data->buffer[0], data->buffer[1]); in temp_kinetis_sample_fetch() 74 data->buffer[i] = (data->buffer[i] >> 1) + in temp_kinetis_sample_fetch() 78 LOG_DBG("sensor = %d, bandgap = %d (filtered)", data->buffer[0], in temp_kinetis_sample_fetch() 79 data->buffer[1]); in temp_kinetis_sample_fetch() 104 vdd_mv = (adcr_vdd * config->bandgap_mv) / data->buffer[1]; in temp_kinetis_channel_get() 116 if (data->buffer[0] > adcr_temp25) { in temp_kinetis_channel_get() 126 (((data->buffer[0] - adcr_temp25) * 10000) / adcr_100m); in temp_kinetis_channel_get() 162 memset(&data->buffer, 0, ARRAY_SIZE(data->buffer)); in temp_kinetis_init() [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/bbram/emul/src/ |
D | main.c | 27 uint8_t buffer[BBRAM_SIZE]; in test_bbram_out_of_bounds() local 30 zassert_equal(bbram_read(dev, 0, 0, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 31 zassert_equal(bbram_read(dev, 0, BBRAM_SIZE + 1, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 32 zassert_equal(bbram_read(dev, BBRAM_SIZE - 1, 2, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 33 zassert_equal(bbram_write(dev, 0, 0, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 34 zassert_equal(bbram_write(dev, 0, BBRAM_SIZE + 1, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 35 zassert_equal(bbram_write(dev, BBRAM_SIZE - 1, 2, buffer), -EFAULT, NULL); in test_bbram_out_of_bounds() 41 uint8_t buffer[BBRAM_SIZE]; in test_read_write() local 49 zassert_ok(bbram_read(dev, 0, BBRAM_SIZE, buffer), NULL); in test_read_write() 50 zassert_mem_equal(buffer, expected, BBRAM_SIZE, NULL); in test_read_write() [all …]
|
/Zephyr-Core-2.7.6/include/drivers/ |
D | entropy.h | 37 uint8_t *buffer, 46 uint8_t *buffer, 65 uint8_t *buffer, 69 uint8_t *buffer, in z_impl_entropy_get_entropy() argument 77 return api->get_entropy(dev, buffer, length); in z_impl_entropy_get_entropy() 94 uint8_t *buffer, in entropy_get_entropy_isr() argument 105 return api->get_entropy_isr(dev, buffer, length, flags); in entropy_get_entropy_isr()
|
/Zephyr-Core-2.7.6/drivers/entropy/ |
D | entropy_b91_trng.c | 26 uint8_t *buffer, uint16_t length) in entropy_b91_trng_get_entropy() argument 36 memcpy(buffer, &value, sizeof(value)); in entropy_b91_trng_get_entropy() 37 buffer += sizeof(value); in entropy_b91_trng_get_entropy() 40 memcpy(buffer, &value, length); in entropy_b91_trng_get_entropy() 50 uint8_t *buffer, uint16_t length, in entropy_b91_trng_get_entropy_isr() argument 56 entropy_b91_trng_get_entropy(dev, buffer, length); in entropy_b91_trng_get_entropy_isr()
|
D | entropy_sam.c | 76 uint8_t *buffer, in entropy_sam_get_entropy_internal() argument 94 memcpy(buffer, &value, to_copy); in entropy_sam_get_entropy_internal() 95 buffer += to_copy; in entropy_sam_get_entropy_internal() 102 static int entropy_sam_get_entropy(const struct device *dev, uint8_t *buffer, in entropy_sam_get_entropy() argument 105 return entropy_sam_get_entropy_internal(dev, buffer, length, 0); in entropy_sam_get_entropy() 109 uint8_t *buffer, in entropy_sam_get_entropy_isr() argument 134 memcpy(buffer, &value, to_copy); in entropy_sam_get_entropy_isr() 135 buffer += to_copy; in entropy_sam_get_entropy_isr() 146 buffer, length, flags); in entropy_sam_get_entropy_isr()
|
/Zephyr-Core-2.7.6/samples/subsys/usb/audio/headset/src/ |
D | main.c | 20 struct net_buf *buffer, in data_received() argument 25 if (!buffer || !size) { in data_received() 30 LOG_DBG("Received %d data, buffer %p", size, buffer); in data_received() 34 ret = usb_audio_send(dev, buffer, size); in data_received() 36 net_buf_unref(buffer); in data_received() 39 net_buf_unref(buffer); in data_received()
|
/Zephyr-Core-2.7.6/samples/subsys/usb/cdc_acm/src/ |
D | main.c | 38 uint8_t buffer[64]; in interrupt_handler() local 40 sizeof(buffer)); in interrupt_handler() 42 recv_len = uart_fifo_read(dev, buffer, len); in interrupt_handler() 44 rb_len = ring_buf_put(&ringbuf, buffer, recv_len); in interrupt_handler() 55 uint8_t buffer[64]; in interrupt_handler() local 58 rb_len = ring_buf_get(&ringbuf, buffer, sizeof(buffer)); in interrupt_handler() 65 send_len = uart_fifo_fill(dev, buffer, rb_len); in interrupt_handler()
|
/Zephyr-Core-2.7.6/samples/subsys/usb/audio/headphones_microphone/src/ |
D | main.c | 22 struct net_buf *buffer, in data_received() argument 27 if (!buffer || !size) { in data_received() 32 LOG_DBG("Received %d data, buffer %p", size, buffer); in data_received() 36 ret = usb_audio_send(mic_dev, buffer, size); in data_received() 38 net_buf_unref(buffer); in data_received() 41 net_buf_unref(buffer); in data_received()
|
/Zephyr-Core-2.7.6/samples/boards/intel_s1000_crb/audio/src/ |
D | audio_core.c | 38 int audio_core_process_mic_source(int32_t *buffer, int channels) in audio_core_process_mic_source() argument 44 read = buffer; in audio_core_process_mic_source() 57 int audio_core_process_host_source(int32_t *buffer, int channels) in audio_core_process_host_source() argument 63 read = buffer; in audio_core_process_host_source() 76 int audio_core_process_speaker_sink(int32_t *buffer, int channels) in audio_core_process_speaker_sink() argument 82 write = buffer; in audio_core_process_speaker_sink() 95 int audio_core_process_host_sink(int32_t *buffer, int channels) in audio_core_process_host_sink() argument 101 write = buffer; in audio_core_process_host_sink()
|
/Zephyr-Core-2.7.6/tests/lib/c_lib/src/ |
D | main.c | 157 char buffer[BUFSIZE]; variable 170 memset(buffer, 0, 10); in test_memset() 172 memset(buffer + i, set, size); in test_memset() 173 memset(buffer + i, set, 1); in test_memset() 174 ret = memcmp(buffer + i, &set, 1); in test_memset() 188 (void)memset(buffer, '\0', BUFSIZE); in test_strlen() 189 (void)memset(buffer, 'b', 5); /* 5 is BUFSIZE / 2 */ in test_strlen() 190 zassert_equal(strlen(buffer), 5, "strlen failed"); in test_strlen() 192 zassert_equal(strnlen(buffer, 3), 3, "strnlen failed"); in test_strlen() 193 zassert_equal(strnlen(buffer, BUFSIZE), 5, "strnlen failed"); in test_strlen() [all …]
|