|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
Walking the card. See wa_walk.h. More...
Functions | |
| void | wa_walk_begin (wa_walk_t *w, const wa_fs_t *fs) |
A walk of fs from its root; nothing is opened yet. | |
| void | wa_walk_end (wa_walk_t *w) |
| Close every handle that is open; for a walk given up part way. | |
| static wa_walk_ev_t | finish (wa_walk_t *w, wa_walk_ev_t ev) |
End the walk with ev, every handle closed. | |
| static bool | name_ok (const char *s, size_t n) |
| Whether a name read from the card can be served by its path. | |
| static uint32_t | join (wa_walk_t *w, uint32_t base, const char *name, size_t n) |
The path of name in the folder whose path is base bytes, into w->path. | |
| wa_walk_ev_t | wa_walk_next (wa_walk_t *w) |
| The next event. | |
Walking the card. See wa_walk.h.
SPDX-License-Identifier: MIT
|
static |
End the walk with ev, every handle closed.
| w | the walk |
| ev | END, NO_CARD or ERROR |
ev
|
static |
The path of name in the folder whose path is base bytes, into w->path.
| w | the walk |
| base | bytes of the folder's path |
| name | the name |
| n | its bytes |
|
static |
Whether a name read from the card can be served by its path.
| s | the name |
| n | its bytes |
A walk of fs from its root; nothing is opened yet.
| w | the walk |
| fs | the card |
| void wa_walk_end | ( | wa_walk_t * | w | ) |
Close every handle that is open; for a walk given up part way.
| w | the walk |
| wa_walk_ev_t wa_walk_next | ( | wa_walk_t * | w | ) |
The next event.
WA_WALK_DIR and WA_WALK_FILE carry path, and a file ent.size and ent.mtime; the root's WA_WALK_DIR has the path "".
| w | the walk |