comparison network/network.h @ 107:56d09a0969b5 avr-http

Import uIP and the PPP implementation from https://code.google.com/p/avrusbmodem/
author Matt Johnston <matt@ucc.asn.au>
date Fri, 07 Sep 2012 23:53:53 +0800
parents
children
comparison
equal deleted inserted replaced
106:5c8404549cc0 107:56d09a0969b5
1 /*
2 * Simple common network interface that all network drivers should implement.
3 */
4
5 #ifndef __NETWORK_H__
6 #define __NETWORK_H__
7
8 #include <avr/io.h>
9 #include <util/delay.h>
10
11 #include <uIP-Contiki/uip.h>
12
13 #include "USBModem.h"
14 #include "Lib/RingBuff.h"
15
16 /* External Variables: */
17 extern RingBuff_t Modem_SendBuffer;
18 extern RingBuff_t Modem_ReceiveBuffer;
19 extern bool DebugModeEnabled;
20
21 /* Enums: */
22 enum Packet_States_t
23 {
24 PACKET_STATE_NULL = 0,
25 PACKET_STATE_INHEADER = 1,
26 PACKET_STATE_INBODY = 2,
27 };
28
29 /* Function Prototypes: */
30 void network_init(void);
31 uint16_t network_read(void);
32 void network_send(uint16_t protocol);
33
34 #if defined(INCLUDE_FROM_NETWORK_C)
35 static void DumpPacket(void);
36 #endif
37
38 /*Sets the MAC address of the device*/
39 //void network_set_MAC(uint8_t* mac);
40
41 /*Gets the MAC address of the device*/
42 //void network_get_MAC(uint8_t* mac);
43
44 #endif /* __NETWORK_H__ */