|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
A block device exported as a USB mass storage LUN: the host sees a disk and reads and writes the sectors of the block device behind it. More...
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | usb_mass_storage_stats |
| Transfer counters of the exported disk. More... | |
Functions | |
| void | usb_mass_storage_force_read_only (bool read_only) |
| Export read-only whatever the device says. | |
| int | usb_mass_storage_start_device (const char *device_name) |
| Start the device stack and export a block device. | |
| int | usb_mass_storage_stop (void) |
| Stop the device stack and release the exported block device. | |
| bool | usb_mass_storage_running (void) |
| Whether the stack runs and a disk is exported. | |
| bool | usb_mass_storage_configured (void) |
| Whether the host configured the interface (it enumerated us). | |
| int | usb_mass_storage_last_error (void) |
| The last error recorded by the mass storage stack. | |
| void | usb_mass_storage_get_stats (struct usb_mass_storage_stats *stats) |
| Copy the transfer counters out. | |
A block device exported as a USB mass storage LUN: the host sees a disk and reads and writes the sectors of the block device behind it.
| bool usb_mass_storage_configured | ( | void | ) |
Whether the host configured the interface (it enumerated us).
| void usb_mass_storage_force_read_only | ( | bool | read_only | ) |
Export read-only whatever the device says.
For host-side read tests.
| [in] | read_only | Whether the export refuses host writes. |
| void usb_mass_storage_get_stats | ( | struct usb_mass_storage_stats * | stats | ) |
Copy the transfer counters out.
| [out] | stats | Receives the byte counts; NULL is ignored. |
| int usb_mass_storage_last_error | ( | void | ) |
The last error recorded by the mass storage stack.
| bool usb_mass_storage_running | ( | void | ) |
Whether the stack runs and a disk is exported.
| int usb_mass_storage_start_device | ( | const char * | device_name | ) |
Start the device stack and export a block device.
| [in] | device_name | Block device to export, e.g. "mmcblk0". |
| int usb_mass_storage_stop | ( | void | ) |
Stop the device stack and release the exported block device.