Home
last modified time | relevance | path

Searched +full:block +full:- +full:count (Results 1 – 25 of 294) sorted by relevance

12345678910>>...12

/Zephyr-latest/lib/mem_blocks/
Dmem_blocks.c4 * SPDX-License-Identifier: Apache-2.0
23 k_spinlock_key_t key = k_spin_lock(&mem_block->lock); in alloc_blocks()
26 /* Find an unallocated block */ in alloc_blocks()
27 r = sys_bitarray_alloc(mem_block->bitmap, num_blocks, &offset); in alloc_blocks()
30 k_spin_unlock(&mem_block->lock, key); in alloc_blocks()
37 mem_block->info.used_blocks += (uint32_t)num_blocks; in alloc_blocks()
39 if (mem_block->info.max_used_blocks < mem_block->info.used_blocks) { in alloc_blocks()
40 mem_block->info.max_used_blocks = mem_block->info.used_blocks; in alloc_blocks()
43 k_spin_unlock(&mem_block->lock, key); in alloc_blocks()
46 /* Calculate the start address of the newly allocated block */ in alloc_blocks()
[all …]
/Zephyr-latest/include/zephyr/sys/
Dmem_blocks.h4 * SPDX-License-Identifier: Apache-2.0
63 * This is a user-provided functions whose responsibility is selecting
70 * allocation to fail and a -EINVAL reported to the calling code.
73 * @param cfg An opaque user-provided value. It may be interpreted in
87 uint8_t blk_sz_shift; /* Bit shift for block size */
97 /* Memory block buffer */
104 /* Spinlock guarding access to memory block internals */
120 * @brief Create a memory block object with a providing backing buffer.
122 * @param name Name of the memory block object.
123 * @param blk_sz Size of each memory block (in bytes, power of 2).
[all …]
Dsem.h4 * SPDX-License-Identifier: Apache-2.0
60 * @param _initial_count Initial semaphore count.
61 * @param _count_limit Maximum permitted semaphore count.
90 * @param initial_count Initial semaphore count.
91 * @param limit Maximum permitted semaphore count.
94 * @retval -EINVAL Bad parameters, the value of limit should be located in
104 * maximum permitted count.
109 * @retval -EINVAL Parameter address not recognized.
110 * @retval -EACCES Caller does not have enough access.
111 * @retval -EAGAIN Count reached Maximum permitted count and try again.
[all …]
/Zephyr-latest/samples/sensor/tdk_apex/
DREADME.rst1 .. zephyr:code-sample:: tdk_apex
3 :relevant-api: sensor_interface
12 ** Pedometer: Tracks step count, and provide details such as the cadence
25- https://invensense.tdk.com/download-pdf/an-000271-icm-42607x-and-icm-42670x-apex-motion-function…
44 to be aliased as ``tdk-apex-sensorN`` where ``N`` goes from ``0`` to ``9``. For example:
46 .. code-block:: devicetree
50 tdk-apex-sensor0 = &icm42670p;
56 .. code-block:: devicetree
64 .. zephyr-app-commands::
65 :zephyr-app: samples/sensor/tdk_apex
[all …]
/Zephyr-latest/drivers/flash/
DKconfig.cadence_nand2 # SPDX-License-Identifier: Apache-2.0
43 int "Set the page count for a single transfer in the CDMA Mode"
46 Configure the page count for a single transfer in the CDMA Mode
49 int "Set the block count for a single transfer in the CDMA Mode"
52 Configure the block count for a single transfer in the CDMA Mode
Dflash_page_layout.c4 * SPDX-License-Identifier: Apache-2.0
14 const struct flash_driver_api *api = dev->api; in flash_get_page_info()
19 info->start_offset = 0; in flash_get_page_info()
20 info->index = 0U; in flash_get_page_info()
22 api->page_layout(dev, &layout, &layout_size); in flash_get_page_info()
24 while (layout_size--) { in flash_get_page_info()
25 info->size = layout->pages_size; in flash_get_page_info()
27 index_jmp = index - info->index; in flash_get_page_info()
29 index_jmp = (offs - info->start_offset) / info->size; in flash_get_page_info()
32 index_jmp = MIN(index_jmp, layout->pages_count); in flash_get_page_info()
[all …]
/Zephyr-latest/drivers/i2s/
DKconfig.esp323 # SPDX-License-Identifier: Apache-2.0
17 int "ESP32 I2S RX block count"
23 int "ESP32 I2S TX block count"
/Zephyr-latest/doc/kernel/services/synchronization/
Dsemaphores.rst21 * A **count** that indicates the number of times the semaphore can be taken.
22 A count of zero indicates that the semaphore is unavailable.
24 * A **limit** that indicates the maximum value the semaphore's count
27 A semaphore must be initialized before it can be used. Its count must be set
28 to a non-negative value that is less than or equal to its limit.
31 increments its count, unless the count is already equal to the limit.
34 decrements its count, unless the semaphore is unavailable (i.e. at zero).
41 You may initialize a "full" semaphore (count equal to limit) to limit the number
43 initialize an empty semaphore (count equal to 0, with a limit greater than 0)
61 semaphore by setting its count to 0 and its limit to 1.
[all …]
/Zephyr-latest/tests/drivers/smbus/smbus_api/src/
Dtest_smbus_qemu.c4 * SPDX-License-Identifier: Apache-2.0
22 /* Qemu q35 has default emulated EEPROM-like devices */
105 * emulate SMBus Block protocol, however it is good enough in ZTEST_USER()
106 * to test Block Write followed by Block Read in ZTEST_USER()
109 /* Test SMBus Block Write / Block Read */ in ZTEST_USER()
114 uint8_t count; in ZTEST_USER() local
122 zassert_ok(ret, "SMBUS write block failed, ret %d", ret); in ZTEST_USER()
125 &count, recv_block); in ZTEST_USER()
126 zassert_ok(ret, "SMBUS read block failed, ret %d", ret); in ZTEST_USER()
128 zassert_equal(count, SMBUS_BLOCK_BYTES_MAX, in ZTEST_USER()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dblob_srv.c4 * SPDX-License-Identifier: Apache-2.0
19 #define MTU_SIZE_MAX (BT_MESH_RX_SDU_MAX - BT_MESH_MIC_SHORT)
22 #define SERVER_TIMEOUT_SECS(srv) (10 * (1 + (srv)->state.timeout_base))
23 /* The initial timer value used by an instance of the Pull BLOB State machine - T_BPI */
28 "max block size that is the power of two.");
37 "The BLOB Partial Block Report message does not fit into the maximum outgoing SDU "
42 "The BLOB Block Status message does not fit into the maximum outgoing SDU size.");
49 return DIV_ROUND_UP(srv->state.xfer.size, in block_count_get()
50 (1U << srv->state.xfer.block_size_log)); in block_count_get()
55 return MIN((srv->state.mtu_size - 2 - BT_MESH_MODEL_OP_LEN(BT_MESH_BLOB_OP_CHUNK)), in max_chunk_size()
[all …]
/Zephyr-latest/doc/connectivity/bluetooth/shell/audio/
Dbap.rst9 - Capabilities and Endpoint discovery
10 - Audio Stream Endpoint procedures
15 .. code-block:: console
17 bap --help
58 [lang <ISO 639-3 lang>]
74 .. csv-table:: State Machine Transitions
80 "config","discover","idle/codec-configured/qos-configured","codec-configured"
81 "qos","config","codec-configured/qos-configured","qos-configured"
82 "enable","qos","qos-configured","enabling"
83 "connect","qos/enable","qos-configured/enabling","qos-configured/enabling"
[all …]
/Zephyr-latest/tests/drivers/smbus/smbus_emul/src/
Demul.c4 * SPDX-License-Identifier: Apache-2.0
51 sys_slist_prepend(&peripherals, &peripheral->node); in emul_register_smbus_peripheral()
59 if (peripheral->addr == addr) { in emul_get_smbus_peripheral()
72 if (peripheral->smbalert && !peripheral->smbalert_handled) { in peripheral_handle_smbalert()
82 LOG_DBG("Return own address: 0x%02x", found->addr); in peripheral_handle_smbalert()
84 io_area[PCH_SMBUS_HD0] = found->addr; in peripheral_handle_smbalert()
85 found->smbalert_handled = true; in peripheral_handle_smbalert()
95 if (peripheral->host_notify) { in peripheral_handle_host_notify()
97 io_area[PCH_SMBUS_NDA] = peripheral->addr << 1; in peripheral_handle_host_notify()
113 peripheral->raw_data[reg] = value; in peripheral_write()
[all …]
/Zephyr-latest/samples/subsys/modbus/tcp_server/
DREADME.rst1 .. zephyr:code-sample:: modbus-tcp-server
3 :relevant-api: modbus bsd_sockets
16 This sample has been tested with FRDM-K64F board,
34 .. zephyr-app-commands::
35 :zephyr-app: samples/subsys/modbus/tcp_server
43 .. code-block:: console
45 # pymodbus.console tcp --host 192.0.2.1 --port 502
50 .. code-block:: console
57 .. code-block:: console
66 .. code-block:: console
[all …]
/Zephyr-latest/dts/bindings/flash_controller/
Datmel,sam-flash-controller.yaml2 # SPDX-License-Identifier: Apache-2.0
6 compatible: "atmel,sam-flash-controller"
8 include: flash-controller.yaml
14 "#erase-block-cells":
18 erase-block-cells:
19 - pages-count
20 - pages-size
/Zephyr-latest/samples/drivers/misc/timeaware_gpio/
DREADME.rst1 .. zephyr:code-sample:: timeaware-gpio
2 :name: Time-aware GPIO
3 :relevant-api: tgpio_interface
21 .. zephyr-app-commands::
22 :zephyr-app: samples/drivers/misc/timeaware_gpio
24 :host-os: unix
34 .. code-block:: console
36 *** Booting Zephyr OS build zephyr-v3.4.0-4166-g52b34a310c67 ***
41 [TGPIO] timestamp: 0000000000000000, event count: 0000000000000000
42 [TGPIO] timestamp: 0000000148a3cf31, event count: 0000000000000001
[all …]
/Zephyr-latest/samples/subsys/modbus/tcp_gateway/
DREADME.rst1 .. zephyr:code-sample:: modbus-gateway
2 :name: Modbus TCP-to-serial gateway
3 :relevant-api: modbus bsd_sockets
5 Implement a gateway between an Ethernet TCP-IP network and a Modbus serial line.
11 an Ethernet TCP-IP network and a Modbus serial line.
16 This sample has been tested with FRDM-K64F board,
21 :zephyr:code-sample:`modbus-rtu-server` sample. Client is running on a PC or laptop.
26 In addition to the evaluation boards RS-485 shields may be used.
27 The A+, B- lines of the RS-485 shields should be connected together.
38 .. zephyr-app-commands::
[all …]
/Zephyr-latest/drivers/smbus/
Dsmbus_shell.c5 * SPDX-License-Identifier: Apache-2.0
42 * https://manpages.debian.org/buster/i2c-tools/i2cdetect.8.en.html
54 return -ENODEV; in cmd_smbus_scan()
71 shell_fprintf(sh, SHELL_NORMAL, "-- "); in cmd_smbus_scan()
93 return -ENODEV; in cmd_smbus_quick()
117 return -ENODEV; in cmd_smbus_byte_read()
126 return -EIO; in cmd_smbus_byte_read()
146 return -ENODEV; in cmd_smbus_byte_write()
157 return -EIO; in cmd_smbus_byte_write()
175 return -ENODEV; in cmd_smbus_byte_data_read()
[all …]
/Zephyr-latest/samples/kernel/condition_variables/condvar/
DREADME.rst1 .. zephyr:code-sample:: kernel-condvar
3 :relevant-api: condvar_apis
25 .. zephyr-app-commands::
26 :zephyr-app: samples/kernel/condition_variables/condvar
27 :host-os: unix
37 .. code-block:: console
40 watch_count: thread 1 Count= 0. Going into wait...
41 inc_count: thread 2, count = 1, unlocking mutex
42 inc_count: thread 3, count = 2, unlocking mutex
43 inc_count: thread 2, count = 3, unlocking mutex
[all …]
/Zephyr-latest/samples/subsys/fs/fs_sample/
Dsample.yaml6 - fatfs
15 - "Block count"
16 - "Sector size"
17 - "Memory Size"
18 - "Disk mounted"
23 - arduino_spi
24 - arduino_gpio
25 - arduino_i2c
27 - stm32f769i_disco
28 - pan1781_evb
[all …]
/Zephyr-latest/doc/services/net_buf/
Dindex.rst23 .. code-block:: c
32 .. code-block:: c
43 .. code-block:: c
48 buffers may also contain protocol-specific context, known as user data.
50 compile-time defined when declaring the buffer pool.
73 .. code-block:: c
86 .. code-block:: c
98 .. code-block:: c
110 .. code-block:: c
127 resulting in a buffer with reference count 1. The reference count can be
[all …]
/Zephyr-latest/drivers/eeprom/
Deeprom_at2x.c4 * SPDX-License-Identifier: Apache-2.0
32 #define EEPROM_AT25_STATUS_WIP BIT(0) /* Write-In-Process (RO) */
34 #define EEPROM_AT25_STATUS_BP0 BIT(2) /* Block Protection 0 (RW) */
35 #define EEPROM_AT25_STATUS_BP1 BIT(3) /* Block Protection 1 (RW) */
70 const struct eeprom_at2x_config *config = dev->config; in eeprom_at2x_write_protect()
72 if (!config->wp_gpio.port) { in eeprom_at2x_write_protect()
76 return gpio_pin_set_dt(&config->wp_gpio, 1); in eeprom_at2x_write_protect()
81 const struct eeprom_at2x_config *config = dev->config; in eeprom_at2x_write_enable()
83 if (!config->wp_gpio.port) { in eeprom_at2x_write_enable()
87 return gpio_pin_set_dt(&config->wp_gpio, 0); in eeprom_at2x_write_enable()
[all …]
/Zephyr-latest/dts/bindings/dma/
Drenesas,smartbond-dma.yaml2 # SPDX-License-Identifier: Apache-2.0
4 include: dma-controller.yaml
8 compatible: "renesas,smartbond-dma"
17 block-count:
21 description: Number of block counts supported
23 "#dma-cells":
26 # - #dma-cells : Must be <2>.
28 # config: peripheral's dma request line. Valid values are defined in dt-bindings/dma/dma_smartbond.h
30 dma-cells:
31 - channel
[all …]
/Zephyr-latest/doc/connectivity/bluetooth/shell/host/
Diso.rst7 .. code-block:: console
9 iso --help
10 iso - Bluetooth ISO shell commands
17 send :Send to ISO Channel [count]
19 create-big :Create a BIG as a broadcaster [enc <broadcast code>]
21 sync-big :Synchronize to a BIG as a receiver <BIS bitfield> [mse] [timeout]
23 term-big :Terminate a BIG
30 .. code-block:: console
37 .. code-block:: console
43 .. code-block:: console
[all …]
/Zephyr-latest/tests/lib/newlib/thread_safety/src/
Dstress.c4 * SPDX-License-Identifier: Apache-2.0
8 * @file Newlib thread-safety stress test
11 * provided by newlib are thread safe (i.e. synchronised) and that the thread-
12 * specific contexts are properly handled (i.e. re-entrant).
37 static ZTEST_BMEM atomic_t count; in malloc_thread() local
44 val = atomic_inc(&count); in malloc_thread()
46 /* Allocate memory block and write a unique value to it. */ in malloc_thread()
56 * memory block is valid. This value will become corrupted if in malloc_thread()
59 zassert_equal(*ptr, val, "Corrupted memory block"); in malloc_thread()
61 /* Free memory block. */ in malloc_thread()
/Zephyr-latest/subsys/net/lib/lwm2m/
DKconfig2 # SPDX-License-Identifier: Apache-2.0
15 module-dep = LOG
16 module-str = Log level for LwM2M library
81 bool "CoAP block transfer support for big outgoing LwM2M messages [EXPERIMENTAL]"
84 LwM2M messages with a big body that exceed the block size will be split
86 To append CoAP ETag option into outgoing block transfers, CONFIG_SYS_HASH_FUNC32 should
90 bool "Use path matching as fallback for cancel-observe"
93 implementations to implement cancel-observe by specifying the resource
95 this option, cancel-observe may not work properly when connecting to
140 According to LwM2M specification v1.0 and v1.1, non-core object versions other than 1.0
[all …]

12345678910>>...12