storage 模块
class sdmmc_host
static init_slot(slot: int, slot_config: instance) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
slot_config | instance |
- 返回:
int
sdmmc_host_init_slotstatic set_bus_width(slot: int, width: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
width | int |
- 返回:
int
sdmmc_host_set_bus_widthstatic set_card_clk(slot: int, freq_khz: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
freq_khz | int |
- 返回:
int
sdmmc_host_set_card_clkstatic set_bus_ddr_mode(slot: int, ddr_enabled: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
ddr_enabled | int |
- 返回:
int
sdmmc_host_set_bus_ddr_modestatic set_cclk_always_on(slot: int, cclk_always_on: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
cclk_always_on | int |
- 返回:
int
sdmmc_host_set_cclk_always_onstatic do_transaction(slot: int, cmdinfo: pointer) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
cmdinfo | pointer |
- 返回:
int
sdmmc_host_do_transactionstatic io_int_wait(slot: int, timeout_ticks: pointer) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
timeout_ticks | pointer |
- 返回:
int
sdmmc_host_io_int_waitstatic get_real_freq(slot: int, real_freq_khz: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
real_freq_khz | int |
- 返回:
int
sdmmc_host_get_real_freqstatic set_input_delay(slot: int, delay_phase: pointer) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
delay_phase | pointer |
- 返回:
int
sdmmc_host_set_input_delaystatic is_slot_set_to_uhs1(slot: int, is_uhs1: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
slot | int | |
is_uhs1 | int |
- 返回:
int
sdmmc_host_is_slot_set_to_uhs1class spffs
static register(conf: pointer) -> int
typedef struct { const char* base_path; /!< File path prefix associated with the filesystem. / const char partition_label; /!< Optional, label of SPIFFS partition to use. If set to NULL, first partition with subtype=spiffs will be used. / size_t max_files; /!< Maximum files that could be open at the same time. / bool format_if_mount_failed; /!< If true, it will format the file system if it fails to mount. */ } esp_vfs_spiffs_conf_t;
| 参数 | 类型 | 说明 |
|---|---|---|
conf | pointer |
- 返回:
int
esp_vfs_spiffs_registerstatic unregister(partition_label: str) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
partition_label | str |
- 返回:
int
esp_vfs_spiffs_unregisterstatic mounted(partition_label: str) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
partition_label | str |
- 返回:
int
esp_spiffs_mountedstatic gc(partition_label: str, size_to_gc: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
partition_label | str | |
size_to_gc | int |
- 返回:
int
esp_spiffs_gcclass vfs_fat
static sdmmc_mount(path: str, connfig: pointer, mount_config: pointer) -> str
typedef struct { int clk; ///< GPIO number of CLK signal. int cmd; ///< GPIO number of CMD signal. int d0; ///< GPIO number of D0 signal. int d1; ///< GPIO number of D1 signal. int d2; ///< GPIO number of D2 signal. int d3: ///< GPIO number of D3 signal. int d4: ///< GPIO number of D4 signal. Ignored in 1- or 4- line mode. int d5: ///< GPIO number of D5 signal. Ignored in 1- or 4- line mode. int d6: ///< GPIO number of D6 signal. Ignored in 1- or 4- line mode. int d7: ///< GPIO number of D7 signal. Ignored in 1- or 4- line mode. int cd; ///< GPIO number of card detect signal; shorter name. int wp; ///< GPIO number of write protect signal; shorter name. uint8_t width; ///< Bus width used by the slot (might be less than the max width supported) uint32_t flags; ///< Features used by this slot } sdmmc_slot_config_t;
typedef struct { bool format_if_mount_failed; int max_files; size_t allocation_unit_size; bool disk_status_check_enable; bool use_one_fat; } esp_vfs_fat_mount_config_t;
| 参数 | 类型 | 说明 |
|---|---|---|
path | str | |
connfig | pointer | |
mount_config | pointer |
- 返回:
str
vfs_fat_sdmmc_mount #本函数包装的是esp_spiffs.h中的esp_vfs_fat_sdmmc_mount函数class nvs
class flash_write
static __init__(source_file: str, partition_name: str, check_md5: str, core_id: int) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
source_file | str | |
partition_name | str | |
check_md5 | str | |
core_id | int |
- 返回:
int
flash_write_startstatic set_boot_partition(partition_name: str) -> int
| 参数 | 类型 | 说明 |
|---|---|---|
partition_name | str |
- 返回:
int
flash_write_set_boot_partitionstatic nvs_open(namespace_name: str, write_mode: bool) -> str
打开一块flash中的nvs存储区域
namespace_name: 区域名称,这是一个自定义名称,打开的区域不存在就会自动创建 write_mode: 为True则表示可读写,False则表示只读模式 return: 返回为本module下的nvs类的实例
| 参数 | 类型 | 说明 |
|---|---|---|
namespace_name | str | |
write_mode | bool |
- 返回:
str
nvs_open_