|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
Everything the worker publishes to the UI. More...
#include <app.h>
Data Fields | |
| struct storage_proxy_partition_info | partitions [STORAGE_PROXY_MAX_PARTITIONS] |
| Partition information from the last scan. | |
| struct mmc_card_info | card |
| Identity of the card in the slot, when it could be read. | |
| struct cardsight_file_list | files |
| Latest directory listing. | |
| size_t | partition_count |
Number of valid entries in partitions. | |
| uint64_t | sectors |
| Capacity of the card in 512-byte sectors. | |
| int | error |
| Error of the last completed operation, or zero. | |
| enum cardsight_request_type | request |
| Operation currently running or last run. | |
| enum blk_partition_table_type | table |
| Partition table type found on the card. | |
| bool | card_present |
| True when a block device for the source disk could be opened. | |
| bool | card_detecting |
| True while the MMC slot is identifying a newly inserted card. | |
| bool | card_writable |
| True when the card is not read-only. | |
| bool | card_info_valid |
True when card holds a valid identity. | |
| bool | proxy_active |
| True while the proxy view and its USB device are up. | |
| bool | busy |
| True while the worker runs a request. | |
| bool | configured |
| True when the host has configured the USB mass storage device. | |
| uint64_t | bytes_read |
| Bytes the host has read over USB since the device started. | |
| uint64_t | bytes_written |
| Bytes the host has written over USB since the device started. | |
| uint32_t | read_rate |
| Read throughput of the last second, in bytes per second. | |
| uint32_t | write_rate |
| Write throughput of the last second, in bytes per second. | |
| char | operation [48] |
| Human-readable description of the current or last operation. | |
| char | card_error [48] |
| Human-readable detail of the last card failure. | |
| int | progress |
| Progress percentage of the current operation, or -1 when it is not measurable. | |
| bool | running |
| True while the USB mass storage device is running. | |
Everything the worker publishes to the UI.
Protected by app_lock. The UI copies it with cardsight_snapshot(); the worker is the only writer.