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

📄 app.c

📁 无线网络传感器基站通用节点测试程序.包含基站接口和主模块程序.
💻 C
📖 第 1 页 / 共 5 页
字号:
#define dbg(mode, format, ...) ((void)0)#define dbg_clear(mode, format, ...) ((void)0)#define dbg_active(mode) 0# 60 "/usr/local/avr/include/inttypes.h"typedef signed char int8_t;typedef unsigned char uint8_t;# 83 "/usr/local/avr/include/inttypes.h" 3typedef int int16_t;typedef unsigned int uint16_t;typedef long int32_t;typedef unsigned long uint32_t;#line 117typedef long long int64_t;typedef unsigned long long uint64_t;#line 134typedef int16_t intptr_t;typedef uint16_t uintptr_t;# 213 "/usr/local/lib/gcc-lib/avr/3.3-tinyos/include/stddef.h" 3typedef unsigned int size_t;#line 325typedef int wchar_t;# 60 "/usr/local/avr/include/stdlib.h"typedef struct __nesc_unnamed4242 {  int quot;  int rem;} div_t;typedef struct __nesc_unnamed4243 {  long quot;  long rem;} ldiv_t;typedef int (*__compar_fn_t)(const void *, const void *);# 151 "/usr/local/lib/gcc-lib/avr/3.3-tinyos/include/stddef.h" 3typedef int ptrdiff_t;# 85 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/tos.h"typedef unsigned char bool;enum __nesc_unnamed4244 {  FALSE = 0,   TRUE = 1};uint16_t TOS_LOCAL_ADDRESS = 1;enum __nesc_unnamed4245 {  FAIL = 0,   SUCCESS = 1};static inline uint8_t rcombine(uint8_t r1, uint8_t r2);typedef uint8_t  result_t;static inline result_t rcombine(result_t r1, result_t r2);static inline result_t rcombine3(result_t r1, result_t r2, result_t r3);#line 128enum __nesc_unnamed4246 {  NULL = 0x0};# 39 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/hal.h"typedef unsigned char BOOL;typedef unsigned char BYTE;typedef unsigned short WORD;typedef unsigned long DWORD;typedef unsigned char UINT8;typedef unsigned short UINT16;typedef unsigned long UINT32;typedef signed char INT8;typedef signed short INT16;typedef signed long INT32;#line 501typedef struct __nesc_unnamed4247 {  BYTE SRCADDRH;  BYTE SRCADDRL;  BYTE DESTADDRH;  BYTE DESTADDRL;  BYTE VLEN : 3;  BYTE LENH : 5;  BYTE LENL : 8;  BYTE WORDSIZE : 1;  BYTE TMODE : 2;  BYTE TRIG : 5;  BYTE SRCINC : 2;  BYTE DESTINC : 2;  BYTE IRQMASK : 1;  BYTE M8 : 1;  BYTE PRIORITY : 2;} DMA_DESC;#line 1140BOOL halSetTimer2Period(BYTE mode, DWORD period);#line 1506BOOL halRfConfig(UINT32 frequency);# 89 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/ioCC2430.h"typedef int sfr;#line 125sfr U0CSR = 0x86;#line 139sfr P1 = 0x90;sfr RFIM = 0x91;sfr T2CMP = 0x94;sfr IEN2 = 0x9A;sfr S1CON = 0x9B;sfr T2PEROF0 = 0x9C;sfr T2PEROF1 = 0x9D;sfr T2PEROF2 = 0x9E;sfr T2OF0 = 0xA1;sfr T2OF1 = 0xA2;sfr T2OF2 = 0xA3;sfr T2CAPLPL = 0xA4;sfr T2CAPHPH = 0xA5;sfr T2TLD = 0xA6;sfr T2THD = 0xA7;#line 194sfr SLEEP = 0xBE;sfr U0DBUF = 0xC1;sfr U0BAUD = 0xC2;sfr T2CNF = 0xC3;sfr U0UCR = 0xC4;sfr U0GCR = 0xC5;sfr CLKCON = 0xC6;#line 217sfr PSW = 0xD0;sfr RFD = 0xD9;sfr RFST = 0xE1;sfr RFIF = 0xE9;sfr PERCFG = 0xF1;sfr P0SEL = 0xF3;sfr P1SEL = 0xF4;sfr P2SEL = 0xF5;sfr P1DIR = 0xFE;typedef int sbit;#line 295sbit URX0IF = 0x8B;sbit RFERRIF = 0x89;#line 325sbit EA = 0xAF;sbit URX0IE = 0xAA;sbit RFERRIE = 0xA8;#line 350sbit T2IF = 0xC2;#line 381sbit UTX0IF = 0xE9;static inline # 100 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/CC2430hardware.h"void TOSH_wait(void);static inline void TOSH_sleep(void);typedef uint8_t __nesc_atomic_t;__inline __nesc_atomic_t  __nesc_atomic_start(void );__inline void  __nesc_atomic_end(__nesc_atomic_t oldSreg);static __inline void __nesc_enable_interrupt(void);# 34 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/hardware.h"static __inline void TOSH_SET_RED_LED_PIN(void);#line 34static __inline void TOSH_CLR_RED_LED_PIN(void);#line 34static __inline void TOSH_MAKE_RED_LED_OUTPUT(void);#line 34static __inline void TOSH_MAKE_RED_LED_GIO(void);static __inline void TOSH_SET_GREEN_LED_PIN(void);#line 35static __inline void TOSH_CLR_GREEN_LED_PIN(void);#line 35static __inline void TOSH_MAKE_GREEN_LED_OUTPUT(void);#line 35static __inline void TOSH_MAKE_GREEN_LED_GIO(void);static __inline void TOSH_SET_YELLOW_LED_PIN(void);#line 36static __inline void TOSH_CLR_YELLOW_LED_PIN(void);#line 36static __inline void TOSH_MAKE_YELLOW_LED_OUTPUT(void);#line 36static __inline void TOSH_MAKE_YELLOW_LED_GIO(void);static inline #line 57void TOSH_SET_PIN_DIRECTIONS(void );#line 74enum __nesc_unnamed4248 {  TOSH_ADC_PORTMAPSIZE = 9};# 54 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/types/dbg_modes.h"typedef long long TOS_dbg_mode;enum __nesc_unnamed4249 {  DBG_ALL = ~0ULL,   DBG_BOOT = 1ULL << 0,   DBG_CLOCK = 1ULL << 1,   DBG_TASK = 1ULL << 2,   DBG_SCHED = 1ULL << 3,   DBG_SENSOR = 1ULL << 4,   DBG_LED = 1ULL << 5,   DBG_CRYPTO = 1ULL << 6,   DBG_ROUTE = 1ULL << 7,   DBG_AM = 1ULL << 8,   DBG_CRC = 1ULL << 9,   DBG_PACKET = 1ULL << 10,   DBG_ENCODE = 1ULL << 11,   DBG_RADIO = 1ULL << 12,   DBG_LOG = 1ULL << 13,   DBG_ADC = 1ULL << 14,   DBG_I2C = 1ULL << 15,   DBG_UART = 1ULL << 16,   DBG_PROG = 1ULL << 17,   DBG_SOUNDER = 1ULL << 18,   DBG_TIME = 1ULL << 19,   DBG_SIM = 1ULL << 21,   DBG_QUEUE = 1ULL << 22,   DBG_SIMRADIO = 1ULL << 23,   DBG_HARD = 1ULL << 24,   DBG_MEM = 1ULL << 25,   DBG_USR1 = 1ULL << 27,   DBG_USR2 = 1ULL << 28,   DBG_USR3 = 1ULL << 29,   DBG_TEMP = 1ULL << 30,   DBG_ERROR = 1ULL << 31,   DBG_NONE = 0,   DBG_DEFAULT = DBG_ALL};# 59 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/sched.c"typedef struct __nesc_unnamed4250 {  void (*tp)(void);} TOSH_sched_entry_T;enum __nesc_unnamed4251 {  TOSH_MAX_TASKS = 8,   TOSH_TASK_BITMASK = TOSH_MAX_TASKS - 1};TOSH_sched_entry_T TOSH_queue[TOSH_MAX_TASKS];volatile uint8_t TOSH_sched_full;volatile uint8_t TOSH_sched_free;static inline void TOSH_wait(void );static inline void TOSH_sleep(void );static inline void TOSH_sched_init(void );#line 98bool  TOS_post(void (*tp)(void));static inline #line 139bool TOSH_run_next_task(void);static inline #line 162void TOSH_run_task(void);# 46 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/AM.h"enum __nesc_unnamed4252 {  TOS_BCAST_ADDR = 0xffff,   TOS_UART_ADDR = 0x007e};enum __nesc_unnamed4253 {  TOS_DEFAULT_AM_GROUP = 0x7d};uint8_t TOS_AM_GROUP = TOS_DEFAULT_AM_GROUP;#line 71typedef struct TOS_Msg {  uint8_t length;  uint8_t fcfhi;  uint8_t fcflo;  uint8_t dsn;  uint16_t destpan;  uint16_t addr;  uint8_t type;  uint8_t group;  int8_t data[28];  uint8_t strength;  uint8_t lqi;  bool crc;  bool ack;  uint16_t time;} TOS_Msg;enum __nesc_unnamed4254 {  MSG_HEADER_SIZE = (size_t )& ((struct TOS_Msg *)0)->data - 1,   MSG_FOOTER_SIZE = 2,   MSG_DATA_SIZE = (size_t )& ((struct TOS_Msg *)0)->strength + sizeof(uint16_t ),   DATA_LENGTH = 28,   LENGTH_BYTE_NUMBER = (size_t )& ((struct TOS_Msg *)0)->length + 1};typedef TOS_Msg *TOS_MsgPtr;static inline uint8_t TOS_MsgLength(uint8_t type);static # 12 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/byteorder.h"__inline int is_host_lsb(void);static __inline uint16_t toLSB16(uint16_t a);static __inline uint16_t fromLSB16(uint16_t a);# 9 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/CC2430Timer.h"enum __nesc_unnamed4255 {  CC2430TIMER_CM_NONE = 0,   CC2430TIMER_CM_RISING = 1,   CC2430TIMER_CM_FALLING = 2,   CC2430TIMER_CM_BOTH = 3,   CC2430TIMER34_FREE_RUN_MODE = 0,   CC2430TIMER34_DOWN_MODE = 1,   CC2430TIMER34_CONTINUOUS_UP_MODE = 2,   CC2430TIMER34_UPDOWN_MODE = 3,   CC2430TIMER1_STOP_MODE = 0,   CC2430TIMER1_FREE_RUN_MODE = 1,   CC2430TIMER1_CONTINUOUS_UP_MODE = 2,   CC2430TIMER1_UPDOWN_MODE = 3,   CC2430TIMER_TACLK = 0,   CC2430TIMER_TBCLK = 0,   CC2430TIMER_ACLK = 1,   CC2430TIMER_SMCLK = 2,   CC2430TIMER_INCLK = 3,   CC2430TIMER1_CLOCKDIV_1 = 0,   CC2430TIMER1_CLOCKDIV_8 = 1,   CC2430TIMER1_CLOCKDIV_32 = 2,   CC2430TIMER1_CLOCKDIV_128 = 3,   CC2430TIMER34_CLOCKDIV_1 = 0,   CC2430TIMER34_CLOCKDIV_2 = 1,   CC2430TIMER34_CLOCKDIV_4 = 2,   CC2430TIMER34_CLOCKDIV_8 = 3,   CC2430TIMER34_CLOCKDIV_16 = 4,   CC2430TIMER34_CLOCKDIV_32 = 5,   CC2430TIMER34_CLOCKDIV_64 = 6,   CC2430TIMER34_CLOCKDIV_128 = 7};#line 63typedef struct __nesc_unnamed4256 {  int t2cmpim : 1;  int t2perim : 1;  int t2ofcmpim : 1;  int  : 3;  int t2if : 1;  int t2ie : 1;  int t2cmpif : 1;  int t2perif : 1;  int t2ofcmpif : 1;  int  : 1;  int t2cmsel : 1;  int  : 1;  int t2sync : 1;  int t2run : 1;} CC2430Timer2Control_t;typedef struct __nesc_unnamed4257 {  int t1ifg : 1;  int t1ie : 1;  int t1clr : 1;  int _unused0 : 1;  int mc : 2;  int id : 2;  int tassel : 2;  int _unused1 : 6;} CC2430Timer1Control_t;typedef struct __nesc_unnamed4258 {  int tbifg : 1;  int tbie : 1;  int tbclr : 1;  int _unused0 : 1;  int mc : 2;  int id : 2;  int tbssel : 2;  int _unused1 : 1;  int cntl : 2;  int tbclgrp : 2;  int _unused2 : 1;} CC2430Timer34Control_t;static  result_t HPLInit$init(void);static  result_t GenericBaseM$UARTSend$sendDone(TOS_MsgPtr arg_0xa24e528, result_t arg_0xa24e678);static  TOS_MsgPtr GenericBaseM$RadioReceive$receive(TOS_MsgPtr arg_0xa24f9a8);static  result_t GenericBaseM$RadioSend$sendDone(TOS_MsgPtr arg_0xa24e528, result_t arg_0xa24e678);static  result_t GenericBaseM$StdControl$init(void);static  result_t GenericBaseM$StdControl$start(void);static  TOS_MsgPtr GenericBaseM$UARTReceive$receive(TOS_MsgPtr arg_0xa24f9a8);static  result_t CC2430RadioM$SplitControl$default$initDone(void);static  result_t CC2430RadioM$SplitControl$init(void);static  result_t CC2430RadioM$SplitControl$default$startDone(void);static  result_t CC2430RadioM$SplitControl$start(void);static    result_t CC2430RadioM$_FIFOP$fired(void);static   result_t CC2430RadioM$_SFD$captured(uint16_t arg_0xa2b3640);static  result_t CC2430RadioM$Send$send(TOS_MsgPtr arg_0xa24e010);static   void CC2430RadioM$RadioReceiveCoordinator$default$startSymbol(uint8_t arg_0xa295ba0, uint8_t arg_0xa295ce8, TOS_MsgPtr arg_0xa295e38);static  result_t CC2430RadioM$CC2430SplitControl$initDone(void);static  result_t CC2430RadioM$CC2430SplitControl$startDone(void);static   void CC2430RadioM$RadioSendCoordinator$default$startSymbol(uint8_t arg_0xa295ba0, uint8_t arg_0xa295ce8, TOS_MsgPtr arg_0xa295e38);static  result_t CC2430RadioM$StdControl$init(void);static  result_t CC2430RadioM$StdControl$start(void);static  result_t CC2430ControlM$SplitControl$init(void);static  result_t CC2430ControlM$SplitControl$start(void);static   result_t CC2430ControlM$CC2430Control$RxMode(void);static  result_t CC2430ControlM$CC2430Control$setShortAddress(uint16_t arg_0xa28eb98);static    result_t CC2430ControlM$_CCA$fired(void);static   result_t HPLCC2430RFInterruptM$_FIFOP$disable(void);static   result_t HPLCC2430RFInterruptM$_FIFOP$startWait(void);static   result_t HPLCC2430RFInterruptM$_SFD$disable(void);static   result_t HPLCC2430RFInterruptM$_SFD$enableCapture(bool arg_0xa2b2f50);static   result_t HPLCC2430RFInterruptM$_CCA$startWait(void);static   uint16_t CC2430TimerM$Capture2$getEvent(void);static   void CC2430TimerM$Capture2$clearOverflow(void);static   void CC2430TimerM$Control2$setControlAsCapture(bool arg_0xa35f748);static   void CC2430TimerM$Control2$enableEvents(void);static   void CC2430TimerM$Control2$disableEvents(void);static   void CC2430TimerM$Control2$clearPendingInterrupt(void);static   result_t LedsC$Leds$yellowOff(void);static   result_t LedsC$Leds$yellowOn(void);static   result_t LedsC$Leds$init(void);static   result_t LedsC$Leds$greenOff(void);static   result_t LedsC$Leds$redOff(void);static   result_t LedsC$Leds$greenToggle(void);static   result_t LedsC$Leds$yellowToggle(void);static   result_t LedsC$Leds$redToggle(void);static   result_t LedsC$Leds$redOn(void);static   result_t LedsC$Leds$greenOn(void);static  result_t NoCRCPacket$Send$send(TOS_MsgPtr arg_0xa24e010);static  result_t NoCRCPacket$SendVarLenPacket$default$sendDone(uint8_t *arg_0xa3bca08, result_t arg_0xa3bcb58);static   result_t NoCRCPacket$ByteComm$txDone(void);static   result_t NoCRCPacket$ByteComm$txByteReady(bool arg_0xa3cb108);static   result_t NoCRCPacket$ByteComm$rxByteReady(uint8_t arg_0xa3ca938, bool arg_0xa3caa80, uint16_t arg_0xa3cabd8);static  result_t NoCRCPacket$Control$init(void);static  result_t NoCRCPacket$Control$start(void);static  result_t NoCRCPacket$txBytes(uint8_t *arg_0xa3bd390, uint8_t arg_0xa3bd4e0);static   result_t UARTM$HPLUART$get(uint8_t arg_0xa4030c0);static   result_t UARTM$HPLUART$putDone(void);static   result_t UARTM$ByteComm$txByte(uint8_t arg_0xa3ca4a8);static  result_t UARTM$Control$init(void);static  result_t UARTM$Control$start(void);static   result_t HPLUART0M$UART$init(void);static   result_t HPLUART0M$UART$put(uint8_t arg_0xa402bc0);static  # 47 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/RealMain.nc"result_t RealMain$hardwareInit(void);static  # 63 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"result_t RealMain$StdControl$init(void);static  result_t RealMain$StdControl$start(void);# 57 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/RealMain.nc"int   main(void);static inline  # 10 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/CC2430/HPLInit.nc"result_t HPLInit$init(void);static  

⌨️ 快捷键说明

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