⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 app.c

📁 这是在tinyos中用nesC语言编程示例
💻 C
📖 第 1 页 / 共 5 页
字号:
static inline  result_t RF230RadioM$PHYSend$sendDone(TOS_MsgPtr msg, result_t succ);static inline  TOS_MsgPtr RF230RadioM$PHYRecv$receive(TOS_MsgPtr msg);static inline  result_t RF230RadioM$IntervalTimer$fired(void);static inline  result_t RF230RadioM$SleepTimer$fired(void);static inline   int16_t RF230RadioM$MacBackoff$initialBackoff(TOS_MsgPtr m);static inline   int16_t RF230RadioM$MacBackoff$congestionBackoff(TOS_MsgPtr m);static inline   void RF230RadioM$WakeSequence$IncomingPacket(void);static inline   void RF230RadioM$WakeSequence$sniffExpired(bool channelClear);static inline   void RF230RadioM$WakeSequence$sendWakeDone(result_t succ);# 29 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\WakeSequence.nc"static   void RF230RadioRawM$WakeSequence$sendWakeDone(result_t arg_0x1a9329f8);#line 46static   void RF230RadioRawM$WakeSequence$IncomingPacket(void);static   void RF230RadioRawM$WakeSequence$sniffExpired(bool arg_0x1a930d90);# 12 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230Interrupts.nc"static   void RF230RadioRawM$RF230Interrupts$enable(void);# 63 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SplitControl.nc"static  result_t RF230RadioRawM$RadioSplitControl$startDone(void);# 15 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\RadioCoordinator.nc"static   void RF230RadioRawM$sendCoordinator$startSymbol(uint8_t arg_0x1a986010, uint8_t arg_0x1a986198, TOS_MsgPtr arg_0x1a986328);# 104 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230Control.nc"static   void RF230RadioRawM$RF230Control$force_TRX_OFF(void);#line 116static   void RF230RadioRawM$RF230Control$set_RX_ON(void);#line 74static   void RF230RadioRawM$RF230Control$getRSSIandCRC(bool *arg_0x1a8a1540, uint8_t *arg_0x1a8a16e8);#line 110static   void RF230RadioRawM$RF230Control$set_PLL_ON(void);#line 90static   bool RF230RadioRawM$RF230Control$CCA(void);# 16 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerJiffyAsync.nc"static   result_t RF230RadioRawM$TimerJiffyAsync$setOneShot(uint32_t arg_0x1a995c20);static   result_t RF230RadioRawM$TimerJiffyAsync$stop(void);# 15 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\RadioCoordinator.nc"static   void RF230RadioRawM$recvCoordinator$startSymbol(uint8_t arg_0x1a986010, uint8_t arg_0x1a986198, TOS_MsgPtr arg_0x1a986328);# 45 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static  result_t RF230RadioRawM$Send$sendDone(TOS_MsgPtr arg_0x1a844768, result_t arg_0x1a8448f8);# 36 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Random.nc"static   result_t RF230RadioRawM$Random$init(void);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static  TOS_MsgPtr RF230RadioRawM$Receive$receive(TOS_MsgPtr arg_0x1a8367d8);# 34 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\HPLRF230.nc"static   void RF230RadioRawM$HPLRF230$writeFrame(uint8_t arg_0x1a8d16c0, uint8_t *arg_0x1a8d1868);#line 46static   uint8_t RF230RadioRawM$HPLRF230$readFrameCRC(uint8_t *arg_0x1a8d0638);#line 40static   void RF230RadioRawM$HPLRF230$addCRC(uint8_t *arg_0x1a8d1f00);# 42 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\SplitControl.nc"static  result_t RF230RadioRawM$RF230ControlSplitControl$init(void);#line 55static  result_t RF230RadioRawM$RF230ControlSplitControl$start(void);# 24 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\MacBackoff.nc"static   int16_t RF230RadioRawM$MacBackoff$initialBackoff(TOS_MsgPtr arg_0x1a946a90);static   int16_t RF230RadioRawM$MacBackoff$congestionBackoff(TOS_MsgPtr arg_0x1a945010);# 64 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230RadioRawM.nc"enum RF230RadioRawM$__nesc_unnamed4274 {  RF230RadioRawM$RF230_TIMER_IDLE,   RF230RadioRawM$RF230_TIMER_BACKOFF,   RF230RadioRawM$RF230_TIMER_ACK,   RF230RadioRawM$RF230_TIMER_SEND,   RF230RadioRawM$RF230_TIMER_SNIFF};uint8_t RF230RadioRawM$timerState = RF230RadioRawM$RF230_TIMER_IDLE;enum RF230RadioRawM$__nesc_unnamed4275 {  RF230RadioRawM$RF230_RADIO_DISABLED,   RF230RadioRawM$RF230_RADIO_START,   RF230RadioRawM$RF230_RADIO_STOP,   RF230RadioRawM$RF230_RADIO_IDLE,   RF230RadioRawM$RF230_RADIO_SEND_SETUP,   RF230RadioRawM$RF230_RADIO_SEND_BACKOFF,   RF230RadioRawM$RF230_RADIO_SEND_TX,   RF230RadioRawM$RF230_RADIO_WAIT_ACK,   RF230RadioRawM$RF230_RADIO_SEND_DONE,   RF230RadioRawM$RF230_RADIO_SEND_FAIL,   RF230RadioRawM$RF230_RADIO_SEND_WAKEUP};uint8_t RF230RadioRawM$radioState;bool RF230RadioRawM$bAckEnabled;bool RF230RadioRawM$bRxBufLocked;bool RF230RadioRawM$bTxBufLocked;uint8_t RF230RadioRawM$sendRetries;uint8_t RF230RadioRawM$currentDSN;uint16_t RF230RadioRawM$wakePacketCount;uint8_t RF230RadioRawM$txlength;TOS_MsgPtr RF230RadioRawM$txbufptr;TOS_MsgPtr RF230RadioRawM$rxbufptr;TOS_Msg RF230RadioRawM$RxBuf;static __inline void RF230RadioRawM$initLocalState(void);static __inline void RF230RadioRawM$fillDataPacket(TOS_MsgPtr pMsg);static __inline void RF230RadioRawM$tryToSend(void);static __inline void RF230RadioRawM$doCongestionBackOff(void);static __inline void RF230RadioRawM$completeSend(void);static __inline result_t RF230RadioRawM$setBackoffTimer(uint16_t jiffy);static __inline result_t RF230RadioRawM$setAckTimer(uint16_t jiffy);static __inline result_t RF230RadioRawM$setSendTimer(uint16_t jiffy);static __inline void RF230RadioRawM$stopAllTimers(void);static __inline void RF230RadioRawM$handleRxInt(void);static __inline void RF230RadioRawM$handleTxInt(result_t status);static __inline void RF230RadioRawM$handleSendAck(uint8_t dsn);static __inline void RF230RadioRawM$handleWakeInt(void);#line 176static inline  void RF230RadioRawM$handleSendDone(void);static inline  void RF230RadioRawM$handleRecv(void);#line 204static inline  void RF230RadioRawM$sigJiffyTimer(void);static inline  result_t RF230RadioRawM$RadioSplitControl$init(void);#line 234static __inline void RF230RadioRawM$initLocalState(void);#line 266static inline  result_t RF230RadioRawM$RadioSplitControl$start(void);#line 299static  result_t RF230RadioRawM$RF230ControlSplitControl$startDone(void);#line 373static inline  result_t RF230RadioRawM$Send$send(TOS_MsgPtr pMsg);#line 428static __inline void RF230RadioRawM$fillDataPacket(TOS_MsgPtr pMsg);#line 470static __inline void RF230RadioRawM$tryToSend(void);#line 552static __inline void RF230RadioRawM$doCongestionBackOff(void);#line 577static __inline void RF230RadioRawM$completeSend(void);#line 611static inline  void  RF230RadioRawM$RF230Interrupts$INT_RX_Start(void);#line 638static inline  void  RF230RadioRawM$RF230Interrupts$INT_TRX_UnderRun(void);#line 682static inline  void  RF230RadioRawM$RF230Interrupts$INT_TRX_Done(void);#line 726static __inline void RF230RadioRawM$handleTxInt(result_t status);#line 763static __inline void RF230RadioRawM$handleRxInt(void);#line 898static __inline void RF230RadioRawM$handleSendAck(uint8_t dsn);#line 944static __inline result_t RF230RadioRawM$setBackoffTimer(uint16_t jiffy);#line 973static __inline result_t RF230RadioRawM$setAckTimer(uint16_t jiffy);#line 1014static __inline result_t RF230RadioRawM$setSendTimer(uint16_t jiffy);#line 1034static __inline void RF230RadioRawM$stopAllTimers(void);static   result_t RF230RadioRawM$TimerJiffyAsync$fired(void);#line 1183static __inline void RF230RadioRawM$handleWakeInt(void);#line 1248static inline    #line 1247void RF230RadioRawM$sendCoordinator$default$startSymbol(uint8_t bitsPerBlock, uint8_t offset, TOS_MsgPtr msgBuff);static inline    #line 1257void RF230RadioRawM$recvCoordinator$default$startSymbol(uint8_t bitsPerBlock, uint8_t offset, TOS_MsgPtr msgBuff);# 16 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230Interrupts.nc"static  void  RF230InterruptsM$RF230Interrupts$INT_RX_Start(void);static  void  RF230InterruptsM$RF230Interrupts$INT_TRX_UnderRun(void);#line 18static  void  RF230InterruptsM$RF230Interrupts$INT_TRX_Done(void);# 19 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\PowerManagement.nc"static   uint8_t RF230InterruptsM$PowerManagement$adjustPower(void);# 50 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerCapture.nc"static   void RF230InterruptsM$TimerCapture$enableEvents(void);#line 28static   void RF230InterruptsM$TimerCapture$setEdge(uint8_t arg_0x1aa483f0);# 19 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\HPLRF230.nc"static   uint8_t RF230InterruptsM$HPLRF230$readReg(uint8_t arg_0x1a8d49b0);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\RF230InterruptsM.nc"static inline  result_t RF230InterruptsM$InterruptControl$init(void);static inline  result_t RF230InterruptsM$InterruptControl$start(void);#line 74static inline   void RF230InterruptsM$TimerCapture$captured(uint16_t time);#line 117static inline   void RF230InterruptsM$RF230Interrupts$enable(void);# 157 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\Clock16.nc"static   result_t HPLTimer1M$Timer1$fire(void);# 60 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerCapture.nc"static   void HPLTimer1M$CaptureT1$captured(uint16_t arg_0x1aa46a80);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\HPLTimer1M.nc"volatile uint8_t HPLTimer1M$set_flag;volatile uint8_t HPLTimer1M$mscale;volatile uint8_t HPLTimer1M$nextScale;volatile uint16_t HPLTimer1M$minterval;#line 175static inline    result_t HPLTimer1M$Timer1$default$fire(void);void __vector_17(void)   __attribute((interrupt)) ;#line 203static   void HPLTimer1M$CaptureT1$setEdge(uint8_t LowToHigh);#line 235static inline   uint16_t HPLTimer1M$CaptureT1$getEvent(void);#line 269static inline   void HPLTimer1M$CaptureT1$enableEvents(void);#line 302void __vector_16(void)   __attribute((signal)) ;# 250 "D:\\Crossbow\\cygwin\\usr\\local\\avr\\include\\util\\crc16.h"#line 249static __inline uint16_t HPLRF230M$_crc_ccitt_update(uint16_t __crc, uint8_t __data);# 18 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\HPLRF230.h"static __inline void HPLRF230M$initSPIMaster(void);#line 32static __inline void HPLRF230M$initRadioGPIO(void);#line 61static __inline void HPLRF230M$bios_reg_write(uint8_t addr, uint8_t val);#line 84static __inline uint8_t HPLRF230M$bios_reg_read(uint8_t addr);#line 148static __inline void HPLRF230M$bios_bit_write(uint8_t addr, uint8_t mask, uint8_t pos, uint8_t value);#line 173static __inline void HPLRF230M$bios_frame_write(uint8_t length, uint8_t *data);#line 252static __inline uint8_t HPLRF230M$bios_frame_crc_read(uint8_t *d);#line 319static __inline void HPLRF230M$bios_gen_crc16(uint8_t *msg);# 26 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\radio\\rf230\\HPLRF230M.nc"static inline   void HPLRF230M$HPLRF230Init$init(void);#line 42static inline   void HPLRF230M$HPLRF230$writeReg(uint8_t addr, uint8_t value);static   uint8_t HPLRF230M$HPLRF230$readReg(uint8_t addr);static inline   void HPLRF230M$HPLRF230$writeFrame(uint8_t len, uint8_t *buff);static inline   void HPLRF230M$HPLRF230$addCRC(uint8_t *buff);static inline   uint8_t HPLRF230M$HPLRF230$readFrameCRC(uint8_t *buff);#line 114static inline   void HPLRF230M$HPLRF230$bitWrite(uint8_t addr, uint8_t mask, uint8_t pos, uint8_t value);# 22 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerJiffyAsync.nc"static   result_t TimerJiffyAsyncM$TimerJiffyAsync$fired(void);# 19 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\PowerManagement.nc"static   uint8_t TimerJiffyAsyncM$PowerManagement$adjustPower(void);# 127 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Clock.nc"static   result_t TimerJiffyAsyncM$Timer$setIntervalAndScale(uint8_t arg_0x1a6409d0, uint8_t arg_0x1a640b58);#line 147static   void TimerJiffyAsyncM$Timer$intDisable(void);# 40 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\TimerJiffyAsyncM.nc"uint32_t TimerJiffyAsyncM$jiffy;bool TimerJiffyAsyncM$bSet;#line 68static inline   result_t TimerJiffyAsyncM$Timer$fire(void);#line 88static   result_t TimerJiffyAsyncM$TimerJiffyAsync$setOneShot(uint32_t _jiffy);#line 110static inline   result_t TimerJiffyAsyncM$TimerJiffyAsync$stop(void);# 159 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\Clock.nc"static   result_t HPLTimer0$Timer0$fire(void);# 78 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\atm1281\\HPLTimer0.nc"uint8_t HPLTimer0$set_flag;uint8_t HPLTimer0$mscale;#line 79uint8_t HPLTimer0$nextScale;#line 79uint8_t HPLTimer0$minterval;#line 148static   result_t HPLTimer0$Timer0$setIntervalAndScale(uint8_t interval, uint8_t scale);#line 202static inline   void HPLTimer0$Timer0$intDisable(void);void __vector_21(void)   __attribute((interrupt)) ;# 33 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\system\\RandomLFSR.nc"uint16_t RandomLFSR$shiftReg;uint16_t RandomLFSR$initSeed;uint16_t RandomLFSR$mask;static   result_t RandomLFSR$Random$init(void);static   uint16_t RandomLFSR$Random$rand(void);# 53 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ReceiveMsg.nc"static  TOS_MsgPtr FramerM$ReceiveMsg$receive(TOS_MsgPtr arg_0x1a8367d8);# 34 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\ByteComm.nc"static   result_t FramerM$ByteComm$txByte(uint8_t arg_0x1abc60f8);# 41 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\StdControl.nc"static  result_t FramerM$ByteControl$init(void);static  result_t FramerM$ByteControl$start(void);# 45 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\BareSendMsg.nc"static  result_t FramerM$BareSendMsg$sendDone(TOS_MsgPtr arg_0x1a844768, result_t arg_0x1a8448f8);# 46 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\interfaces\\TokenReceiveMsg.nc"static  TOS_MsgPtr FramerM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0x1abca190, uint8_t arg_0x1abca318);# 55 "D:\\Crossbow\\cygwin\\opt\\MoteWorks\\tos\\platform\\micazc\\FramerM.nc"enum FramerM$__nesc_unnamed4276 {  FramerM$HDLC_QUEUESIZE = 2,   FramerM$HDLC_MTU = sizeof(TOS_Msg ) - 5,   FramerM$HDLC_F

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -