Home
last modified time | relevance | path

Searched +full:- +full:- +full:src +full:- +full:dir (Results 1 – 25 of 68) sorted by relevance

123

/Zephyr-latest/drivers/i2s/
Di2s_litex.c4 * SPDX-License-Identifier: Apache-2.0
22 val = (val == max - 1) ? 0 : val + 1; \
79 return -EINVAL; in i2s_get_foramt()
185 int max_off = chan_size - 1; in i2s_copy_from_fifo()
189 for (int off = max_off; off >= 0; off--) { in i2s_copy_from_fifo()
191 *(dst + i * chan_size + (max_off - off)) = in i2s_copy_from_fifo()
213 * @param src memory from which data will be copied to fifo
218 static void i2s_copy_to_fifo(uint8_t *src, size_t size, int sample_width, in i2s_copy_to_fifo() argument
228 sys_write32(*(src + i), I2S_TX_FIFO_ADDR); in i2s_copy_to_fifo()
232 sys_write32(*((uint16_t *)(src + i)), I2S_TX_FIFO_ADDR); in i2s_copy_to_fifo()
[all …]
Di2s_ll_stm32.c4 * SPDX-License-Identifier: Apache-2.0
39 if (rb->tail != rb->head) { in queue_is_empty()
61 return -ENOMEM; in queue_get()
64 *mem_block = rb->buf[rb->tail].mem_block; in queue_get()
65 *size = rb->buf[rb->tail].size; in queue_get()
66 MODULO_INC(rb->tail, rb->len); in queue_get()
83 head_next = rb->head; in queue_put()
84 MODULO_INC(head_next, rb->len); in queue_put()
86 if (head_next == rb->tail) { in queue_put()
89 return -ENOMEM; in queue_put()
[all …]
Di2s_esp32.c4 * SPDX-License-Identifier: Apache-2.0
93 if (i2s_cfg->word_size == 24) { in i2s_esp32_calculate_clock()
97 if (i2s_cfg->options & I2S_OPT_FRAME_CLK_SLAVE || in i2s_esp32_calculate_clock()
98 i2s_cfg->options & I2S_OPT_BIT_CLK_SLAVE) { in i2s_esp32_calculate_clock()
99 i2s_hal_clock_info->bclk_div = 8; in i2s_esp32_calculate_clock()
100 i2s_hal_clock_info->bclk = in i2s_esp32_calculate_clock()
101 i2s_cfg->frame_clk_freq * i2s_cfg->channels * channel_length; in i2s_esp32_calculate_clock()
102 i2s_hal_clock_info->mclk = i2s_cfg->frame_clk_freq * i2s_hal_clock_info->bclk_div; in i2s_esp32_calculate_clock()
104 i2s_hal_clock_info->bclk = in i2s_esp32_calculate_clock()
105 i2s_cfg->frame_clk_freq * i2s_cfg->channels * channel_length; in i2s_esp32_calculate_clock()
[all …]
Di2s_sam_ssc.c4 * SPDX-License-Identifier: Apache-2.0
13 * - TX and RX path share a common bit clock divider and as a result they cannot
17 * - DMA is used in simple single block transfer mode and as such is not able
122 if (rb->tail == rb->head) { in queue_get()
125 return -ENOMEM; in queue_get()
128 *mem_block = rb->buf[rb->tail].mem_block; in queue_get()
129 *size = rb->buf[rb->tail].size; in queue_get()
130 MODULO_INC(rb->tail, rb->len); in queue_get()
147 head_next = rb->head; in queue_put()
148 MODULO_INC(head_next, rb->len); in queue_put()
[all …]
Di2s_mcux_sai.c2 * Copyright 2021,2023-2024 NXP Semiconductor INC.
5 * SPDX-License-Identifier: Apache-2.0
22 #include <zephyr/dt-bindings/clock/imx_ccm.h>
124 while (k_msgq_get(&strm->in_queue, &buffer, K_NO_WAIT) == 0) { in i2s_purge_stream_buffers()
130 while (k_msgq_get(&strm->out_queue, &buffer, K_NO_WAIT) == 0) { in i2s_purge_stream_buffers()
138 struct i2s_dev_data *dev_data = dev->data; in i2s_tx_stream_disable()
139 struct stream *strm = &dev_data->tx; in i2s_tx_stream_disable()
140 const struct device *dev_dma = dev_data->dev_dma; in i2s_tx_stream_disable()
141 const struct i2s_mcux_config *dev_cfg = dev->config; in i2s_tx_stream_disable()
143 LOG_DBG("Stopping DMA channel %u for TX stream", strm->dma_channel); in i2s_tx_stream_disable()
[all …]
/Zephyr-latest/scripts/native_simulator/
DMakefile2 # SPDX-License-Identifier: Apache-2.0
15 # to also build the components in native/src/
18 -include ${NSI_CONFIG_FILE}
35 NSI_ARCH?=-m32
37 NSI_COVERAGE?=--coverage
57 NSI_DEBUG?=-g
59 NSI_OPT?=-O0
61 NSI_WARNINGS?=-Wall -Wpedantic
63 NSI_CPPFLAGS?=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
65 NO_PIE_CO:=-fno-pie -fno-pic
[all …]
/Zephyr-latest/scripts/pylib/pytest-twister-harness/
DREADME.rst6 ------------
11 ``-p twister_harness.plugin`` argument.
15 -----
19 .. code-block:: sh
24 ./scripts/twister -p native_sim -p qemu_x86 -T samples/subsys/testsuite/pytest/shell
27 …./scripts/twister -p nrf52840dk/nrf52840 --device-testing --device-serial /dev/ttyACM0 -T samples/…
31 .. code-block:: sh
33 export PYTHONPATH=${ZEPHYR_BASE}/scripts/pylib/pytest-twister-harness/src:${PYTHONPATH}
38 west build -p -b native_sim -- -DCONFIG_NATIVE_UART_0_ON_STDINOUT=y
39 pytest --twister-harness --device-type=native --build-dir=build -p twister_harness.plugin
[all …]
/Zephyr-latest/subsys/bluetooth/audio/
Dpacs.c7 * Copyright (c) 2022-2023 Nordic Semiconductor ASA
9 * SPDX-License-Identifier: Apache-2.0
142 const struct bt_audio_codec_cap *codec_cap = cap->codec_cap; in build_pac_records()
143 struct net_buf_simple *buf = data->buf; in build_pac_records()
154 pac_codec->id = codec_cap->id; in build_pac_records()
155 pac_codec->cid = sys_cpu_to_le16(codec_cap->cid); in build_pac_records()
156 pac_codec->vid = sys_cpu_to_le16(codec_cap->vid); in build_pac_records()
158 if (net_buf_simple_tailroom(buf) < (sizeof(struct bt_pac_ltv_data) + codec_cap->data_len)) { in build_pac_records()
162 net_buf_simple_add_u8(buf, codec_cap->data_len); in build_pac_records()
163 net_buf_simple_add_mem(buf, codec_cap->data, codec_cap->data_len); in build_pac_records()
[all …]
Dbap_unicast_client.c7 * Copyright (c) 2022-2023 Nordic Semiconductor ASA
9 * SPDX-License-Identifier: Apache-2.0
56 "CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT shall be non-zero");
68 #define PAC_DIR_UNUSED(dir) ((dir) != BT_AUDIO_DIR_SINK && (dir) != BT_AUDIO_DIR_SOURCE) argument
124 enum bt_audio_dir dir; member
161 if (ep->receiver_ready != true || ep->dir != BT_AUDIO_DIR_SOURCE) { in unicast_client_send_start()
163 ep, ep->receiver_ready, bt_audio_dir_str(ep->dir)); in unicast_client_send_start()
165 return -EINVAL; in unicast_client_send_start()
172 buf = bt_bap_unicast_client_ep_create_pdu(ep->stream->conn, BT_ASCS_START_OP); in unicast_client_send_start()
175 return -EBUSY; in unicast_client_send_start()
[all …]
/Zephyr-latest/modules/hal_nordic/nrf-regtool/
Dnrf-regtoolConfig.cmake2 # SPDX-License-Identifier: Apache-2.0
5 string(REPEAT "-v;" ${CONFIG_NRF_REGTOOL_VERBOSITY} verbosity)
8 ${CMAKE_COMMAND} -E env PYTHONPATH=${ZEPHYR_BASE}/scripts/dts/python-devicetree/src
9 ${NRF_REGTOOL} ${verbosity} uicr-compile
10 --edt-pickle-file ${EDT_PICKLE}
11 --product-name ${CONFIG_SOC}
12 --output-file ${generated_hex_file}
20 # Prepare common argument sub-lists.
21 string(REPEAT "-v;" ${CONFIG_NRF_REGTOOL_VERBOSITY} verbosity)
22 list(TRANSFORM CACHED_DTS_ROOT_BINDINGS PREPEND "--bindings-dir;" OUTPUT_VARIABLE bindings_dirs)
[all …]
/Zephyr-latest/subsys/fs/ext2/
Dext2_ops.c4 * SPDX-License-Identifier: Apache-2.0
29 struct ext2_data *fs = filp->mp->fs_data; in ext2_open()
31 if (fs->open_files >= CONFIG_MAX_FILES) { in ext2_open()
33 return -EMFILE; in ext2_open()
42 const char *path = fs_impl_strip_prefix(fs_path, filp->mp); in ext2_open()
88 if ((found_inode->i_mode & EXT2_S_IFMT) != EXT2_S_IFREG) { in ext2_open()
89 ret = -EINVAL; in ext2_open()
95 ret = -ENOMEM; in ext2_open()
99 file->f_inode = found_inode; in ext2_open()
100 file->f_off = 0; in ext2_open()
[all …]
/Zephyr-latest/drivers/spi/
Dspi_andes_atcspi200.c4 * SPDX-License-Identifier: Apache-2.0
61 const struct spi_atcspi200_cfg * const cfg = dev->config; in spi_config()
65 sclk_div = (cfg->f_sys / (config->frequency << 1)) - 1; in spi_config()
66 sys_clear_bits(SPI_TIMIN(cfg->base), TIMIN_SCLK_DIV_MSK); in spi_config()
67 sys_set_bits(SPI_TIMIN(cfg->base), sclk_div); in spi_config()
70 sys_clear_bits(SPI_TFMAT(cfg->base), TFMAT_SLVMODE_MSK); in spi_config()
73 sys_clear_bits(SPI_TFMAT(cfg->base), TFMAT_DATA_MERGE_MSK); in spi_config()
76 data_len = SPI_WORD_SIZE_GET(config->operation) - 1; in spi_config()
77 sys_clear_bits(SPI_TFMAT(cfg->base), TFMAT_DATA_LEN_MSK); in spi_config()
78 sys_set_bits(SPI_TFMAT(cfg->base), (data_len << TFMAT_DATA_LEN_OFFSET)); in spi_config()
[all …]
Dspi_ll_stm32.c4 * SPDX-License-Identifier: Apache-2.0
35 #include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
39 #include <zephyr/linker/linker-defs.h>
79 struct spi_stm32_data *data = dev->data; in spi_stm32_pm_policy_state_lock_get()
81 if (!data->pm_policy_state_on) { in spi_stm32_pm_policy_state_lock_get()
82 data->pm_policy_state_on = true; in spi_stm32_pm_policy_state_lock_get()
95 struct spi_stm32_data *data = dev->data; in spi_stm32_pm_policy_state_lock_put()
97 if (data->pm_policy_state_on) { in spi_stm32_pm_policy_state_lock_put()
98 data->pm_policy_state_on = false; in spi_stm32_pm_policy_state_lock_put()
119 * the linker to avoid potential DMA cache-coherency problems.
[all …]
/Zephyr-latest/drivers/dma/
Ddma_esp32_gdma.c4 * SPDX-License-Identifier: Apache-2.0
58 uint8_t dir; member
83 struct dma_esp32_data *data = (struct dma_esp32_data *const)(dev)->data; in dma_esp32_isr_handle_rx()
86 gdma_ll_rx_clear_interrupt_status(data->hal.dev, rx->channel_id, intr_status); in dma_esp32_isr_handle_rx()
97 status = -intr_status; in dma_esp32_isr_handle_rx()
100 if (rx->cb) { in dma_esp32_isr_handle_rx()
101 rx->cb(dev, rx->user_data, rx->channel_id * 2, status); in dma_esp32_isr_handle_rx()
108 struct dma_esp32_data *data = (struct dma_esp32_data *const)(dev)->data; in dma_esp32_isr_handle_tx()
110 gdma_ll_tx_clear_interrupt_status(data->hal.dev, tx->channel_id, intr_status); in dma_esp32_isr_handle_tx()
114 if (tx->cb) { in dma_esp32_isr_handle_tx()
[all …]
Ddma_mchp_xec.c4 * SPDX-License-Identifier: Apache-2.0
15 #include <zephyr/dt-bindings/interrupt-controller/mchp-xec-ecia.h>
130 uint8_t dir; member
166 return &devcfg->irq_info_list[channel]; in xec_chan_irq_info()
181 static int is_data_aligned(uint32_t src, uint32_t dest, uint32_t unitsz) in is_data_aligned() argument
187 if ((src | dest) & (unitsz - 1U)) { in is_data_aligned()
197 chregs->actv = 0; in xec_dma_chan_clr()
198 chregs->control = 0; in xec_dma_chan_clr()
199 chregs->mem_addr = 0; in xec_dma_chan_clr()
200 chregs->mem_addr_end = 0; in xec_dma_chan_clr()
[all …]
Ddma_sedi.c4 * SPDX-License-Identifier: Apache-2.0
38 #define DEV_DATA(dev) ((struct dma_sedi_driver_data *const)(dev)->data)
40 ((const struct dma_sedi_config_info *const)(dev)->config)
52 struct dma_config *config = &(data->dma_configs[channel]); in dma_handler()
54 /* run user-defined callback */ in dma_handler()
55 if (config->dma_callback) { in dma_handler()
57 (config->complete_callback_en)) { in dma_handler()
58 config->dma_callback(dev, config->user_data, in dma_handler()
60 } else if (!config->error_callback_dis) { in dma_handler()
61 config->dma_callback(dev, config->user_data, in dma_handler()
[all …]
/Zephyr-latest/drivers/espi/
Despi_mchp_xec_v2.c5 * SPDX-License-Identifier: Apache-2.0
16 #include <zephyr/dt-bindings/interrupt-controller/mchp-xec-ecia.h>
40 * length specified is non-zero.
61 ((struct espi_iom_regs *)ESPI_XEC_CONFIG(dev)->base_addr)
64 ((struct espi_msvw_ar_regs *)(ESPI_XEC_CONFIG(dev)->vw_base_addr))
70 (ESPI_XEC_CONFIG(dev)->vw_base_addr + ESPI_XEC_SMVW_REG_OFS))
77 * ------------------------------------------------------------------------|
79 * ------------------------------------------------------------------------|
81 * ------------------------------------------------------------------------|
88 * ------------------------------------------------------------------------|
[all …]
/Zephyr-latest/doc/_extensions/zephyr/
Dapplication.py3 # SPDX-License-Identifier: Apache-2.0
30 'zephyr-app': directives.unchanged,
31 'cd-into': directives.flag,
33 'host-os': directives.unchanged,
37 'gen-args': directives.unchanged,
38 'build-args': directives.unchanged,
40 'build-dir': directives.unchanged,
41 'build-dir-fmt': directives.unchanged,
43 'maybe-skip-config': directives.flag,
45 'west-args': directives.unchanged,
[all …]
/Zephyr-latest/samples/application_development/external_lib/
DCMakeLists.txt1 # SPDX-License-Identifier: Apache-2.0
7 target_sources(app PRIVATE src/main.c)
13 # Other external build systems may be self-contained enough that they
23 set(target_flag "--target=${CMAKE_C_COMPILER_TARGET}")
42 # https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
50 PREFIX ${mylib_build_dir} # Root dir for entire project
/Zephyr-latest/drivers/flash/
Dflash_mspi_emul_device.c3 * SPDX-License-Identifier: Apache-2.0
60 const struct flash_mspi_emul_device_config *cfg = flash->config; in acquire()
61 struct flash_mspi_emul_device_data *data = flash->data; in acquire()
63 k_sem_take(&data->lock, K_FOREVER); in acquire()
64 if (cfg->sw_multi_periph) { in acquire()
65 while (mspi_dev_config(data->bus, &cfg->dev_id, in acquire()
66 MSPI_DEVICE_CONFIG_ALL, &data->dev_cfg)) { in acquire()
70 while (mspi_dev_config(data->bus, &cfg->dev_id, in acquire()
84 struct flash_mspi_emul_device_data *data = flash->data; in release()
86 while (mspi_get_channel_status(data->bus, 0)) { in release()
[all …]
/Zephyr-latest/.github/workflows/
Ddoc-build.yml2 # SPDX-License-Identifier: Apache-2.0
8 - cron: '0 */3 * * *'
11 - v*
22 # and each sphinx-build process may use more than 2GiB of RAM.
26 doc-file-check:
28 runs-on: ubuntu-22.04
30 github.repository_owner == 'zephyrproject-rtos'
32 file_check: ${{ steps.check-doc-files.outputs.any_modified }}
34 - name: checkout
38 fetch-depth: 0
[all …]
/Zephyr-latest/tests/bluetooth/tester/src/audio/
Dbtp_bap_unicast.c1 /* btp_bap_unicast.c - Bluetooth BAP Tester */
6 * SPDX-License-Identifier: Apache-2.0
44 return &stream->audio_stream.cap_stream.bap_stream; in stream_unicast_to_bap()
51 LOG_DBG("%s: type 0x%02x value_len %u", str, data->type, data->data_len); in print_cb()
52 LOG_HEXDUMP_DBG(data->data, data->data_len, ""); in print_cb()
59 LOG_DBG("codec_cfg 0x%02x cid 0x%04x vid 0x%04x count %u", codec_cfg->id, codec_cfg->cid, in print_codec_cfg()
60 codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
62 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
66 /* LC3 uses the generic LTV format - other codecs might do as well */ in print_codec_cfg()
68 bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, print_cb, "data"); in print_codec_cfg()
[all …]
/Zephyr-latest/scripts/west_commands/
Drun_common.py4 # SPDX-License-Identifier: Apache-2.0
35 sys.path.insert(0, str(ZEPHYR_SCRIPTS / 'dts' / 'python-devicetree' / 'src'))
41 # Context-sensitive help indentation.
45 IGNORED_RUN_ONCE_PRIORITY = -1
50 # Using level 1 allows sub-DEBUG levels of verbosity. The
54 # https://docs.python.org/3.7/library/logging.html#logging-levels.
60 log.inf('-- ' + msg, colorize=True)
121 # Remember to update west-completion.bash if you add or remove
127 group.add_argument('-d', '--build-dir', metavar='DIR',
131 group.add_argument('-c', '--cmake-cache', metavar='FILE',
[all …]
/Zephyr-latest/scripts/west_commands/zspdx/
Dwalker.py1 # Copyright (c) 2020-2021 The Linux Foundation
3 # SPDX-License-Identifier: Apache-2.0
43 # configuration - WalkerConfig
81 …|http(s)?:\/\/)(?P<base_url>[\w\.@]+)(\/|:))(?P<namespace>[\w,\-,\_]+)\/(?P<package>[\w,\-,\_]+)(.…
115 # parse codemodel from Walker cfg's build dir
151 # determine path from build dir to CMake file-based API index file, then
183 cfgApp.name = "app-sources"
185 cfgApp.docRefID = "DocumentRef-app"
190 cfgPackageApp.name = "app-sources"
191 cfgPackageApp.spdxID = "SPDXRef-app-sources"
[all …]
/Zephyr-latest/samples/bluetooth/bap_unicast_client/src/
Dmain.c2 * Copyright (c) 2021-2024 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
80 while (len-- != 0) { in print_hex()
89 printk("%s: type 0x%02x value_len %u\n", str, data->type, data->data_len); in print_cb()
90 print_hex(data->data, data->data_len); in print_cb()
98 printk("codec id 0x%02x cid 0x%04x vid 0x%04x count %u\n", codec_cap->id, codec_cap->cid, in print_codec_cap()
99 codec_cap->vid, codec_cap->data_len); in print_codec_cap()
101 if (codec_cap->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cap()
102 bt_audio_data_parse(codec_cap->data, codec_cap->data_len, print_cb, "data"); in print_codec_cap()
105 print_hex(codec_cap->data, codec_cap->data_len); in print_codec_cap()
[all …]

123