Home
last modified time | relevance | path

Searched +full:disk +full:- +full:access (Results 1 – 25 of 75) sorted by relevance

123

/Zephyr-latest/doc/services/storage/disk/
Daccess.rst3 Disk Access
9 The disk access API provides access to storage devices.
14 Since many disk devices (such as SD cards) are hotpluggable, the disk access
15 API provides IOCTLs to initialize and de-initialize the disk. They are
18 * :c:macro:`DISK_IOCTL_CTRL_INIT`: Initialize the disk. Must be called before
19 additional I/O operations can be run on the disk device. Equivalent to
22 * :c:macro:`DISK_IOCTL_CTRL_DEINIT`: De-initialize the disk. Once this IOCTL
24 the disk can be used for addition I/O operations.
26 Init/deinit IOCTL calls are balanced, so a disk will not de-initialize until
29 It is also possible to force a disk de-initialization by passing a
[all …]
Dnvme.rst8 NVMe controllers and disks are supported. Disks can be accessed via the :ref:`Disk Access API <disk…
16 - NVMe controller: :zephyr_file:`drivers/disk/nvme/nvme_controller.c`
17 - NVMe commands: :zephyr_file:`drivers/disk/nvme/nvme_cmd.c`
18 - NVMe namespace: :zephyr_file:`drivers/disk/nvme/nvme_namespace.c`
24 accessing each ones through the Disk Access API :zephyr_file:`drivers/disk/nvme/nvme_disk.c`.
26 If a controller exposes more than 1 namespace (disk), it will be possible to raise the amount of bu…
29 Each exposed disk, via it's related disk_info structure, will be distinguished by its name which is…
30 it's related namespace. As such, the disk name follows NVMe naming which is nvme<k>n<n> where k is …
31 and n the namespame number. Most of the time, if only one NVMe disk is plugged into the system, one…
32 an exposed disk.
[all …]
/Zephyr-latest/include/zephyr/storage/
Ddisk_access.h4 * SPDX-License-Identifier: Apache-2.0
9 * @brief Disk Access layer API
11 * This file contains APIs for disk access.
26 * @brief Disk Access APIs
27 * @defgroup disk_access_interface Disk Access Interface
32 #include <zephyr/drivers/disk.h>
42 * disk or the backing device can do any initialization. Although still
46 * Disk initialization is reference counted, so only the first successful call
47 * to initialize a uninitialized (or previously de-initialized) disk will
48 * actually initialize the disk
[all …]
/Zephyr-latest/include/zephyr/drivers/
Dloopback_disk.h4 * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/drivers/disk.h>
14 * @brief Context object for an active loopback disk device
24 * @brief Register a loopback disk device
26 * Registers a new loopback disk deviced backed by a file at the specified path.
30 * until the disk access is unregistered. This is trivially true for file_path and disk_access_name
36 * @param disk_access_name Name of the created disk access (for disk_access_*() functions)
45 * @brief Unregister a previously registered loopback disk device
47 * Cleans up resources used by the disk access.
Ddisk.h5 * SPDX-License-Identifier: Apache-2.0
10 * @brief Disk Driver Interface
12 * This file contains interface for disk access. Apart from disks, various
22 * @brief Disk Driver Interface
23 * @defgroup disk_driver_interface Disk Driver Interface
42 /** Get the number of sectors in the disk */
44 /** Get the size of a disk SECTOR in bytes */
50 /** Commit any cached read/writes to disk */
52 /** Initialize the disk. This IOCTL must be issued before the disk can be
54 * invocation of this macro on an uninitialized disk will initialize the IO
[all …]
/Zephyr-latest/subsys/disk/
DKconfig2 # SPDX-License-Identifier: Apache-2.0
5 bool "Disk Interface"
8 Enable disk access over a supported media backend like FLASH or RAM
12 module = DISK
13 module-str = disk
/Zephyr-latest/tests/subsys/fs/ext2/src/
Dutils.c4 * SPDX-License-Identifier: Apache-2.0
13 static int sectors_info(const char *disk, uint32_t *ss, uint32_t *sc) in sectors_info() argument
17 rc = disk_access_ioctl(disk, DISK_IOCTL_GET_SECTOR_COUNT, sc); in sectors_info()
19 TC_PRINT("Disk access (sector count) error: %d", rc); in sectors_info()
23 rc = disk_access_ioctl(disk, DISK_IOCTL_GET_SECTOR_SIZE, ss); in sectors_info()
25 TC_PRINT("Disk access (sector size) error: %d", rc); in sectors_info()
76 return sector_size * (sector_count - CONFIG_EXT2_DISK_STARTING_SECTOR); in get_partition_size()
/Zephyr-latest/subsys/fs/ext2/
Dext2_disk_access.c4 * SPDX-License-Identifier: Apache-2.0
24 struct disk_data *disk = fs->backend; in disk_access_device_size() local
26 return disk->sector_count * disk->sector_size; in disk_access_device_size()
31 struct disk_data *disk = fs->backend; in disk_access_write_size() local
33 return disk->sector_size; in disk_access_write_size()
36 static int disk_read(const char *disk, uint8_t *buf, uint32_t start, uint32_t num) in disk_read() argument
41 rc = disk_access_ioctl(disk, DISK_IOCTL_CTRL_SYNC, NULL); in disk_read()
43 rc = disk_access_read(disk, buf, start, num); in disk_read()
44 LOG_DBG("disk read: (start:%d, num:%d) (ret: %d)", start, num, rc); in disk_read()
46 } while ((rc == -EBUSY) && (loop++ < 16)); in disk_read()
[all …]
Dext2_impl.h4 * SPDX-License-Identifier: Apache-2.0
23 /* Initialization of disk storage. */
27 * @brief Get block from the disk.
39 * @brief Write block to the disk.
41 * NOTICE: to ensure that all writes has ended the sync of disk must be triggered
49 * @brief Write block to the disk.
51 * NOTICE: to ensure that all writes has ended the sync of disk must be triggered
61 * @brief Initialize structure with data needed to access the storage device
68 * @retval -EINVAL when superblock of ext2 was not detected
69 * @retval -ENOTSUP when described file system is not supported
[all …]
/Zephyr-latest/dts/bindings/fs/
Dzephyr,fstab-common.yaml2 # SPDX-License-Identifier: Apache-2.0
9 mount-point:
29 read-only:
32 Mount file system read-only if present.
37 no-format:
45 disk-access:
48 Use disk-access for accessing storage media.
/Zephyr-latest/drivers/disk/
Dloopback_disk.c2 * Copyright (c) 2023-2024 Embedded Solutions GmbH
4 * SPDX-License-Identifier: Apache-2.0
8 #include <zephyr/drivers/disk.h>
25 static int loopback_disk_access_status(struct disk_info *disk) in loopback_disk_access_status() argument
29 static int loopback_disk_access_read(struct disk_info *disk, uint8_t *data_buf, in loopback_disk_access_read() argument
32 struct loopback_disk_access *ctx = get_ctx(disk); in loopback_disk_access_read()
34 int ret = fs_seek(&ctx->file, start_sector * LOOPBACK_SECTOR_SIZE, FS_SEEK_SET); in loopback_disk_access_read()
45 ret = fs_read(&ctx->file, data_buf, len_left); in loopback_disk_access_read()
52 return -EIO; in loopback_disk_access_read()
57 len_left -= ret; in loopback_disk_access_read()
[all …]
/Zephyr-latest/boards/intel/socfpga/agilex5_socdk/
Dintel_socfpga_agilex5_socdk.dts4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
13 compatible = "intel,socfpga-agilex5";
14 #address-cells = <1>;
15 #size-cells = <1>;
19 zephyr,shell-uart = &uart0;
27 /*SD Disk Access */
28 compatible = "zephyr,sdmmc-disk";
29 disk-name = "SD";
36 current-speed = <115200>;
[all …]
/Zephyr-latest/tests/drivers/disk/disk_access/
DKconfig1 # SPDX-License-Identifier: Apache-2.0
4 mainmenu "Disk driver access test"
/Zephyr-latest/tests/drivers/disk/disk_access/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
8 * WARNING: This test will overwrite data on any disk utilized. Do not run
9 * this test with an disk that has useful data
37 #error "No disk device defined, is your board supported?"
61 /* + 4 to make sure the second buffer is dword-aligned for NVME */
98 zassert_equal(rc, 0, "Loopback disk access initialization failed"); in setup_loopback_backing()
102 /* Sets up test by initializing disk */
109 zassert_equal(rc, 0, "Disk access initialization failed"); in test_setup()
112 zassert_equal(rc, DISK_STATUS_OK, "Disk status is not OK"); in test_setup()
115 zassert_equal(rc, 0, "Disk ioctl get sector count failed"); in test_setup()
[all …]
/Zephyr-latest/samples/subsys/usb/mass/
DREADME.rst1 .. zephyr:code-sample:: usb-mass
3 :relevant-api: usbd_api usbd_msc_device _usb_device_core_api file_system_api
5 Expose board's RAM or FLASH as a USB disk using USB Mass Storage driver.
12 into an USB disk. This sample can be found under
25 The selection between a RAM-based or a FLASH-based disk and file system
26 can be chosen passing Kconfig configuration via the -D command-line switch.
28 RAM-disk Example without any file system
31 The default configurations selects RAM-based disk without any file system.
32 This example only needs additional 96KiB RAM for the RAM-disk and is intended
35 .. zephyr-app-commands::
[all …]
/Zephyr-latest/samples/subsys/shell/shell_module/boards/
Dintel_socfpga_agilex5_socdk.conf1 # Copyright (c) 2022-2023, Intel Corporation.
2 # SPDX-License-Identifier: Apache-2.0
31 # Enable Disk access
/Zephyr-latest/dts/bindings/mmc/
Dst,stm32-sdmmc.yaml1 description: stm32 sdmmc disk access
3 compatible: "st,stm32-sdmmc"
5 include: [mmc.yaml, pinctrl-device.yaml, reset-device.yaml]
17 pinctrl-0:
20 pinctrl-names:
23 cd-gpios:
24 type: phandle-array
27 pwr-gpios:
28 type: phandle-array
31 bus-width:
[all …]
/Zephyr-latest/tests/drivers/disk/disk_performance/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
22 #error "No disk device defined, is your board supported?"
55 /* Sets up test by initializing disk */
62 zassert_equal(rc, 0, "Disk access initialization failed"); in test_setup()
65 zassert_equal(rc, DISK_STATUS_OK, "Disk status is not OK"); in test_setup()
68 zassert_equal(rc, 0, "Disk ioctl get sector count failed"); in test_setup()
70 TC_PRINT("Disk reports %u sectors\n", cmd_buf); in test_setup()
74 zassert_equal(rc, 0, "Disk ioctl get sector size failed"); in test_setup()
75 TC_PRINT("Disk reports sector size %u\n", cmd_buf); in test_setup()
100 /* Read from start of disk */ in read_helper()
[all …]
/Zephyr-latest/tests/subsys/fs/fat_fs_api/src/
Dtest_fat.h6 * SPDX-License-Identifier: Apache-2.0
23 #error "Failed to select DISK access type"
/Zephyr-latest/boards/shields/pmod_sd/doc/
Dindex.rst14 - Full-sized SD card slot
15 - Store and access large amounts of date from your system board
16 - No limitation on file system or memory size of SD card used
17 - 1-bit and 4-bit communication
18 - 12-pin Pmod port with SPI interface
23 Set ``--shield pmod_sd`` when you invoke ``west build``. For example:
25 .. zephyr-app-commands::
26 :zephyr-app: tests/drivers/disk/disk_access
43 - `Pmod SD product page`_
44 - `Pmod SD reference manual`_
[all …]
/Zephyr-latest/subsys/fs/
DKconfig.fatfs4 # SPDX-License-Identifier: Apache-2.0
19 bool "Read-only support for all volumes"
22 Select this when using FAT for read-only access to slightly
46 destroy your disk, if mount attempt fails. In case when your
47 disk can be detached from a device and recovered using other
49 When this option is disabled, disk needs to be FAT formatted
78 FIL is defined in ff.h of ELM FAT driver, and is pre-allocated
79 at compile-time.
88 DIR is defined in ff.h of ELM FAT driver, and is pre-allocated
89 at compile-time.
[all …]
/Zephyr-latest/subsys/net/lib/tftp/
Dtftp_client.h4 * SPDX-License-Identifier: Apache-2.0
25 #define TFTP_MAX_FILENAME_SIZE (TFTPC_MAX_BUF_SIZE - TFTP_MAX_MODE_SIZE - 4)
40 /** Access violation. */
42 /** Disk full or allocation exceeded. */
/Zephyr-latest/subsys/usb/device_next/class/
Dusbd_msc_scsi.c4 * SPDX-License-Identifier: Apache-2.0
21 /* Claim conformance to SPC-2 because this allows us to implement less commands
49 /* SAM-6 5.2 Command descriptor block (CDB)
52 #define GET_CONTROL_NACA(cmd) (cmd->control & BIT(2))
54 /* SPC-5 4.3.3 Variable type data field requirements
63 /* SPC-5 F.3.1 Operation codes Table F.2 — Operation codes */
84 /* DESC bit was reserved in SPC-2 and is optional since SPC-3 */
85 #define GET_REQUEST_SENSE_DESC(cmd) (cmd->desc & BIT(0))
121 /* CMDDT in SPC-2, but obsolete since SPC-3 */
130 /* SPC-5 Table 517 — DESIGNATOR TYPE field */
[all …]
/Zephyr-latest/samples/subsys/fs/fs_sample/
DREADME.rst1 .. zephyr:code-sample:: fs
3 :relevant-api: file_system_api disk_access_interface
13 To access device the sample uses :ref:`disk_access_api`.
22 to run with any other board that has "zephyr,sdmmc-disk" DT node enabled.
46 .. zephyr-app-commands::
47 :zephyr-app: samples/subsys/fs/fs_sample
58 .. zephyr-app-commands::
59 :zephyr-app: samples/subsys/fs/fs_sample
61 …:gen-args: -DEXTRA_CONF_FILE=nrf52840dk_nrf52840_qspi.conf -DDTC_OVERLAY_FILE=nrf52840dk_nrf52840_…
70 In case when mount fails the device may get re-formatted to FAT FS.
[all …]
/Zephyr-latest/doc/connectivity/usb/device/
Dusb_device.rst22 device requests in table 9-3 from the universal serial bus specification
42 See :zephyr:code-sample:`usb-audio-headphones-microphone` and
43 :zephyr:code-sample:`usb-audio-headset` samples for reference.
53 * HCI commands through control endpoint (host-to-device only)
67 See :zephyr:code-sample:`bluetooth_hci_usb` sample for reference.
86 ring buffer is full only if the hw-flow-control property is enabled and
87 called from a non-ISR context.
90 :dtcompatible:`zephyr,cdc-acm-uart`.
104 .. code-block:: devicetree
108 compatible = "zephyr,cdc-acm-uart";
[all …]

123