52#if IS_USED(MODULE_ETHOS_STDIO) || defined(DOXYGEN)
63#define ETHOS_UART STDIO_UART_DEV
70#define ETHOS_BAUDRATE STDIO_UART_BAUDRATE
75#if IS_USED(MODULE_USBUS_CDC_ACM)
76#define ETHOS_UART UART_DEV(0)
78#define ETHOS_UART UART_DEV(1)
82#define ETHOS_BAUDRATE 115200
90#define ETHOS_FRAME_DELIMITER (0x7E)
91#define ETHOS_ESC_CHAR (0x7D)
92#define ETHOS_FRAME_TYPE_DATA (0x0)
93#define ETHOS_FRAME_TYPE_TEXT (0x1)
94#define ETHOS_FRAME_TYPE_HELLO (0x2)
95#define ETHOS_FRAME_TYPE_HELLO_REPLY (0x3)
115 uint8_t remote_mac_addr[6];
147 void *inbuf,
size_t inbuf_size);
Definitions low-level network driver interface.
Low-level UART peripheral driver interface definition.
line_state_t
Enum describing line state.
void ethos_send_frame(ethos_t *dev, const uint8_t *data, size_t len, unsigned frame_type)
Send frame over serial port using ethos' framing.
void ethos_setup(ethos_t *dev, const ethos_params_t *params, uint8_t index, void *inbuf, size_t inbuf_size)
Setup an ethos based device state.
uint_fast8_t uart_t
Define default UART type identifier.
Common macros and compiler attributes/pragmas configuration.
Mutex for thread synchronization.
Struct containing the needed configuration.
uint32_t baudrate
baudrate to UART device
uart_t uart
UART device to use.
tsrb_t inbuf
ringbuffer for incoming data
mutex_t out_mutex
mutex used for locking concurrent sends
unsigned frametype
type of currently incoming frame
netdev_t netdev
extended netdev structure
line_state_t state
Line status variable.
uart_t uart
UART device the to use.
Structure to hold driver state.
thread-safe ringbuffer struct
Thread-safe ringbuffer interface definition.