mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 03:30:01 +00:00
Improved samle code.
This commit is contained in:
parent
00b1e371cf
commit
a250698b71
@ -33,6 +33,11 @@ u8_t
|
||||
example_packet_driver_output(void)
|
||||
{
|
||||
let_the_hardware_send_the_packet(uip_buf, uip_len);
|
||||
|
||||
/*
|
||||
* An network device driver returns always zero.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*
|
||||
|
24
doc/example-packet-drv.h
Normal file
24
doc/example-packet-drv.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* This is an example of how to write a network device driver ("packet
|
||||
* driver") for Contiki.
|
||||
*/
|
||||
|
||||
#ifndef __EXAMPLE_PACKET_DRV_H__
|
||||
#define __EXAMPLE_PACKET_DRV_H__
|
||||
|
||||
/*
|
||||
* We include the "contiki.h" file to get the macro and typedef used below.
|
||||
*/
|
||||
#include "contiki.h"
|
||||
|
||||
/*
|
||||
* Here we declare the process name used to start it (typically from main()).
|
||||
*/
|
||||
PROCESS_NAME(example_packet_driver_process);
|
||||
|
||||
/*
|
||||
* Finally we declare the output function for use with uIP packet forwarding.
|
||||
*/
|
||||
u8_t example_packet_driver_output(void);
|
||||
|
||||
#endif /* __EXAMPLE_PACKET_DRV_H__ */
|
Loading…
Reference in New Issue
Block a user