|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Bounded POSIX file ingestion for the Alphabet Soup host CLI. More...
#include <string.h>#include "alphabet_soup.h"#include "alphabet_soup_cli_internal.h"#include "fw_if_fs.h"#include "fw_if_fs_posix.h"Go to the source code of this file.
Enumerations | |
| enum | alphabet_soup_cli_limit_t : uint32_t { k_cli_file_work_capacity = 64U , k_cli_read_chunk_bytes = 1024U , k_cli_path_buffer_capacity = 512U } |
| Buffer sizes and limits for host CLI file ingestion. More... | |
Functions | |
| ra8_err_t | priv_alphabet_soup_split_path (const char *filepath, char *out_root, size_t root_cap, char *out_leaf, size_t leaf_cap) |
| ra8_err_t | priv_alphabet_soup_read_all (fw_fs_file_t *file, uint8_t *buffer, uint32_t capacity, uint32_t *out_size) |
| ra8_err_t | priv_alphabet_soup_load_file_contents (const char *filepath, uint8_t *out_buf, uint32_t buf_cap, uint32_t *out_len) |
Bounded POSIX file ingestion for the Alphabet Soup host CLI.
Splits host paths, opens them through the portable filesystem facade, and reads source bytes into caller-owned bounded buffers.
Definition in file alphabet_soup_cli.c.
| enum alphabet_soup_cli_limit_t : uint32_t |
Buffer sizes and limits for host CLI file ingestion.
| Enumerator | |
|---|---|
| k_cli_file_work_capacity | File handle workspace bytes. |
| k_cli_read_chunk_bytes | Bounded read chunk bytes. |
| k_cli_path_buffer_capacity | Host path buffer bytes. |
Definition at line 18 of file alphabet_soup_cli.c.
|
nodiscard |
Definition at line 92 of file alphabet_soup_cli.c.
References fw_fs_close(), fw_fs_open(), fw_fs_posix_deinit(), fw_fs_posix_init(), k_cli_file_work_capacity, k_cli_path_buffer_capacity, k_fw_fs_open_read, k_ra8_err_invalid_arg, k_ra8_err_not_found, k_ra8_fail, k_ra8_ok, priv_alphabet_soup_read_all(), priv_alphabet_soup_split_path(), RA8_PRIV, and fw_fs_t::streams.
Referenced by main().
|
nodiscard |
Definition at line 59 of file alphabet_soup_cli.c.
References fw_fs_read(), k_cli_read_chunk_bytes, k_ra8_err_invalid_size, k_ra8_err_null_ptr, k_ra8_ok, k_soup_max_file_capacity, and RA8_PRIV.
Referenced by priv_alphabet_soup_load_file_contents().
|
nodiscard |
Definition at line 24 of file alphabet_soup_cli.c.
References k_ra8_err_invalid_size, k_ra8_err_null_ptr, k_ra8_ok, memcpy(), RA8_PRIV, strlen(), and strrchr().
Referenced by priv_alphabet_soup_load_file_contents().