|
K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
|
Public Headers | |
| file | storage.h |
Data Structures | |
| struct | kfsw_storage_info |
Macros | |
| #define | KFSW_STORAGE_MOUNT_POINT "/kfsw" |
| #define | KFSW_STORAGE_TMP_MOUNT_POINT KFSW_STORAGE_MOUNT_POINT "/tmp" |
Functions | |
| int | kfsw_storage_init (void) |
| int | kfsw_storage_mount (void) |
| int | kfsw_storage_unmount (void) |
| bool | kfsw_storage_is_ready (void) |
| int | kfsw_storage_get_info (struct kfsw_storage_info *info) |
| int | kfsw_storage_tmp_mount (void) |
| int | kfsw_storage_get_tmp_info (struct kfsw_storage_info *info) |
LittleFS setup, mount and capacity.
Initialize with kfsw_storage_init(), mount with kfsw_storage_mount(), and query state with kfsw_storage_get_info(). Services use Zephyr filesystem calls after kfsw_storage_is_ready() reports true.
| #define KFSW_STORAGE_TMP_MOUNT_POINT KFSW_STORAGE_MOUNT_POINT "/tmp" |
#include <storage.h>
RAM scratch volume, empty after every boot.
| int kfsw_storage_get_info | ( | struct kfsw_storage_info * | info | ) |
#include <storage.h>
Read current K-FSW storage information.
Capacity values are reported only while the volume is mounted.
| [out] | info | Storage information. |
| 0 | Information was returned successfully. |
| -EINVAL | info is NULL. |
| int kfsw_storage_get_tmp_info | ( | struct kfsw_storage_info * | info | ) |
#include <storage.h>
Read the RAM scratch volume's information, as kfsw_storage_get_info().
| -ENOTSUP | The composition has no RAM volume. |
| int kfsw_storage_init | ( | void | ) |
#include <storage.h>
Initialize the configured flash storage backend.
Repeated successful calls are harmless. This does not mount or format the filesystem.
| 0 | The backend is initialized and available. |
| bool kfsw_storage_is_ready | ( | void | ) |
#include <storage.h>
| int kfsw_storage_mount | ( | void | ) |
#include <storage.h>
Mount the K-FSW storage volume.
Repeated successful calls are harmless. If the initial no-format mount reports a corrupt filesystem and every byte in the partition still has the flash erase value, the partition is treated as first-boot media, formatted, and mounted once more. Non-erased media is never automatically formatted.
| 0 | The volume is mounted and ready. |
| int kfsw_storage_tmp_mount | ( | void | ) |
#include <storage.h>
Format and mount the RAM scratch volume at KFSW_STORAGE_TMP_MOUNT_POINT.
It is formatted on every call, so it starts empty after a reset even where the RAM keeps its contents. Repeated calls while mounted are harmless.
| 0 | The volume is mounted and empty. |
| -ENOTSUP | The composition has no RAM volume. |
| int kfsw_storage_unmount | ( | void | ) |
#include <storage.h>
Unmount the K-FSW storage volume.
Repeated calls while unmounted are harmless.
| 0 | The volume is unmounted. |