85#ifdef CONFIG_SLIPDEV_BUFSIZE_EXP
86#define CONFIG_SLIPDEV_BUFSIZE (1 << CONFIG_SLIPDEV_BUFSIZE_EXP)
89#ifndef CONFIG_SLIPDEV_BUFSIZE
90#define CONFIG_SLIPDEV_BUFSIZE (2048U)
163#if IS_USED(MODULE_SLIPDEV_NET)
174#if IS_USED(MODULE_SLIPDEV_CONFIG)
Circular integer buffer interface.
Definitions low-level network driver interface.
struct netdev netdev_t
Forward declaration for netdev struct.
uint_fast8_t uart_t
Define default UART type identifier.
#define CONFIG_SLIPDEV_BUFSIZE
UART buffer size used for TX and RX buffers.
void slipdev_coap_unset_event_queue(void)
Teardown the event queue.
int slipdev_coap_recv(uint8_t *buf, size_t buf_size, slipdev_t *dev)
Receive a CoAP packet into the given buffer.
void slipdev_coap_send(const iolist_t *iolist, const slipdev_t *dev)
Send a CoAP message as a configuration frame.
void slipdev_setup(slipdev_t *dev, const slipdev_params_t *params, uint8_t index)
Setup a slipdev device state.
void unicoap_slipdev_recv_handler(event_t *event)
Callback to inform unicoap that a new configuration frame is available.
slipdev_state_t
States for the slipdev and its parser.
void slipdev_coap_set_event_queue(event_queue_t *q)
Setup the event queue that will be notified when a config frame arrives.
@ SLIPDEV_STATE_SLEEP
Device is in sleep mode.
@ SLIPDEV_STATE_UNKNOWN
Device discards incoming data.
@ SLIPDEV_STATE_NONE
Device is in no mode (currently not receiving any frame), this is the idle state.
@ SLIPDEV_STATE_STDIN
Device writes received data to stdin.
@ SLIPDEV_STATE_NET
Device writes handles data as network device.
@ SLIPDEV_STATE_STANDBY
Device is in standby, will wake up when sending data.
@ SLIPDEV_STATE_CONFIG
Device writes received data as CoAP message.
@ SLIPDEV_STATE_NET_ESC
Device writes handles data as network device, next byte is escaped.
@ SLIPDEV_STATE_STDIN_ESC
Device writes received data to stdin, next byte is escaped.
@ SLIPDEV_STATE_CONFIG_ESC
Device writes received data as CoAP message, next byte is escaped.
struct PTRTAG event_queue_t
event queue structure
struct event event_t
event structure forward declaration
struct iolist iolist_t
iolist forward declaration
iolist structure definition
Structure to hold driver state.
Configuration parameters for a slipdev.
uint32_t baudrate
baudrate to use with slipdev_params_t::uart
uart_t uart
UART interface the device is connected to.
Device descriptor for slipdev.
slipdev_params_t config
configuration parameters
slipdev_state_t state
Device state.
Low-level UART peripheral driver interface definition.