//# 51 "/opt/tinyos-2.x-contrib/diku/mcs51/tos/chips/cc2430/McuSleepC.nc" static /*inline*/ void McuSleepC__McuSleep__sleep(void ) //#line 51 { __nesc_enable_interrupt(); SLEEP = (SLEEP & ~CC2430_SLEEP_MODE_MASK) | CC2430_SLEEP_POWERMODE_0; __nesc_disable_interrupt(); }
//#line 53 //# 52 "/opt/tinyos-2.x/tos/system/RealMainP.nc" int main(void ) //#line 52 { { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start(); { { } //#line 60 ; RealMainP__Scheduler__init(); RealMainP__PlatformInit__init(); while (RealMainP__Scheduler__runNextTask()) ; RealMainP__SoftwareInit__init(); while (RealMainP__Scheduler__runNextTask()) ; } //#line 77 __nesc_atomic_end(__nesc_atomic); } __nesc_enable_interrupt(); RealMainP__Boot__booted(); RealMainP__Scheduler__taskLoop(); return -1; }
int main(){ TOSH_SET_PIN_DIRECTIONS(); initScheduling(); thread_init(); currentuse = 0; printString("Start!\n"); sei(); mystrncpy(networkid, "sn03\0", 5); nodeid = 3; mystrncpy(filenameid, "nodeA\0", 6); TimerM_StdControl_init(); AMStandard_Control_init(); AMStandard_Control_start(); SocketInit(); currentMsg = 0; packetReadingNumber = 0; readingNumber = 0; nextindex = 0; CURRENT_NODE_ID = 17; //add end //line 39 //Timer_start(2,REPEAT ,15000*MILLISECOND); //TimerM_Timer_start(15, TIMER_REPEAT, 5000*MILLISECOND); //line 40 //Timer_start(1,REPEAT,1*MINUTE); initRadioHandle(); CC2420ControlM_CC2420Control_TuneChannel(15); CC2420ControlM_CC2420Control_TunePower( 31) ; __nesc_enable_interrupt(); while (1) { runNextTask(); } return 0; }