Skip to content

Instantly share code, notes, and snippets.

@dagon666
Last active December 25, 2015 08:59
Show Gist options
  • Save dagon666/6951288 to your computer and use it in GitHub Desktop.
Save dagon666/6951288 to your computer and use it in GitHub Desktop.
libpca slip.h excerpt
/**
* @brief if there are no SEND/RECV routine definitions already existing
* use the default definitions provided bellow
*/
#if !defined(SLIP_CHAR_SEND) || !defined(SLIP_CHAR_RECV)
#include "config.h"
#include "serial.h"
/// redefine it, in your code to use different implementation of SEND routine
#define SLIP_CHAR_SEND(__x) serial_poll_sendc(__x)
/// redefine it, in your code to use different implementation of RECV routine
#define SLIP_CHAR_RECV(__x) serial_getc(__x)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment