📄 app.c
字号:
static inline result_t AMStandard$SendMsg$default$sendDone(uint8_t id, TOS_MsgPtr msg, result_t success);static inline result_t AMStandard$default$sendDone(void);static inline void AMStandard$sendTask(void);static inline #line 179result_t AMStandard$SendMsg$send(uint8_t id, uint16_t addr, uint8_t length, TOS_MsgPtr data);static inline #line 207result_t AMStandard$UARTSend$sendDone(TOS_MsgPtr msg, result_t success);TOS_MsgPtr received(TOS_MsgPtr packet);static inline #line 242TOS_MsgPtr AMStandard$ReceiveMsg$default$receive(uint8_t id, TOS_MsgPtr msg);static TOS_MsgPtr AMStandard$UARTReceive$receive(TOS_MsgPtr packet);static inline # 60 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/PacketSink.nc"result_t PacketSink$Control$init(void);static inline result_t PacketSink$Control$start(void);static inline #line 77result_t PacketSink$Send$send(TOS_MsgPtr msg);static # 75 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"TOS_MsgPtr FramerM$ReceiveMsg$receive(TOS_MsgPtr arg_0xa32fc70);static # 55 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ByteComm.nc"result_t FramerM$ByteComm$txByte(uint8_t arg_0xa4adbb0);static # 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"result_t FramerM$ByteControl$init(void);static result_t FramerM$ByteControl$start(void);static # 67 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc"result_t FramerM$BareSendMsg$sendDone(TOS_MsgPtr arg_0xa467da8, result_t arg_0xa467ef8);static # 75 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/TokenReceiveMsg.nc"TOS_MsgPtr FramerM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0xa495770, uint8_t arg_0xa4958b8);# 82 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/micaz/FramerM.nc"enum FramerM$__nesc_unnamed4272 { FramerM$HDLC_QUEUESIZE = 2, FramerM$HDLC_MTU = sizeof(TOS_Msg ), FramerM$HDLC_FLAG_BYTE = 0x7e, FramerM$HDLC_CTLESC_BYTE = 0x7d, FramerM$PROTO_ACK = 64, FramerM$PROTO_PACKET_ACK = 65, FramerM$PROTO_PACKET_NOACK = 66, FramerM$PROTO_UNKNOWN = 255};enum FramerM$__nesc_unnamed4273 { FramerM$RXSTATE_NOSYNC, FramerM$RXSTATE_PROTO, FramerM$RXSTATE_TOKEN, FramerM$RXSTATE_INFO, FramerM$RXSTATE_ESC};enum FramerM$__nesc_unnamed4274 { FramerM$TXSTATE_IDLE, FramerM$TXSTATE_PROTO, FramerM$TXSTATE_INFO, FramerM$TXSTATE_ESC, FramerM$TXSTATE_FCS1, FramerM$TXSTATE_FCS2, FramerM$TXSTATE_ENDFLAG, FramerM$TXSTATE_FINISH, FramerM$TXSTATE_ERROR};enum FramerM$__nesc_unnamed4275 { FramerM$FLAGS_TOKENPEND = 0x2, FramerM$FLAGS_DATAPEND = 0x4, FramerM$FLAGS_UNKNOWN = 0x8};TOS_Msg FramerM$gMsgRcvBuf[FramerM$HDLC_QUEUESIZE];typedef struct FramerM$_MsgRcvEntry { uint8_t Proto; uint8_t Token; uint16_t Length; TOS_MsgPtr pMsg;} FramerM$MsgRcvEntry_t;FramerM$MsgRcvEntry_t FramerM$gMsgRcvTbl[FramerM$HDLC_QUEUESIZE];uint8_t *FramerM$gpRxBuf;uint8_t *FramerM$gpTxBuf;uint8_t FramerM$gFlags; uint8_t FramerM$gTxState; uint8_t FramerM$gPrevTxState; uint8_t FramerM$gTxProto; uint16_t FramerM$gTxByteCnt; uint16_t FramerM$gTxLength; uint16_t FramerM$gTxRunningCRC;uint8_t FramerM$gRxState;uint8_t FramerM$gRxHeadIndex;uint8_t FramerM$gRxTailIndex;uint16_t FramerM$gRxByteCnt;uint16_t FramerM$gRxRunningCRC;TOS_MsgPtr FramerM$gpTxMsg;uint8_t FramerM$gTxTokenBuf;uint8_t FramerM$gTxUnknownBuf; uint8_t FramerM$gTxEscByte;static void FramerM$PacketSent(void);static uint8_t FramerM$fRemapRxPos(uint8_t InPos);static uint8_t FramerM$fRemapRxPos(uint8_t InPos);static result_t FramerM$StartTx(void);static inline #line 224void FramerM$PacketUnknown(void);static inline void FramerM$PacketRcvd(void);static #line 268void FramerM$PacketSent(void);static #line 290void FramerM$HDLCInitialize(void);static inline #line 313result_t FramerM$StdControl$init(void);static inline result_t FramerM$StdControl$start(void);static inline result_t FramerM$BareSendMsg$send(TOS_MsgPtr pMsg);static inline #line 350result_t FramerM$TokenReceiveMsg$ReflectToken(uint8_t Token);static #line 370result_t FramerM$ByteComm$rxByteReady(uint8_t data, bool error, uint16_t strength);static #line 495result_t FramerM$TxArbitraryByte(uint8_t inByte);static inline #line 508result_t FramerM$ByteComm$txByteReady(bool LastByteSuccess);static inline #line 581result_t FramerM$ByteComm$txDone(void);static # 75 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"TOS_MsgPtr FramerAckM$ReceiveCombined$receive(TOS_MsgPtr arg_0xa32fc70);static # 88 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/TokenReceiveMsg.nc"result_t FramerAckM$TokenReceiveMsg$ReflectToken(uint8_t arg_0xa495ed0);# 72 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/FramerAckM.nc"uint8_t FramerAckM$gTokenBuf;static inline void FramerAckM$SendAckTask(void);static inline TOS_MsgPtr FramerAckM$TokenReceiveMsg$receive(TOS_MsgPtr Msg, uint8_t token);static inline #line 91TOS_MsgPtr FramerAckM$ReceiveMsg$receive(TOS_MsgPtr Msg);static # 62 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLUART.nc"result_t UARTM$HPLUART$init(void);static #line 80result_t UARTM$HPLUART$put(uint8_t arg_0xa4ea5f8);static # 83 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ByteComm.nc"result_t UARTM$ByteComm$txDone(void);static #line 75result_t UARTM$ByteComm$txByteReady(bool arg_0xa4a8830);static #line 66result_t UARTM$ByteComm$rxByteReady(uint8_t arg_0xa4a8060, bool arg_0xa4a81a8, uint16_t arg_0xa4a8300);# 58 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/UARTM.nc"bool UARTM$state;static inline result_t UARTM$Control$init(void);static inline result_t UARTM$Control$start(void);static inline result_t UARTM$HPLUART$get(uint8_t data);static result_t UARTM$HPLUART$putDone(void);static #line 110result_t UARTM$ByteComm$txByte(uint8_t data);static # 88 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLUART.nc"result_t HPLUART0M$UART$get(uint8_t arg_0xa4eaaf8);static result_t HPLUART0M$UART$putDone(void);static inline # 60 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica2/HPLUART0M.nc"result_t HPLUART0M$UART$init(void);#line 90void __attribute((signal)) __vector_18(void);void __attribute((interrupt)) __vector_20(void);static inline result_t HPLUART0M$UART$put(uint8_t data);# 117 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/micaz/hardware.h"static __inline void TOSH_SET_GREEN_LED_PIN(void)#line 117{#line 117 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 1;}#line 118static __inline void TOSH_SET_YELLOW_LED_PIN(void)#line 118{#line 118 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 0;}#line 116static __inline void TOSH_SET_RED_LED_PIN(void)#line 116{#line 116 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 2;}#line 140static __inline void TOSH_SET_FLASH_SELECT_PIN(void)#line 140{#line 140 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) |= 1 << 3;}#line 141static __inline void TOSH_MAKE_FLASH_CLK_OUTPUT(void)#line 141{#line 141 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x11 + 0x20) |= 1 << 5;}#line 142static __inline void TOSH_MAKE_FLASH_OUT_OUTPUT(void)#line 142{#line 142 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x11 + 0x20) |= 1 << 3;}#line 140static __inline void TOSH_MAKE_FLASH_SELECT_OUTPUT(void)#line 140{#line 140 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 3;}#line 120static __inline void TOSH_CLR_SERIAL_ID_PIN(void)#line 120{#line 120 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1B + 0x20) &= ~(1 << 4);}#line 120static __inline void TOSH_MAKE_SERIAL_ID_INPUT(void)#line 120{#line 120 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) &= ~(1 << 4);}#line 137static __inline void TOSH_MAKE_RADIO_CCA_INPUT(void)#line 137{#line 137 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x11 + 0x20) &= ~(1 << 6);}#line 135static __inline void TOSH_MAKE_CC_FIFO_INPUT(void)#line 135{#line 135 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x17 + 0x20) &= ~(1 << 7);}#line 133static __inline void TOSH_MAKE_CC_SFD_INPUT(void)#line 133{#line 133 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x11 + 0x20) &= ~(1 << 4);}#line 132static __inline void TOSH_MAKE_CC_CCA_INPUT(void)#line 132{#line 132 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x11 + 0x20) &= ~(1 << 6);}#line 130static __inline void TOSH_MAKE_CC_FIFOP1_INPUT(void)#line 130{#line 130 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x02 + 0x20) &= ~(1 << 6);}static __inline void TOSH_MAKE_CC_CS_INPUT(void)#line 134{#line 134 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x17 + 0x20) &= ~(1 << 0);}#line 128static __inline void TOSH_MAKE_CC_VREN_OUTPUT(void)#line 128{#line 128 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 5;}#line 127static __inline void TOSH_MAKE_CC_RSTN_OUTPUT(void)#line 127{#line 127 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 6;}#line 155static __inline void TOSH_MAKE_SPI_SCK_OUTPUT(void)#line 155{#line 155 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x17 + 0x20) |= 1 << 1;}#line 152static __inline void TOSH_MAKE_MOSI_OUTPUT(void)#line 152{#line 152 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x17 + 0x20) |= 1 << 2;}#line 153static __inline void TOSH_MAKE_MISO_INPUT(void)#line 153{#line 153 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x17 + 0x20) &= ~(1 << 3);}static __inline void TOSH_MAKE_PW0_OUTPUT(void)#line 158{#line 158 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 0;}#line 159static __inline void TOSH_MAKE_PW1_OUTPUT(void)#line 159{#line 159 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 1;}#line 160static __inline void TOSH_MAKE_PW2_OUTPUT(void)#line 160{#line 160 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 2;}#line 161static __inline void TOSH_MAKE_PW3_OUTPUT(void)#line 161{#line 161 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 3;}#line 162static __inline void TOSH_MAKE_PW4_OUTPUT(void)#line 162{#line 162 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 4;}#line 163static __inline void TOSH_MAKE_PW5_OUTPUT(void)#line 163{#line 163 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 5;}#line 164static __inline void TOSH_MAKE_PW6_OUTPUT(void)#line 164{#line 164 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 6;}#line 165static __inline void TOSH_MAKE_PW7_OUTPUT(void)#line 165{#line 165 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x14 + 0x20) |= 1 << 7;}#line 117static __inline void TOSH_MAKE_GREEN_LED_OUTPUT(void)#line 117{#line 117 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 1;}#line 118static __inline void TOSH_MAKE_YELLOW_LED_OUTPUT(void)#line 118{#line 118 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 0;}#line 116static __inline void TOSH_MAKE_RED_LED_OUTPUT(void)#line 116{#line 116 * (volatile unsigned char *)(unsigned int )& * (volatile unsigned char *)(0x1A + 0x20) |= 1 << 2;}static inline #line 180void TOSH_SET_PIN_DIRECTIONS(void ){ TOSH_MAKE_RED_LED_OUTPUT(); TOSH_MAKE_YELLOW_LED_OUTPUT(); TOSH_MAKE_GREEN_LED_OUTPUT(); TOSH_MAKE_PW7_OUTPUT(); TOSH_MAKE_PW6_OUTPUT(); TOSH_MAKE_PW5_OUTPUT();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -