Go to the documentation of this file.
38 #if IS_USED(MODULE_STDIO_ETHOS) || defined(DOXYGEN)
49 #define ETHOS_UART STDIO_UART_DEV
55 #ifndef ETHOS_BAUDRATE
56 #define ETHOS_BAUDRATE STDIO_UART_BAUDRATE
65 #define ETHOS_FRAME_DELIMITER (0x7E)
66 #define ETHOS_ESC_CHAR (0x7D)
67 #define ETHOS_FRAME_TYPE_DATA (0x0)
68 #define ETHOS_FRAME_TYPE_TEXT (0x1)
69 #define ETHOS_FRAME_TYPE_HELLO (0x2)
70 #define ETHOS_FRAME_TYPE_HELLO_REPLY (0x3)
90 uint8_t remote_mac_addr[6];
uint8_t * buf
buffer for incoming packets
tsrb_t inbuf
ringbuffer for incoming data
Common macros and compiler attributes/pragmas configuration.
size_t last_framesize
size of last completed frame
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.
unsigned int uart_t
Define default UART type identifier.
unsigned frametype
type of currently incoming frame
Low-level UART peripheral driver interface definition.
uint32_t baudrate
baudrate to UART device
Definitions low-level network driver interface.
void ethos_setup(ethos_t *dev, const ethos_params_t *params)
Setup an ethos based device state.
uart_t uart
UART device to use.
uart_t uart
UART device the to use.
bool accept_new
incoming frame can be stored or not
Structure to hold driver state.
mutex_t out_mutex
mutex used for locking concurrent sends
Mutex for thread synchronization.
netdev_t netdev
extended netdev structure
size_t bufsize
size of ethos_params_t::buf
Struct containing the needed configuration.
thread-safe ringbuffer struct
line_state_t state
Line status variable.
Types used by the kernel.
Thread-safe ringbuffer interface definition.
size_t framesize
size of currently incoming frame
line_state_t
Enum describing line state.