Commit Graph

6 Commits

Author SHA1 Message Date
Tomáš Rohlínek
42f3ed4d51 refactor(stdio): remove fd table, forward opens to primary backend
Remove the internal fd table (fd_entry_t, is_fd_valid, fd_allows_read/write,
ESP_STDIO_BASIC_MODE tracking) from the console VFS.

Instead, console_open forwards directly to the primary backend's open_p,
so each open("/dev/console") creates a real fd in the underlying driver.
Read/write/fstat/fcntl/fsync all operate on the per-open fd from the
primary, not a stored init-time fd.

Structure:
- s_primary: separate variable for the primary backend entry
- s_auxiliary[]: slot-based array for auxiliary sinks (NULL = free)
- Scans all slots (no count variable) with NULL guards
- Auxiliaries opened lazily on first console open
- Closed when last console fd is closed (refcounted via s_open_count)
- Write and fsync fan-out protected by s_lock
2026-06-02 10:37:16 +02:00
Tomáš Rohlínek
9bc2b3d7ee fix(esp_stdio): add fd-table locking, per-fd flag checks, and Kconfig cleanup 2026-05-27 11:37:56 +02:00
Tomáš Rohlínek
52004409ce fix(esp_stdio): remap console select fd bits to sink device
Map logical /dev/console fds to the primary sink fd for select.
This avoids probing UART1/UART2 for stdout/stderr and keeps UART select state consistent.
Add stdio regression checks for logical fd mapping and symmetric uart_end_select teardown.
2026-05-27 11:37:56 +02:00
Tomáš Rohlínek
8605931afc feat(system/esp_stdio): Add test coverage for esp_stdio refactor 2026-05-27 11:37:56 +02:00
morris
0469db2f83 refactor(rcc): unify the usage of clock control macros for peripherals
- Removed conditional definitions for various RCC_ATOMIC macros across
multiple files, replacing them with a unified PERIPH_RCC_ATOMIC() macro.
- Updated instances where specific RCC_ATOMIC macros were used to ensure
consistent usage of PERIPH_RCC_ATOMIC().
- Deleted unused uart_share_hw_ctrl.h file as its functionality is now
integrated into the new structure.
2026-01-23 18:28:13 +08:00
Marius Vikhammer
a257812e14 feat(stdio): added esp_stdio component
esp_stdio contains everything the old esp_vfs_console contained (the vfs stdio glue layer)
as well as other functionality related to stdio (previously referred to as console)
2025-10-16 10:01:59 +08:00