Add versioned NVS-backed configuration, buffered UART1 I/O, modem monitoring, counters, and serial console controls. Coordinate UART1 ownership with Phase 0 diagnostics and document loopback verification.
18 lines
513 B
C
18 lines
513 B
C
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
|
|
typedef enum {
|
|
RS232_PORT_OWNER_NONE,
|
|
RS232_PORT_OWNER_PHASE0,
|
|
RS232_PORT_OWNER_SERVICE,
|
|
RS232_PORT_OWNER_FAULT,
|
|
} rs232_port_owner_t;
|
|
|
|
esp_err_t rs232_port_owner_init(void);
|
|
esp_err_t rs232_port_claim(rs232_port_owner_t owner);
|
|
esp_err_t rs232_port_release(rs232_port_owner_t owner);
|
|
void rs232_port_mark_fault(rs232_port_owner_t previous_owner);
|
|
rs232_port_owner_t rs232_port_get_owner(void);
|
|
const char *rs232_port_owner_to_string(rs232_port_owner_t owner);
|