Spiffs周辺機器¶
Spiffs Peripheral
このAPIを使用して、spiffsパーティションを初期化、マウント、およびアンマウントします。関数periph_spiffs_init()、periph_spiffs_mount()、およびperiph_spiffs_unmount()を参照してください。 データの読み取り/書き込みは、Spiffsストリームで説明されている別のAPIで実装されます。
Use this API to initialize, mount and unmount spiffs partition, see functionsperiph_spiffs_init(),periph_spiffs_mount()andperiph_spiffs_unmount(). The data reading / writing is implemented in a separate API described in Spiffs Stream.
アプリケーション例¶
Application Example
このAPIの実装は、filter/pipeline_spiffs_amr_resampleの例で示されています。
Implementation of this API is demonstrated in filter/pipeline_spiffs_amr_resample example.
APIリファレンス¶
API Reference
関数¶
Functions
-
esp_periph_handle_t
periph_spiffs_init(periph_spiffs_cfg_t *spiffs_config)¶ esp_peripheralsのspiffsペリフェラルハンドルを作成します。
Create the spiffs peripheral handle for esp_peripherals.
- Note
- この関数によって作成されたハンドルは、
esp_periph_destroyが呼び出されたときに自動的に破棄されますThe handle created by this function will be automatically destroyed when
esp_periph_destroyis called - Return
- espペリフェラルハンドル
The esp peripheral handle
- Parameters
spiffs_config: spiffs構成spiffs_config: The spiffs configuration
-
bool
periph_spiffs_is_mounted(esp_periph_handle_t periph)¶ SPIFFSがマウントされているかどうかを確認します。
Check if the SPIFFS is mounted or not.
- Return
- SPIFFSマウント状態
SPIFFS mounted state
- Parameters
periph: ペリフperiph: The periph
構造体¶
Structures
-
struct
periph_spiffs_cfg_t¶ SPIFFSペリフェラル構成。
The SPIFFS Peripheral configuration.
Public Members
-
const char *
root¶ vfsのベースパス
Base path for vfs
-
const char *
partition_label¶ オプションで、使用するSPIFFSパーティションのラベル。 NULLに設定すると、subtype = spiffsの最初のパーティションが使用されます。
Optional, label of SPIFFS partition to use. If set to NULL, first partition with subtype=spiffs will be used.
-
size_t
max_files¶ p>同時に開くことができるファイルの最大数。
Maximum number of files that could be open at the same time.
-
bool
format_if_mount_failed¶ trueの場合、マウントに失敗するとファイルシステムがフォーマットされます。
If true, it will format the file system if it fails to mount.
-
const char *
列挙¶
Enumerations
-
enum
periph_spiffs_event_id_t¶ ペリフェラルスピフイベントID。
Peripheral spiffs event id.
Values:
-
SPIFFS_STATUS_UNKNOWN¶ イベントなし
No event
-
SPIFFS_STATUS_MOUNTED¶ SPIFFSが正常にマウントされました
SPIFFS mounted successfully
-
SPIFFS_STATUS_UNMOUNTED¶ SPIFFSが正常にアンマウントされました
SPIFFS unmounted successfully
-
SPIFFS_STATUS_MOUNT_ERROR¶ SPIFFSマウントエラー
SPIFFS mount error
-
SPIFFS_STATUS_UNMOUNT_ERROR¶ SPIFFSアンマウントエラー
SPIFFS unmount error
-