Contiki-NG
|
Alternative implementation for SLIP:More...
#include "contiki.h"
#include <MicroInt.h>
#include "net/ipv6/uip.h"
#include "dev/slip.h"
#include "dev/uart0.h"
Go to the source code of this file.
Macros | |
#define | ATOMIC(blah) |
A block of code may be made atomic by wrapping it with this macro. More... | |
Functions | |
void | slip_set_input_callback (void(*c)(void)) |
Set a function to be called when there is activity on the SLIP interface; used for detecting if a node is a gateway node. | |
void | slip_write (const void *_ptr, int len) |
Send using SLIP len bytes starting from the location pointed to by ptr. | |
void | slip_send (void) |
Send an IP packet from the uIP buffer with SLIP. | |
int | slip_input_byte (unsigned char c) |
Input a SLIP byte. More... | |
Alternative implementation for SLIP:
Definition in file slip.c.
#define ATOMIC | ( | blah | ) |
A block of code may be made atomic by wrapping it with this macro.
Something which is atomic cannot be interrupted by interrupts.
Definition at line 89 of file slip.c.
Referenced by slip_send().
int slip_input_byte | ( | unsigned char | c | ) |
Input a SLIP byte.
This function is called by the RS232/SIO device driver to pass incoming bytes to the SLIP driver. The function can be called from an interrupt context.
For systems using low-power CPU modes, the return value of the function can be used to determine if the CPU should be woken up or not. If the function returns non-zero, the CPU should be powered up. If the function returns zero, the CPU can continue to be powered down.
c | The data that is to be passed to the SLIP driver |
Definition at line 353 of file slip.c.
References process_poll().