📄 app.c
字号:
}static inline # 57 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLInit.nc"result_t HPLInit$init(void)#line 57{ TOSH_SET_PIN_DIRECTIONS(); return SUCCESS;}# 47 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/RealMain.nc"inline static result_t RealMain$hardwareInit(void){#line 47 unsigned char result;#line 47#line 47 result = HPLInit$init();#line 47#line 47 return result;#line 47}#line 47# 62 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/hardware.h"static __inline void TOSH_SET_INC_PIN(void)#line 62{#line 62 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 2;}#line 61static __inline void TOSH_SET_UD_PIN(void)#line 61{#line 61 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 1;}static inline # 74 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLPotC.nc"result_t HPLPotC$Pot$finalise(void)#line 74{ TOSH_SET_UD_PIN(); TOSH_SET_INC_PIN(); return SUCCESS;}# 74 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLPot.nc"inline static result_t PotM$HPLPot$finalise(void){#line 74 unsigned char result;#line 74#line 74 result = HPLPotC$Pot$finalise();#line 74#line 74 return result;#line 74}#line 74# 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/hardware.h"static __inline void TOSH_SET_POT_SELECT_PIN(void)#line 63{#line 63 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x12 + 0x20) |= 1 << 5;}#line 62static __inline void TOSH_CLR_INC_PIN(void)#line 62{#line 62 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) &= ~(1 << 2);}#line 63static __inline void TOSH_CLR_POT_SELECT_PIN(void)#line 63{#line 63 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x12 + 0x20) &= ~(1 << 5);}#line 61static __inline void TOSH_CLR_UD_PIN(void)#line 61{#line 61 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) &= ~(1 << 1);}static inline # 65 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLPotC.nc"result_t HPLPotC$Pot$increase(void)#line 65{ TOSH_CLR_UD_PIN(); TOSH_CLR_POT_SELECT_PIN(); TOSH_SET_INC_PIN(); TOSH_CLR_INC_PIN(); TOSH_SET_POT_SELECT_PIN(); return SUCCESS;}# 67 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLPot.nc"inline static result_t PotM$HPLPot$increase(void){#line 67 unsigned char result;#line 67#line 67 result = HPLPotC$Pot$increase();#line 67#line 67 return result;#line 67}#line 67static inline # 56 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLPotC.nc"result_t HPLPotC$Pot$decrease(void)#line 56{ TOSH_SET_UD_PIN(); TOSH_CLR_POT_SELECT_PIN(); TOSH_SET_INC_PIN(); TOSH_CLR_INC_PIN(); TOSH_SET_POT_SELECT_PIN(); return SUCCESS;}# 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLPot.nc"inline static result_t PotM$HPLPot$decrease(void){#line 59 unsigned char result;#line 59#line 59 result = HPLPotC$Pot$decrease();#line 59#line 59 return result;#line 59}#line 59static inline # 93 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/PotM.nc"void PotM$setPot(uint8_t value)#line 93{ uint8_t i;#line 95 for (i = 0; i < 151; i++) PotM$HPLPot$decrease(); for (i = 0; i < value; i++) PotM$HPLPot$increase(); PotM$HPLPot$finalise(); PotM$potSetting = value;}static inline result_t PotM$Pot$init(uint8_t initialSetting)#line 106{ PotM$setPot(initialSetting); return SUCCESS;}# 78 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Pot.nc"inline static result_t RealMain$Pot$init(uint8_t arg_0xa285a18){#line 78 unsigned char result;#line 78#line 78 result = PotM$Pot$init(arg_0xa285a18);#line 78#line 78 return result;#line 78}#line 78static inline # 83 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/sched.c"void TOSH_sched_init(void ){ int i;#line 86 TOSH_sched_free = 0; TOSH_sched_full = 0; for (i = 0; i < TOSH_MAX_TASKS; i++) TOSH_queue[i].tp = (void *)0;}static inline # 120 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/tos.h"result_t rcombine(result_t r1, result_t r2){ return r1 == FAIL ? FAIL : r2;}# 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/hardware.h"static __inline void TOSH_SET_GREEN_LED_PIN(void)#line 59{#line 59 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 1;}#line 58static __inline void TOSH_SET_YELLOW_LED_PIN(void)#line 58{#line 58 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 0;}#line 57static __inline void TOSH_SET_RED_LED_PIN(void)#line 57{#line 57 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 2;}#line 59static __inline void TOSH_MAKE_GREEN_LED_OUTPUT(void)#line 59{#line 59 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 1;}#line 58static __inline void TOSH_MAKE_YELLOW_LED_OUTPUT(void)#line 58{#line 58 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 0;}#line 57static __inline void TOSH_MAKE_RED_LED_OUTPUT(void)#line 57{#line 57 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 2;}static inline # 58 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/LedsC.nc"result_t LedsC$Leds$init(void)#line 58{ { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 59 { LedsC$ledsOn = 0; { }#line 61 ; TOSH_MAKE_RED_LED_OUTPUT(); TOSH_MAKE_YELLOW_LED_OUTPUT(); TOSH_MAKE_GREEN_LED_OUTPUT(); TOSH_SET_RED_LED_PIN(); TOSH_SET_YELLOW_LED_PIN(); TOSH_SET_GREEN_LED_PIN(); }#line 68 __nesc_atomic_end(__nesc_atomic); } return SUCCESS;}# 56 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Leds.nc"inline static result_t SenseM$Leds$init(void){#line 56 unsigned char result;#line 56#line 56 result = LedsC$Leds$init();#line 56#line 56 return result;#line 56}#line 56static inline # 86 "SenseM.nc"result_t SenseM$StdControl$init(void)#line 86{ return SenseM$Leds$init();}static inline # 76 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLADCC.nc"result_t HPLADCC$ADC$init(void)#line 76{ HPLADCC$init_portmap(); * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x06 + 0x20) = 0x04; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x06 + 0x20) &= ~(1 << 6); * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x06 + 0x20) |= 1 << 4; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x06 + 0x20) |= 1 << 3; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x06 + 0x20) &= ~(1 << 7); return SUCCESS;}# 54 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLADC.nc"inline static result_t ADCM$HPLADC$init(void){#line 54 unsigned char result;#line 54#line 54 result = HPLADCC$ADC$init();#line 54#line 54 return result;#line 54}#line 54static inline # 73 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/ADCM.nc"result_t ADCM$ADCControl$init(void)#line 73{ { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 74 { ADCM$ReqPort = 0; ADCM$ReqVector = ADCM$ContReqMask = 0; }#line 77 __nesc_atomic_end(__nesc_atomic); } { }#line 78 ; return ADCM$HPLADC$init();}# 50 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ADCControl.nc"inline static result_t PhotoTempM$ADCControl$init(void){#line 50 unsigned char result;#line 50#line 50 result = ADCM$ADCControl$init();#line 50#line 50 return result;#line 50}#line 50# 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t PhotoTempM$TimerControl$init(void){#line 63 unsigned char result;#line 63#line 63 result = TimerM$StdControl$init();#line 63#line 63 return result;#line 63}#line 63static inline # 96 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLADCC.nc"result_t HPLADCC$ADC$bindPort(uint8_t port, uint8_t adcPort)#line 96{ if (port < HPLADCC$TOSH_ADC_PORTMAPSIZE) { { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 99 { HPLADCC$init_portmap(); HPLADCC$TOSH_adc_portmap[port] = adcPort; }#line 102 __nesc_atomic_end(__nesc_atomic); } return SUCCESS; } else { return FAIL; }}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLADC.nc"inline static result_t ADCM$HPLADC$bindPort(uint8_t arg_0xa407d88, uint8_t arg_0xa407ed0){#line 70 unsigned char result;#line 70#line 70 result = HPLADCC$ADC$bindPort(arg_0xa407d88, arg_0xa407ed0);#line 70#line 70 return result;#line 70}#line 70static inline # 87 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/ADCM.nc"result_t ADCM$ADCControl$bindPort(uint8_t port, uint8_t adcPort)#line 87{ return ADCM$HPLADC$bindPort(port, adcPort);}# 89 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ADCControl.nc"inline static result_t PhotoTempM$ADCControl$bindPort(uint8_t arg_0xa3d40e8, uint8_t arg_0xa3d4230){#line 89 unsigned char result;#line 89#line 89 result = ADCM$ADCControl$bindPort(arg_0xa3d40e8, arg_0xa3d4230);#line 89#line 89 return result;#line 89}#line 89static inline # 134 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/sensorboards/micasb/PhotoTempM.nc"result_t PhotoTempM$PhotoStdControl$init(void)#line 134{ PhotoTempM$ADCControl$bindPort(TOS_ADC_PHOTO_PORT, TOSH_ACTUAL_PHOTO_PORT); PhotoTempM$TimerControl$init(); { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 137 { PhotoTempM$photoSensor = PhotoTempM$stateIdle; }#line 139 __nesc_atomic_end(__nesc_atomic); }#line 139 ; { }#line 140 ; return PhotoTempM$ADCControl$init();}# 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t RealMain$StdControl$init(void){#line 63 unsigned char result;#line 63#line 63 result = PhotoTempM$PhotoStdControl$init();#line 63 result = rcombine(result, TimerM$StdControl$init());#line 63 result = rcombine(result, SenseM$StdControl$init());#line 63#line 63 return result;#line 63}#line 63static inline # 149 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/HPLClock.nc"result_t HPLClock$Clock$setRate(char interval, char scale)#line 149{ scale &= 0x7; scale |= 0x8; { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 152 { * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x37 + 0x20) &= ~(1 << 0); * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x37 + 0x20) &= ~(1 << 1); * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x30 + 0x20) |= 1 << 3; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x33 + 0x20) = scale; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x32 + 0x20) = 0; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x31 + 0x20) = interval; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x37 + 0x20) |= 1 << 1; }#line 162 __nesc_atomic_end(__nesc_atomic); } return SUCCESS;}# 96 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Clock.nc"inline static result_t TimerM$Clock$setRate(char arg_0xa31fcc8, char arg_0xa31fe08){#line 96 unsigned char result;#line 96#line 96 result = HPLClock$Clock$setRate(arg_0xa31fcc8, arg_0xa31fe08);#line 96#line 96 return result;#line 96}#line 96# 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.nc"inline static result_t SenseM$Timer$start(char arg_0xa2cc150, uint32_t arg_0xa2cc2a8){#line 59 unsigned char result;#line 59#line 59 result = TimerM$Timer$start(0, arg_0xa2cc150, arg_0xa2cc2a8);#line 59#line 59 return result;#line 59}#line 59static inline # 94 "SenseM.nc"result_t SenseM$StdControl$start(void)#line 94{ return SenseM$Timer$start(TIMER_REPEAT, 500);}static inline # 87 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/TimerM.nc"result_t TimerM$StdControl$start(void)#line 87{ return SUCCESS;}static inline # 144 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/sensorboards/micasb/PhotoTempM.nc"result_t PhotoTempM$PhotoStdControl$start(void)#line 144{ { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 145 { PhotoTempM$photoSensor = PhotoTempM$stateIdle; }#line 147 __nesc_atomic_end(__nesc_atomic); }#line 147 ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -