CardSight 0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
mass_storage.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
7
8#ifndef CARDSIGHT_USB_MASS_STORAGE_H
9#define CARDSIGHT_USB_MASS_STORAGE_H
10
11#include <stdbool.h>
12#include <stdint.h>
13
18 uint64_t bytes_read;
19 uint64_t bytes_written;
20};
21
30
38int usb_mass_storage_start_device(const char *device_name);
45
70
71#endif /* CARDSIGHT_USB_MASS_STORAGE_H */
void usb_mass_storage_get_stats(struct usb_mass_storage_stats *stats)
Copy the transfer counters out.
int usb_mass_storage_stop(void)
Stop the device stack and release the exported block device.
int usb_mass_storage_start_device(const char *device_name)
Start the device stack and export a block device.
bool usb_mass_storage_running(void)
Whether the stack runs and a disk is exported.
int usb_mass_storage_last_error(void)
The last error recorded by the mass storage stack.
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.
Transfer counters of the exported disk.
Definition mass_storage.h:17
uint64_t bytes_read
Definition mass_storage.h:18
uint64_t bytes_written
Definition mass_storage.h:19