Loading...
Searching...
No Matches
slipdev_internal.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "isrpipe.h"
#include "periph/uart.h"
#include "mutex.h"
+ Include dependency graph for slipdev_internal.h:

Go to the source code of this file.

Functions

static void slipdev_write_byte (uart_t uart, uint8_t byte)
 Writes one byte to UART.
 
void slipdev_write_bytes (uart_t uart, const uint8_t *data, size_t len)
 Write multiple bytes SLIP-escaped to UART.
 

Variables

isrpipe_t slipdev_stdio_isrpipe
 ISR pipe to hand read bytes to stdin.
 
mutex_t slipdev_mutex
 Mutex to synchronize write operations to the UART between stdio sub-module and normal SLIP.
 

SLIP marker bytes

See also
RFC 1055
#define SLIPDEV_END   (0xc0U)
 
#define SLIPDEV_ESC   (0xdbU)
 
#define SLIPDEV_END_ESC   (0xdcU)
 
#define SLIPDEV_ESC_ESC   (0xddU)
 
#define SLIPDEV_STDIO_START   (0x0aU)
 Marker byte for beginning of stdio.
 

Macro Definition Documentation

◆ SLIPDEV_END

#define SLIPDEV_END   (0xc0U)

Definition at line 38 of file slipdev_internal.h.

◆ SLIPDEV_END_ESC

#define SLIPDEV_END_ESC   (0xdcU)

Definition at line 40 of file slipdev_internal.h.

◆ SLIPDEV_ESC

#define SLIPDEV_ESC   (0xdbU)

Definition at line 39 of file slipdev_internal.h.

◆ SLIPDEV_ESC_ESC

#define SLIPDEV_ESC_ESC   (0xddU)

Definition at line 41 of file slipdev_internal.h.

◆ SLIPDEV_STDIO_START

#define SLIPDEV_STDIO_START   (0x0aU)

Marker byte for beginning of stdio.

See also
taken from diagnostic transfer from SLIPMUX

Definition at line 48 of file slipdev_internal.h.

Function Documentation

◆ slipdev_write_byte()

static void slipdev_write_byte ( uart_t  uart,
uint8_t  byte 
)
inlinestatic

Writes one byte to UART.

Parameters
[in]uartThe UART device to write to.
[in]byteThe byte to write to uart.

Definition at line 68 of file slipdev_internal.h.

◆ slipdev_write_bytes()

void slipdev_write_bytes ( uart_t  uart,
const uint8_t *  data,
size_t  len 
)

Write multiple bytes SLIP-escaped to UART.

Parameters
[in]uartThe UART device to write to.
[in]dataThe bytes to write SLIP-escaped to uart.
[in]lenNumber of bytes in data.