cleanup plattform defines, disable energest, radiostatistics
This commit is contained in:
parent
34d64b4eb0
commit
837f70770a
|
@ -48,7 +48,7 @@
|
||||||
#define REST_RES_DS1820 0
|
#define REST_RES_DS1820 0
|
||||||
#define REST_RES_HELLO 0
|
#define REST_RES_HELLO 0
|
||||||
#define REST_RES_MIRROR 0 /* causes largest code size */
|
#define REST_RES_MIRROR 0 /* causes largest code size */
|
||||||
#define REST_RES_CHUNKS 0
|
#define REST_RES_CHUNKS 1
|
||||||
#define REST_RES_SEPARATE 0
|
#define REST_RES_SEPARATE 0
|
||||||
#define REST_RES_PUSHING 0
|
#define REST_RES_PUSHING 0
|
||||||
#define REST_RES_EVENT 1
|
#define REST_RES_EVENT 1
|
||||||
|
|
|
@ -101,10 +101,10 @@ typedef unsigned long off_t;
|
||||||
|
|
||||||
/* RADIOSTATS is used in rf230bb, clock.c and the webserver cgi to report radio usage */
|
/* RADIOSTATS is used in rf230bb, clock.c and the webserver cgi to report radio usage */
|
||||||
/* It has less overhead than ENERGEST */
|
/* It has less overhead than ENERGEST */
|
||||||
#define RADIOSTATS 1
|
//#define RADIOSTATS 1
|
||||||
|
|
||||||
/* More extensive stats, via main loop printfs or webserver status pages */
|
/* More extensive stats, via main loop printfs or webserver status pages */
|
||||||
#define ENERGEST_CONF_ON 1
|
//#define ENERGEST_CONF_ON 1
|
||||||
|
|
||||||
/* Packet statistics */
|
/* Packet statistics */
|
||||||
typedef unsigned short uip_stats_t;
|
typedef unsigned short uip_stats_t;
|
||||||
|
@ -190,7 +190,6 @@ typedef unsigned short uip_stats_t;
|
||||||
#define NETSTACK_CONF_RDC sicslowmac_driver
|
#define NETSTACK_CONF_RDC sicslowmac_driver
|
||||||
#define NETSTACK_CONF_FRAMER framer_802154
|
#define NETSTACK_CONF_FRAMER framer_802154
|
||||||
#define NETSTACK_CONF_RADIO rf230_driver
|
#define NETSTACK_CONF_RADIO rf230_driver
|
||||||
#define CHANNEL_802_15_4 26
|
|
||||||
/* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */
|
/* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */
|
||||||
#define RF230_CONF_AUTOACK 1
|
#define RF230_CONF_AUTOACK 1
|
||||||
/* Request 802.15.4 ACK on all packets sent (else autoretry). This is primarily for testing. */
|
/* Request 802.15.4 ACK on all packets sent (else autoretry). This is primarily for testing. */
|
||||||
|
@ -249,7 +248,6 @@ typedef unsigned short uip_stats_t;
|
||||||
#define RIMESTATS_CONF_ENABLED 1
|
#define RIMESTATS_CONF_ENABLED 1
|
||||||
#define NETSTACK_CONF_FRAMER framer_802154
|
#define NETSTACK_CONF_FRAMER framer_802154
|
||||||
#define NETSTACK_CONF_RADIO rf230_driver
|
#define NETSTACK_CONF_RADIO rf230_driver
|
||||||
#define CHANNEL_802_15_4 26
|
|
||||||
/* The radio needs to interrupt during an rtimer interrupt */
|
/* The radio needs to interrupt during an rtimer interrupt */
|
||||||
#define RTIMER_CONF_NESTED_INTERRUPTS 1
|
#define RTIMER_CONF_NESTED_INTERRUPTS 1
|
||||||
#define RF230_CONF_AUTOACK 1
|
#define RF230_CONF_AUTOACK 1
|
||||||
|
@ -290,7 +288,6 @@ typedef unsigned short uip_stats_t;
|
||||||
#define NETSTACK_CONF_RDC cxmac_driver
|
#define NETSTACK_CONF_RDC cxmac_driver
|
||||||
#define NETSTACK_CONF_FRAMER framer_802154
|
#define NETSTACK_CONF_FRAMER framer_802154
|
||||||
#define NETSTACK_CONF_RADIO rf230_driver
|
#define NETSTACK_CONF_RADIO rf230_driver
|
||||||
#define CHANNEL_802_15_4 26
|
|
||||||
#define RF230_CONF_AUTOACK 1
|
#define RF230_CONF_AUTOACK 1
|
||||||
#define SICSLOWPAN_CONF_FRAG 1
|
#define SICSLOWPAN_CONF_FRAG 1
|
||||||
#define SICSLOWPAN_CONF_MAXAGE 3
|
#define SICSLOWPAN_CONF_MAXAGE 3
|
||||||
|
|
|
@ -557,7 +557,6 @@ extern uip_ds6_netif_t uip_ds6_if;
|
||||||
PRINTF("\nRoutes [%u max]\n",UIP_DS6_ROUTE_NB);
|
PRINTF("\nRoutes [%u max]\n",UIP_DS6_ROUTE_NB);
|
||||||
{
|
{
|
||||||
uip_ds6_route_t *r;
|
uip_ds6_route_t *r;
|
||||||
PRINTF("\nRoutes [%u max]\n",UIP_DS6_ROUTE_NB);
|
|
||||||
j = 1;
|
j = 1;
|
||||||
for(r = uip_ds6_route_list_head();
|
for(r = uip_ds6_route_list_head();
|
||||||
r != NULL;
|
r != NULL;
|
||||||
|
|
|
@ -119,8 +119,8 @@ uint8_t eemem_domain_name[] EEMEM = PARAMS_DOMAINNAME;
|
||||||
#endif /*AVR_WEBSERVER */
|
#endif /*AVR_WEBSERVER */
|
||||||
|
|
||||||
uint16_t eemem_nodeid EEMEM = PARAMS_NODEID;
|
uint16_t eemem_nodeid EEMEM = PARAMS_NODEID;
|
||||||
uint8_t eemem_channel[2] EEMEM = {PARAMS_CHANNEL, ~PARAMS_CHANNEL};
|
uint8_t eemem_channel[2] EEMEM = {CHANNEL_802_15_4, ~CHANNEL_802_15_4};
|
||||||
uint16_t eemem_panid EEMEM = PARAMS_PANID;
|
uint16_t eemem_panid EEMEM = IEEE802154_PANID;
|
||||||
uint16_t eemem_panaddr EEMEM = PARAMS_PANADDR;
|
uint16_t eemem_panaddr EEMEM = PARAMS_PANADDR;
|
||||||
uint8_t eemem_txpower EEMEM = PARAMS_TXPOWER;
|
uint8_t eemem_txpower EEMEM = PARAMS_TXPOWER;
|
||||||
|
|
||||||
|
@ -153,11 +153,11 @@ params_get_channel(void) {
|
||||||
eeprom_write_block(&buffer, &eemem_server_name, sizeof(eemem_server_name));
|
eeprom_write_block(&buffer, &eemem_server_name, sizeof(eemem_server_name));
|
||||||
for (i=0;i<sizeof(default_domain_name);i++) buffer[i] = pgm_read_byte_near(default_domain_name+i);
|
for (i=0;i<sizeof(default_domain_name);i++) buffer[i] = pgm_read_byte_near(default_domain_name+i);
|
||||||
eeprom_write_block(&buffer, &eemem_domain_name, sizeof(eemem_domain_name));
|
eeprom_write_block(&buffer, &eemem_domain_name, sizeof(eemem_domain_name));
|
||||||
eeprom_write_word(&eemem_panid , PARAMS_PANID);
|
eeprom_write_word(&eemem_panid , IEEE802154_PANID);
|
||||||
eeprom_write_word(&eemem_panaddr, PARAMS_PANADDR);
|
eeprom_write_word(&eemem_panaddr, PARAMS_PANADDR);
|
||||||
eeprom_write_byte(&eemem_txpower, PARAMS_TXPOWER);
|
eeprom_write_byte(&eemem_txpower, PARAMS_TXPOWER);
|
||||||
eeprom_write_word(&eemem_nodeid, PARAMS_NODEID);
|
eeprom_write_word(&eemem_nodeid, PARAMS_NODEID);
|
||||||
x[0] = PARAMS_CHANNEL;
|
x[0] = CHANNEL_802_15_4;
|
||||||
x[1]= ~x[0];
|
x[1]= ~x[0];
|
||||||
eeprom_write_word((uint16_t *)&eemem_channel, *(uint16_t *)x);
|
eeprom_write_word((uint16_t *)&eemem_channel, *(uint16_t *)x);
|
||||||
sei();
|
sei();
|
||||||
|
@ -199,7 +199,7 @@ params_get_channel() {
|
||||||
if (settings_get(SETTINGS_KEY_CHANNEL, 0,(unsigned char*)&x, &size) == SETTINGS_STATUS_OK) {
|
if (settings_get(SETTINGS_KEY_CHANNEL, 0,(unsigned char*)&x, &size) == SETTINGS_STATUS_OK) {
|
||||||
PRINTD("<-Get RF channel %u\n",x);
|
PRINTD("<-Get RF channel %u\n",x);
|
||||||
} else {
|
} else {
|
||||||
x = PARAMS_CHANNEL;
|
x = CHANNEL_802_15_4;
|
||||||
if (settings_add_uint8(SETTINGS_KEY_CHANNEL,x ) == SETTINGS_STATUS_OK) {
|
if (settings_add_uint8(SETTINGS_KEY_CHANNEL,x ) == SETTINGS_STATUS_OK) {
|
||||||
PRINTD("->Set EEPROM RF channel to %d\n",x);
|
PRINTD("->Set EEPROM RF channel to %d\n",x);
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ params_get_panid(void) {
|
||||||
if (settings_get(SETTINGS_KEY_PAN_ID, 0,(unsigned char*)&x, &size) == SETTINGS_STATUS_OK) {
|
if (settings_get(SETTINGS_KEY_PAN_ID, 0,(unsigned char*)&x, &size) == SETTINGS_STATUS_OK) {
|
||||||
PRINTD("<-Get PAN ID of %04x\n",x);
|
PRINTD("<-Get PAN ID of %04x\n",x);
|
||||||
} else {
|
} else {
|
||||||
x=PARAMS_PANID;
|
x=IEEE802154_PANID;
|
||||||
if (settings_add_uint16(SETTINGS_KEY_PAN_ID,x)==SETTINGS_STATUS_OK) {
|
if (settings_add_uint16(SETTINGS_KEY_PAN_ID,x)==SETTINGS_STATUS_OK) {
|
||||||
PRINTD("->Set EEPROM PAN ID to %04x\n",x);
|
PRINTD("->Set EEPROM PAN ID to %04x\n",x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
*
|
*
|
||||||
* Note the parameters in this file can be changed without forcing a complete rebuild.
|
* Note the parameters in this file can be changed without forcing a complete rebuild.
|
||||||
*/
|
*/
|
||||||
|
// default settings
|
||||||
|
#define CHANNEL_802_15_4 26 // default frequency (11-26)
|
||||||
|
#define IEEE802154_PANID 0xABCD // default panid
|
||||||
|
// end default settings
|
||||||
|
|
||||||
#define CONTIKI_CONF_RANDOM_MAC 0 //adds 78 bytes
|
#define CONTIKI_CONF_RANDOM_MAC 0 //adds 78 bytes
|
||||||
#define CONTIKI_CONF_SETTINGS_MANAGER 0 //adds 1696 bytes
|
#define CONTIKI_CONF_SETTINGS_MANAGER 0 //adds 1696 bytes
|
||||||
#define BOOTLOADER_GET_MAC 1 // get mac form boolaoder, need bootlaoder bonsai, PARAMETER_STORAGE 0
|
#define BOOTLOADER_GET_MAC 1 // get mac form boolaoder, need bootlaoder bonsai, PARAMETER_STORAGE 0
|
||||||
|
@ -38,7 +43,6 @@ extern uint8_t eemem_mac_address[8];
|
||||||
extern uint8_t eemem_server_name[16];
|
extern uint8_t eemem_server_name[16];
|
||||||
extern uint8_t eemem_domain_name[30];
|
extern uint8_t eemem_domain_name[30];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SERVER_NAME
|
#ifdef SERVER_NAME
|
||||||
#define PARAMS_SERVERNAME SERVER_NAME
|
#define PARAMS_SERVERNAME SERVER_NAME
|
||||||
#else
|
#else
|
||||||
|
@ -54,16 +58,6 @@ extern uint8_t eemem_domain_name[30];
|
||||||
#else
|
#else
|
||||||
#define PARAMS_NODEID 0
|
#define PARAMS_NODEID 0
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHANNEL_802_15_4
|
|
||||||
#define PARAMS_CHANNEL CHANNEL_802_15_4
|
|
||||||
#else
|
|
||||||
#define PARAMS_CHANNEL 26
|
|
||||||
#endif
|
|
||||||
#ifdef IEEE802154_PANID
|
|
||||||
#define PARAMS_PANID IEEE802154_PANID
|
|
||||||
#else
|
|
||||||
#define PARAMS_PANID 0xABCD
|
|
||||||
#endif
|
|
||||||
#ifdef IEEE802154_PANADDR
|
#ifdef IEEE802154_PANADDR
|
||||||
#define PARAMS_PANADDR IEEE802154_PANADDR
|
#define PARAMS_PANADDR IEEE802154_PANADDR
|
||||||
#else
|
#else
|
||||||
|
@ -95,9 +89,9 @@ uint8_t params_get_eui64(uint8_t *eui64);
|
||||||
#if PARAMETER_STORAGE==0
|
#if PARAMETER_STORAGE==0
|
||||||
/* Hard coded program flash parameters */
|
/* Hard coded program flash parameters */
|
||||||
#define params_get_servername(...)
|
#define params_get_servername(...)
|
||||||
#define params_get_nodeid(...) PARAMS_NODEID
|
#define params_get_nodeid(...) PARAMS_NODEID
|
||||||
#define params_get_channel(...) PARAMS_CHANNEL
|
#define params_get_channel(...) CHANNEL_802_15_4
|
||||||
#define params_get_panid(...) PARAMS_PANID
|
#define params_get_panid(...) IEEE802154_PANID
|
||||||
#define params_get_panaddr(...) PARAMS_PANADDR
|
#define params_get_panaddr(...) PARAMS_PANADDR
|
||||||
#define params_get_txpower(...) PARAMS_TXPOWER
|
#define params_get_txpower(...) PARAMS_TXPOWER
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue