📄 app.c
字号:
inline static result_t OscilloscopeM$Leds$redOff(void){#line 72 unsigned char result;#line 72#line 72 result = LedsC$Leds$redOff();#line 72#line 72 return result;#line 72}#line 72static inline # 139 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/LedsC.nc"result_t LedsC$Leds$yellowOff(void)#line 139{ { }#line 140 ; { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 141 { TOSH_SET_YELLOW_LED_PIN(); LedsC$ledsOn &= ~LedsC$YELLOW_BIT; }#line 144 __nesc_atomic_end(__nesc_atomic); } return SUCCESS;}# 122 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Leds.nc"inline static result_t OscilloscopeM$Leds$yellowOff(void){#line 122 unsigned char result;#line 122#line 122 result = LedsC$Leds$yellowOff();#line 122#line 122 return result;#line 122}#line 122static 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 OscilloscopeM$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 # 74 "OscilloscopeM.nc"result_t OscilloscopeM$StdControl$init(void)#line 74{ OscilloscopeM$Leds$init(); OscilloscopeM$Leds$yellowOff();#line 76 OscilloscopeM$Leds$redOff();#line 76 OscilloscopeM$Leds$greenOff(); OscilloscopeM$SensorControl$init(); OscilloscopeM$CommControl$init(); { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 83 { OscilloscopeM$currentMsg = 0; OscilloscopeM$packetReadingNumber = 0; OscilloscopeM$readingNumber = 0; }#line 87 __nesc_atomic_end(__nesc_atomic); } { }#line 89 ; return SUCCESS;}# 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 = TimerM$StdControl$init();#line 63 result = rcombine(result, OscilloscopeM$StdControl$init());#line 63 result = rcombine(result, TimerM$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_0xa35c0e8, char arg_0xa35c228){#line 96 unsigned char result;#line 96#line 96 result = HPLClock$Clock$setRate(arg_0xa35c0e8, arg_0xa35c228);#line 96#line 96 return result;#line 96}#line 96static inline # 82 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/TimerM.nc"result_t TimerM$StdControl$start(void)#line 82{ return SUCCESS;}static inline # 133 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/tos.h"result_t rcombine4(result_t r1, result_t r2, result_t r3, result_t r4){ return rcombine(r1, rcombine(r2, rcombine(r3, r4)));}# 41 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/PowerManagement.nc"inline static uint8_t AMStandard$PowerManagement$adjustPower(void){#line 41 unsigned char result;#line 41#line 41 result = HPLPowerManagementM$PowerManagement$adjustPower();#line 41#line 41 return result;#line 41}#line 41# 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.nc"inline static result_t AMStandard$ActivityTimer$start(char arg_0xa30b958, uint32_t arg_0xa30bab0){#line 59 unsigned char result;#line 59#line 59 result = TimerM$Timer$start(2, arg_0xa30b958, arg_0xa30bab0);#line 59#line 59 return result;#line 59}#line 59static inline # 64 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/PacketSink.nc"result_t PacketSink$Control$start(void)#line 64{ return SUCCESS;}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t AMStandard$RadioControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = PacketSink$Control$start();#line 70#line 70 return result;#line 70}#line 70static inline # 60 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica2/HPLUART0M.nc"result_t HPLUART0M$UART$init(void)#line 60{ * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)0x90 = 0; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x09 + 0x20) = 15; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x0B + 0x20) = 1 << 1; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)0x95 = (1 << 2) | (1 << 1); * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x0A + 0x20) = (((1 << 7) | (1 << 6)) | (1 << 4)) | (1 << 3); return SUCCESS;}# 62 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLUART.nc"inline static result_t UARTM$HPLUART$init(void){#line 62 unsigned char result;#line 62#line 62 result = HPLUART0M$UART$init();#line 62#line 62 return result;#line 62}#line 62static inline # 68 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/UARTM.nc"result_t UARTM$Control$start(void)#line 68{ return UARTM$HPLUART$init();}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t FramerM$ByteControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = UARTM$Control$start();#line 70#line 70 return result;#line 70}#line 70static inline # 318 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/micaz/FramerM.nc"result_t FramerM$StdControl$start(void)#line 318{ FramerM$HDLCInitialize(); return FramerM$ByteControl$start();}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t AMStandard$UARTControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = FramerM$StdControl$start();#line 70#line 70 return result;#line 70}#line 70inline static result_t AMStandard$TimerControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = TimerM$StdControl$start();#line 70#line 70 return result;#line 70}#line 70static inline # 103 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/AMStandard.nc"bool AMStandard$Control$start(void)#line 103{ result_t ok0 = AMStandard$TimerControl$start(); result_t ok1 = AMStandard$UARTControl$start(); result_t ok2 = AMStandard$RadioControl$start(); result_t ok3 = AMStandard$ActivityTimer$start(TIMER_REPEAT, 1000); AMStandard$state = FALSE; AMStandard$PowerManagement$adjustPower(); return rcombine4(ok0, ok1, ok2, ok3);}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t OscilloscopeM$CommControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = AMStandard$Control$start();#line 70#line 70 return result;#line 70}#line 70# 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.nc"inline static result_t OscilloscopeM$Timer$start(char arg_0xa30b958, uint32_t arg_0xa30bab0){#line 59 unsigned char result;#line 59#line 59 result = TimerM$Timer$start(1, arg_0xa30b958, arg_0xa30bab0);#line 59#line 59 return result;#line 59}#line 59static inline # 74 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/sensorboards/basicsb/PhotoM.nc"result_t PhotoM$StdControl$start(void)#line 74{ TOSH_MAKE_PHOTO_CTL_OUTPUT(); TOSH_SET_PHOTO_CTL_PIN(); return SUCCESS;}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t OscilloscopeM$SensorControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = PhotoM$StdControl$start();#line 70#line 70 return result;#line 70}#line 70static inline # 97 "OscilloscopeM.nc"result_t OscilloscopeM$StdControl$start(void)#line 97{ OscilloscopeM$SensorControl$start(); OscilloscopeM$Timer$start(TIMER_REPEAT, 10); OscilloscopeM$CommControl$start(); return SUCCESS;}# 70 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t RealMain$StdControl$start(void){#line 70 unsigned char result;#line 70#line 70 result = TimerM$StdControl$start();#line 70 result = rcombine(result, OscilloscopeM$StdControl$start());#line 70 result = rcombine(result, TimerM$StdControl$start());#line 70#line 70 return result;#line 70}#line 70static inline # 134 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/HPLClock.nc"uint8_t HPLClock$Clock$readCounter(void)#line 134{ return * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x32 + 0x20);}# 153 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Clock.nc"inline static uint8_t TimerM$Clock$readCounter(void){#line 153 unsigned char result;#line 153#line 153 result = HPLClock$Clock$readCounter();#line 153#line 153 return result;#line 153}#line 153static inline # 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/micaz/HPLPowerManagementM.nc"uint8_t HPLPowerManagementM$getPowerLevel(void)#line 63{ uint8_t diff;#line 65 if (* (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x37 + 0x20) & ~((1 << 1) | (1 << 0))) { return HPLPowerManagementM$IDLE; } else {#line 68 if (* (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x0D + 0x20) & (1 << 7)) { return HPLPowerManagementM$IDLE; } else { if (* (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x06 + 0x20) & (1 << 7)) { return HPLPowerManagementM$ADC_NR; } else {#line 74 if (* (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x37 + 0x20) & ((1 << 1) | (1 << 0))) { diff = * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x31 + 0x20) - * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x32 + 0x20); if (diff < 16) { return HPLPowerManagementM$EXT_STANDBY; }#line 78 return HPLPowerManagementM$POWER_SAVE; } else #line 79 { return HPLPowerManagementM$POWER_DOWN; } } } }}static inline #line 84void HPLPowerManagementM$doAdjustment(void)#line 84{ uint8_t foo;#line 85 uint8_t mcu;#line 86 foo = HPLPowerManagementM$getPowerLevel(); mcu = * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x35 + 0x20); mcu &= 0xe3; if (foo == HPLPowerManagementM$EXT_STANDBY || foo == HPLPowerManagementM$POWER_SAVE) { mcu |= HPLPowerManagementM$IDLE; while ((* (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x30 + 0x20) & 0x7) != 0) { __asm volatile ("nop");} mcu &= 0xe3; } mcu |= foo; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x35 + 0x20) = mcu; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x35 + 0x20) |= 1 << 5;}static # 165 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h"__inline void __nesc_enable_interrupt(void)#line 165{ __asm volatile ("sei");}static inline #line 135void TOSH_wait(void){ __asm volatile ("nop"); __asm volatile ("nop");}static inline void TOSH_sleep(void){ * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x35 + 0x20) |= 1 << 5; __asm volatile ("sleep");}#line 160__inline void __nesc_atomic_end(__nesc_atomic_t oldSreg){ * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x3F + 0x20) = oldSreg;}#line 153__inline __nesc_atomic_t __nesc_atomic_start(void ){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -