[riot-commits] [RIOT-OS/RIOT] c61a34: slipdev: simplify and solidify byte-unstuffing

Koen Zandberg koen at bergzand.net
Tue Jan 9 10:53:57 CET 2018


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: c61a3431934a9fc3fafed11ba04d0f30c1ce6592
      https://github.com/RIOT-OS/RIOT/commit/c61a3431934a9fc3fafed11ba04d0f30c1ce6592
  Author: Martine Lenders <m.lenders at fu-berlin.de>
  Date:   2018-01-08 (Mon, 08 Jan 2018)

  Changed paths:
    M drivers/Makefile.dep
    M drivers/include/slipdev.h
    M drivers/slipdev/slipdev.c

  Log Message:
  -----------
  slipdev: simplify and solidify byte-unstuffing

This simplifies and solidifies the reversal of SLIP's byte-stuffing
(aka byte-unstuffing ;-)) by

1. Using `tsrb` instead of `ringbuffer`: there are two actors. The ISR
   and the device's event handler.
2. Moving the byte-unstuffing from the UART RX-handler (i.e. the ISR)
   to the device's receive function (potentially not the ISR)
3. Removing the `pktfifo` member. The current number of bytes in the
   ringbuffer is returned for `recv(data = NULL, len = 0)`. If that is
   more than the packet contains (due to the byte stuffing it most
   likely will be) the packet is reallocated in GNRC anyway.


  Commit: 2f4a7e28e9dfab1b9cc7aeb5caa03f68d9e9759a
      https://github.com/RIOT-OS/RIOT/commit/2f4a7e28e9dfab1b9cc7aeb5caa03f68d9e9759a
  Author: Koen Zandberg <koen at bergzand.net>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M drivers/Makefile.dep
    M drivers/include/slipdev.h
    M drivers/slipdev/slipdev.c

  Log Message:
  -----------
  Merge pull request #8268 from miri64/slipdev/enh/simplify-byte-unstuffing

slipdev: simplify and solidify byte-unstuffing


Compare: https://github.com/RIOT-OS/RIOT/compare/87e3f10e8bbd...2f4a7e28e9df


More information about the commits mailing list