adapt new names and api

This commit is contained in:
Harald Pichler 2014-04-14 13:27:01 +02:00
parent 1ca7b52217
commit a16849120f
4 changed files with 17 additions and 16 deletions

View file

@ -55,3 +55,5 @@ LDFLAGS += -Wl,--defsym,bootloader_get_mac=0x0001f3a0
include $(CONTIKIAVR)/Makefile.avr
include $(CONTIKIAVR)/radio/Makefile.radio
MODULES += core/net/ipv6 core/net/ipv4 core/net/ip core/net/mac core/net core/net/rime core/net/rpl core/net/mac/sicslowmac core/net/mac/contikimac

View file

@ -38,8 +38,8 @@
* David Kopf <dak664@embarqmail.com>
*/
#ifndef __CONTIKI_CONF_H__
#define __CONTIKI_CONF_H__
#ifndef CONTIKI_CONF_H_
#define CONTIKI_CONF_H_
/* Platform name, type, and MCU clock rate */
#define PLATFORM_NAME "RFA1"
@ -143,7 +143,7 @@ typedef unsigned short uip_stats_t;
#define RDC_CONF_MCU_SLEEP 1
#if UIP_CONF_IPV6
#define RIMEADDR_CONF_SIZE 8
#define LINKADDR_CONF_SIZE 8
#define UIP_CONF_ICMP6 1
#define UIP_CONF_UDP 1
//#define UIP_CONF_TCP 1
@ -151,13 +151,12 @@ typedef unsigned short uip_stats_t;
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
#else
/* ip4 should build but is largely untested */
#define RIMEADDR_CONF_SIZE 2
#define LINKADDR_CONF_SIZE 2
#define NETSTACK_CONF_NETWORK rime_driver
#endif
#define UIP_CONF_LL_802154 1
#define UIP_CONF_LLH_LEN 0
//#define UIP_CONF_BUFFER_SIZE 1280 // old 240
/* 10 bytes per stateful address context - see sicslowpan.c */
/* Default is 1 context with prefix aaaa::/64 */
@ -311,4 +310,4 @@ typedef unsigned short uip_stats_t;
#include PROJECT_CONF_H
#endif
#endif /* __CONTIKI_CONF_H__ */
#endif /* CONTIKI_CONF_H_ */

View file

@ -59,7 +59,7 @@
#include "radio/rf230bb/rf230bb.h"
#include "net/mac/frame802154.h"
#include "net/mac/framer-802154.h"
#include "net/sicslowpan.h"
#include "net/ipv6/sicslowpan.h"
#include "contiki.h"
#include "contiki-net.h"
@ -88,7 +88,7 @@
#include "net/rime/rime-udp.h"
#endif
#include "net/rime.h"
#include "net/rime/rime.h"
/* Track interrupt flow through mac, rdc and radio driver */
//#define DEBUGFLOWSIZE 32
@ -271,24 +271,24 @@ uint8_t i;
/* Set addresses BEFORE starting tcpip process */
rimeaddr_t addr;
linkaddr_t addr;
if (params_get_eui64(addr.u8)) {
PRINTA("Random EUI64 address generated\n");
}
#if UIP_CONF_IPV6
memcpy(&uip_lladdr.addr, &addr.u8, sizeof(rimeaddr_t));
memcpy(&uip_lladdr.addr, &addr.u8, sizeof(linkaddr_t));
#elif WITH_NODE_ID
node_id=get_panaddr_from_eeprom();
addr.u8[1]=node_id&0xff;
addr.u8[0]=(node_id&0xff00)>>8;
PRINTA("Node ID from eeprom: %X\n",node_id);
#endif
rimeaddr_set_node_addr(&addr);
linkaddr_set_node_addr(&addr);
PRINTA("Panid:%x\n", params_get_panid());
framer_802154_set_panid(params_get_panid());
// framer_802154_set_panid(params_get_panid());
rf230_set_pan_addr(params_get_panid(),params_get_panaddr(),(uint8_t *)&addr.u8);
rf230_set_channel(params_get_channel());
rf230_set_txpower(params_get_txpower());
@ -298,7 +298,7 @@ uint8_t i;
#else
PRINTA("MAC address ");
uint8_t i;
for (i=sizeof(rimeaddr_t); i>0; i--){
for (i=sizeof(linkaddr_t); i>0; i--){
PRINTA("%x:",addr.u8[i-1]);
}
PRINTA("\n");

View file

@ -1,5 +1,5 @@
#ifndef __PARAMS_H__
#define __PARAMS_H__
#ifndef PARAMS_H_
#define PARAMS_H_
/* PARAMETER_STORAGE =
* 0 Hard coded, minmal program and eeprom usage.
* 1 Stored in fixed eeprom locations, rewritten from flash if corrupt.
@ -103,4 +103,4 @@ uint16_t params_get_panaddr(void);
uint8_t params_get_txpower(void);
#endif
#endif /* __PARAMS_H__ */
#endif /* PARAMS_H_ */