Interface definition for the ethernet-over-serial module. More...

Detailed Description

Interface definition for the ethernet-over-serial module.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file ethos.h.

#include <stdbool.h>
#include "kernel_types.h"
#include "periph/uart.h"
#include "net/netdev.h"
#include "tsrb.h"
#include "mutex.h"
#include "kernel_defines.h"
#include "stdio_uart.h"
+ Include dependency graph for ethos.h:

Go to the source code of this file.

Data Structures

struct  ethos_t
 ethos netdev device More...
 
struct  ethos_params_t
 Struct containing the needed configuration. More...
 

Macros

#define ETHOS_UART   STDIO_UART_DEV
 Set the default UART Interface.
 
#define ETHOS_BAUDRATE   STDIO_UART_BAUDRATE
 Set the default baudrate.
 

Enumerations

enum  line_state_t { WAIT_FRAMESTART, IN_FRAME, IN_ESCAPE }
 Enum describing line state.
 

Functions

void ethos_setup (ethos_t *dev, const ethos_params_t *params)
 Setup an ethos based device state. More...
 
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. More...
 

Escape char definitions

#define ETHOS_FRAME_DELIMITER   (0x7E)
 
#define ETHOS_ESC_CHAR   (0x7D)
 
#define ETHOS_FRAME_TYPE_DATA   (0x0)
 
#define ETHOS_FRAME_TYPE_TEXT   (0x1)
 
#define ETHOS_FRAME_TYPE_HELLO   (0x2)
 
#define ETHOS_FRAME_TYPE_HELLO_REPLY   (0x3)