add experimental code netstack
This commit is contained in:
parent
0c3eeed1bf
commit
c381f81f57
2 changed files with 12 additions and 20 deletions
|
@ -36,15 +36,13 @@
|
|||
//#define PLATFORM_HAS_BUTTON 1
|
||||
#define PLATFORM_HAS_BATTERY 1
|
||||
|
||||
#define SICSLOWPAN_CONF_FRAG 1
|
||||
|
||||
/* For Debug: Dont allow MCU sleeping between channel checks */
|
||||
//#undef RDC_CONF_MCU_SLEEP
|
||||
//#define RDC_CONF_MCU_SLEEP 0
|
||||
|
||||
/* Disabling RDC for demo purposes. Core updates often require more memory. */
|
||||
/* For projects, optimize memory and enable RDC again. */
|
||||
// #undef NETSTACK_CONF_RDC
|
||||
//#undef NETSTACK_CONF_RDC
|
||||
//#define NETSTACK_CONF_RDC nullrdc_driver
|
||||
|
||||
/* Increase rpl-border-router IP-buffer when using more than 64. */
|
||||
|
@ -79,23 +77,10 @@
|
|||
#define COAP_LINK_FORMAT_FILTERING 0
|
||||
*/
|
||||
|
||||
/* Save some memory for the sky platform. */
|
||||
/*
|
||||
#undef NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
||||
#undef UIP_CONF_MAX_ROUTES
|
||||
#define UIP_CONF_MAX_ROUTES 10
|
||||
*/
|
||||
|
||||
/* Reduce 802.15.4 frame queue to save RAM. */
|
||||
/*
|
||||
#undef QUEUEBUF_CONF_NUM
|
||||
#define QUEUEBUF_CONF_NUM 4
|
||||
*/
|
||||
|
||||
/*
|
||||
#undef SICSLOWPAN_CONF_FRAG
|
||||
#define SICSLOWPAN_CONF_FRAG 1
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* PROJECT_RPL_WEB_CONF_H_ */
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
|
||||
extern "C" {
|
||||
#include "rest-engine.h"
|
||||
#include "net/netstack.h"
|
||||
|
||||
extern volatile uint8_t mcusleepcycle; // default 16
|
||||
|
||||
extern resource_t res_leds, res_battery;
|
||||
uint8_t door_pin = 3;
|
||||
|
@ -29,9 +32,13 @@ void setup (void)
|
|||
rest_init_engine ();
|
||||
rest_activate_resource (&res_leds, "s/leds");
|
||||
rest_activate_resource (&res_battery, "s/battery");
|
||||
|
||||
// NETSTACK_MAC.off(1);
|
||||
}
|
||||
|
||||
void loop (void)
|
||||
{
|
||||
|
||||
mcusleepcycle=0;
|
||||
|
||||
mcusleepcycle=16;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue