34 #include "enc28j60-ip64-driver.h" 37 #include "ip64/ip64.h" 38 #include "ip64/ip64-eth.h" 43 PROCESS(enc28j60_ip64_driver_process,
"ENC28J60 IP64 driver");
56 memcpy(&macaddr[0], &eui64[0], 3);
57 memcpy(&macaddr[3], &eui64[5], 3);
61 macaddr[0] = (macaddr[0] & 0xfe);
64 macaddr[0] = (macaddr[0] | 0x02);
68 printf(
"MAC addr %02x:%02x:%02x:%02x:%02x:%02x\n",
69 macaddr[0], macaddr[1], macaddr[2],
70 macaddr[3], macaddr[4], macaddr[5]);
71 enc28j60_init(macaddr);
76 output(uint8_t *packet, uint16_t len)
78 enc28j60_send(packet, len);
91 len = enc28j60_read(ip64_packet_buffer, ip64_packet_buffer_maxlen);
93 IP64_INPUT(ip64_packet_buffer, len);
100 const struct ip64_driver enc28j60_ip64_driver = {
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_WAIT_EVENT()
Wait for an event to be posted to the process.
#define PROCESS_BEGIN()
Define the beginning of a process.
Header file for the link-layer address representation
#define PROCESS_END()
Define the end of a process.
static uint8_t output(const linkaddr_t *localdest)
Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan.
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
PROCESS_THREAD(cc2538_rf_process, ev, data)
Implementation of the cc2538 RF driver process.
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.
void process_start(struct process *p, process_data_t data)
Start a process.