📄 app.c
字号:
{ * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) = 0x00; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x17 + 0x20) = 0x00; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x11 + 0x20) = 0x00; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x02 + 0x20) = 0x02; * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x03 + 0x20) = 0x02; TOSH_MAKE_POT_SELECT_OUTPUT(); TOSH_MAKE_POT_POWER_OUTPUT(); TOSH_MAKE_PW7_OUTPUT(); TOSH_MAKE_PW6_OUTPUT(); TOSH_MAKE_PW5_OUTPUT(); TOSH_MAKE_PW4_OUTPUT(); TOSH_MAKE_PW3_OUTPUT(); TOSH_MAKE_PW2_OUTPUT(); TOSH_MAKE_PW1_OUTPUT(); TOSH_MAKE_PW0_OUTPUT(); TOSH_MAKE_RFM_CTL0_OUTPUT(); TOSH_MAKE_RFM_CTL1_OUTPUT(); TOSH_MAKE_RFM_TXD_OUTPUT(); TOSH_SET_POT_POWER_PIN(); TOSH_MAKE_FLASH_SELECT_INPUT(); TOSH_MAKE_BOOST_ENABLE_OUTPUT(); TOSH_SET_BOOST_ENABLE_PIN(); TOSH_MAKE_ONE_WIRE_INPUT(); TOSH_SET_ONE_WIRE_PIN();}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_0xa28e970){#line 78 unsigned char result;#line 78#line 78 result = PotM$Pot$init(arg_0xa28e970);#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;}static inline result_t rcombine3(result_t r1, result_t r2, result_t r3){ return rcombine(r1, rcombine(r2, r3));}# 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 TOSBaseM$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 # 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/RandomLFSR.nc"result_t RandomLFSR$Random$init(void)#line 59{ { }#line 60 ; { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 61 { RandomLFSR$shiftReg = 119 * 119 * (TOS_LOCAL_ADDRESS + 1); RandomLFSR$initSeed = RandomLFSR$shiftReg; RandomLFSR$mask = 137 * 29 * (TOS_LOCAL_ADDRESS + 1); }#line 65 __nesc_atomic_end(__nesc_atomic); } return SUCCESS;}# 57 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Random.nc"inline static result_t MicaHighSpeedRadioM$Random$init(void){#line 57 unsigned char result;#line 57#line 57 result = RandomLFSR$Random$init();#line 57#line 57 return result;#line 57}#line 57static inline # 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/ChannelMonC.nc"result_t ChannelMonC$ChannelMon$init(void)#line 59{ { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 60 { ChannelMonC$CM_waiting = -1; }#line 62 __nesc_atomic_end(__nesc_atomic); } return ChannelMonC$ChannelMon$startSymbolSearch();}# 33 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/ChannelMon.nc"inline static result_t MicaHighSpeedRadioM$ChannelMon$init(void){#line 33 unsigned char result;#line 33#line 33 result = ChannelMonC$ChannelMon$init();#line 33#line 33 return result;#line 33}#line 33static inline # 143 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica/MicaHighSpeedRadioM.nc"result_t MicaHighSpeedRadioM$Control$init(void)#line 143{ { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 144 { MicaHighSpeedRadioM$rec_ptr = &MicaHighSpeedRadioM$buffer; MicaHighSpeedRadioM$send_state = MicaHighSpeedRadioM$IDLE_STATE; MicaHighSpeedRadioM$state = MicaHighSpeedRadioM$IDLE_STATE; }#line 148 __nesc_atomic_end(__nesc_atomic); } return rcombine(MicaHighSpeedRadioM$ChannelMon$init(), MicaHighSpeedRadioM$Random$init());}# 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t TOSBaseM$RadioControl$init(void){#line 63 unsigned char result;#line 63#line 63 result = MicaHighSpeedRadioM$Control$init();#line 63#line 63 return result;#line 63}#line 63static inline # 60 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/UARTM.nc"result_t UARTM$Control$init(void)#line 60{ { }#line 61 ; { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();#line 62 { UARTM$state = FALSE; }#line 64 __nesc_atomic_end(__nesc_atomic); } return SUCCESS;}# 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t FramerM$ByteControl$init(void){#line 63 unsigned char result;#line 63#line 63 result = UARTM$Control$init();#line 63#line 63 return result;#line 63}#line 63static inline # 291 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/FramerM.nc"result_t FramerM$StdControl$init(void)#line 291{ FramerM$HDLCInitialize(); return FramerM$ByteControl$init();}# 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"inline static result_t TOSBaseM$UARTControl$init(void){#line 63 unsigned char result;#line 63#line 63 result = FramerM$StdControl$init();#line 63#line 63 return result;#line 63}#line 63static inline # 87 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/apps/TOSBase/TOSBaseM.nc"result_t TOSBaseM$StdControl$init(void)#line 87{ result_t ok1;#line 88 result_t ok2;#line 88 result_t ok3; uint8_t i; for (i = 0; i < TOSBaseM$UART_QUEUE_LEN; i++) { TOSBaseM$uartQueue[i] = &TOSBaseM$uartQueueBufs[i]; } TOSBaseM$uartIn = TOSBaseM$uartOut = 0; TOSBaseM$uartBusy = FALSE; TOSBaseM$uartFull = FALSE; for (i = 0; i < TOSBaseM$RADIO_QUEUE_LEN; i++) { TOSBaseM$radioQueue[i] = &TOSBaseM$radioQueueBufs[i]; } TOSBaseM$radioIn = TOSBaseM$radioOut = 0; TOSBaseM$radioBusy = FALSE; TOSBaseM$radioFull = FALSE; ok1 = TOSBaseM$UARTControl$init(); ok2 = TOSBaseM$RadioControl$init(); ok3 = TOSBaseM$Leds$init(); { }#line 109 ; return rcombine3(ok1, ok2, ok3);}# 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 = TOSBaseM$StdControl$init();#line 63
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -