2010-10-06 17:15:05 +02:00
|
|
|
/* 6LoWPAN MAC - layer 2 implementations */
|
|
|
|
|
|
|
|
#include "sixlowmac.h"
|
2010-10-17 16:04:54 +02:00
|
|
|
#include "sixlownd.h"
|
|
|
|
#include "radio/radio.h"
|
2010-11-30 10:21:29 +01:00
|
|
|
#include "drivers/cc110x/cc1100.h"
|
2010-10-17 16:04:54 +02:00
|
|
|
|
2010-11-22 12:52:56 +01:00
|
|
|
#define ipv6_buf ((struct ipv6_hdr_t*)&buffer[LL_HDR_LEN])
|
2010-10-17 16:04:54 +02:00
|
|
|
|
2010-10-19 23:07:22 +02:00
|
|
|
/* TODO: payload pointer, payload length */
|
|
|
|
void send(void){
|
2010-11-09 22:20:26 +01:00
|
|
|
RADIO.send(get_radio_address(get_eui(&ipv6_buf->destaddr)),NULL,NULL,NULL,NULL);
|
2010-10-06 17:15:05 +02:00
|
|
|
}
|
|
|
|
|
2010-11-22 12:52:56 +01:00
|
|
|
uint16_t get_radio_address(ieee_802154_long_t *lla){
|
2010-10-19 23:07:22 +02:00
|
|
|
return ((lla->uint8[6] << 8) + lla->uint8[7]);
|
2010-10-06 17:15:05 +02:00
|
|
|
}
|