Go to the documentation of this file.
75 #define DOSE_OCTET_END (0xFF)
76 #define DOSE_OCTET_ESC (0xFE)
114 #define DOSE_FLAG_RECV_BUF_DIRTY (BIT0)
115 #define DOSE_FLAG_END_RECEIVED (BIT1)
116 #define DOSE_FLAG_ESC_RECEIVED (BIT2)
124 #define DOSE_OPT_PROMISCUOUS (BIT0)
137 #ifndef CONFIG_DOSE_TIMEOUT_USEC
138 #define CONFIG_DOSE_TIMEOUT_USEC (5000)
142 #define DOSE_FRAME_CRC_LEN (2)
143 #define DOSE_FRAME_LEN (ETHERNET_FRAME_LEN + DOSE_FRAME_CRC_LEN)
@ DOSE_STATE_IDLE
Frames will be received or sent.
@ DOSE_STATE_INIT
Initial state that will never be reentered.
gpio_t sense_pin
GPIO to sense for start bits on the UART's rx line.
@ DOSE_SIGNAL_SEND
Enter send state.
Definitions for Ethernet.
@ DOSE_SIGNAL_GPIO
Sense GPIO detected a falling edge.
Data type to represent an EUI-48.
uint8_t opts
Driver options.
@ DOSE_STATE_SEND
Currently sending a frame.
unsigned int uart_t
Define default UART type identifier.
@ DOSE_SIGNAL_INIT
Init the state machine.
Low-level UART peripheral driver interface definition.
@ DOSE_STATE_ANY
Special state filter used internally to observe any state transition.
void dose_setup(dose_t *dev, const dose_params_t *params, uint8_t index)
Setup a DOSE based device state.
Definitions low-level network driver interface.
@ DOSE_SIGNAL_UART
Octet has been received.
uart_t uart
UART device to use.
netdev_t netdev
Extended netdev structure.
dose_state_t state
Current state of the driver's state machine.
Helper functions for bit arithmetic.
uint8_t uart_octet
Last received octet.
Structure to hold driver state.
uint32_t timeout_base
Base timeout in us.
xtimer_t timeout
Timeout timer ensuring always to get back to IDLE state.
Mutex for thread synchronization.
eui48_t mac_addr
This device's MAC address.
Low-level GPIO peripheral driver interface definitions.
uint32_t baudrate
Baudrate to UART device.
@ DOSE_SIGNAL_NONE
No signal ...
@ DOSE_STATE_RECV
Currently receiving a frame.
#define DOSE_FRAME_LEN
dose frame length
@ DOSE_STATE_BLOCKED
The driver just listens to incoming frames and blocks outgress frames.
@ DOSE_SIGNAL_XTIMER
Timer timed out.
@ DOSE_SIGNAL_END
Leave send state.
Struct containing the required configuration.
uint8_t flags
Several flags.
gpio_t sense_pin
GPIO to sense for start bits on the UART's rx line.
mutex_t state_mtx
Is unlocked every time a state is (re)entered.
xtimer interface definitions
size_t recv_buf_ptr
Index of the next empty octet of the recveive buffer.
uart_t uart
UART device to use.
Definition and IPv6 IID conversion for IEEE EUI-48 identifiers.