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

📄 app.c

📁 针对wsn网络
💻 C
📖 第 1 页 / 共 5 页
字号:
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0xda, 0x80, 0x00, 0xda, 0x74, 0xf1, 0x03, 0xe4, 0x88, 0x02, 0xFF, 0x70, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0xcb, 0x20, 0x00, 0xcb, 0x15, 0xbb, 0x03, 0x9c, 0x88, 0x02, 0xFF, 0x68, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0xdb, 0x00, 0x00, 0xda, 0xf4, 0xf1, 0x03, 0xe4, 0x88, 0x02, 0xFF, 0x70, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0xdb, 0x40, 0x00, 0xdb, 0x34, 0xf1, 0x03, 0xe4, 0x88, 0x02, 0xFF, 0x70, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0x5e, 0x00, 0x00, 0x5d, 0xfb, 0x43, 0x01, 0xab, 0x88, 0x02, 0xFF, 0x30, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0xcc, 0x00, 0x00, 0xcb, 0xf5, 0xbb, 0x03, 0x9c, 0x88, 0x02, 0xFF, 0x68, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0x7d, 0xa0, 0x00, 0x7d, 0x99, 0xae, 0x02, 0x39, 0x88, 0x02, 0xFF, 0x40, 0x10, 0x26, 0xa1, 0x6f, ((5 << 4) | (1 << 2)) | (3 << 0), 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, TRUE }, { 0x31, 0x45, 0x60, 0x00, 0x45, 0x55, 0xbb, 0x03, 0x9c, (8 << 4) | (4 << 2), 1 << 1, 0xFF, 0x68, 0xe << 4, (1 << 5) | (6 << 0), (1 << 7) | (33 << 0), (((3 << 5) | (1 << 3)) | (3 << 1)) | (1 << 0), ((5 << 4) | (1 << 2)) | (1 << 0), (0x7 << 4) | (0x0 << 0), 1 << 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (8 << 4) | (1 << 0), TRUE } };static # 101 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/mica2/hardware.h"void __inline TOSH_uwait(int u_sec);#line 116static __inline void TOSH_SET_RED_LED_PIN(void);#line 116static __inline void TOSH_CLR_RED_LED_PIN(void);#line 116static __inline void TOSH_MAKE_RED_LED_OUTPUT(void);static __inline void TOSH_SET_GREEN_LED_PIN(void);#line 117static __inline void TOSH_CLR_GREEN_LED_PIN(void);#line 117static __inline void TOSH_MAKE_GREEN_LED_OUTPUT(void);static __inline void TOSH_SET_YELLOW_LED_PIN(void);#line 118static __inline void TOSH_MAKE_YELLOW_LED_OUTPUT(void);static __inline void TOSH_CLR_SERIAL_ID_PIN(void);#line 120static __inline void TOSH_MAKE_SERIAL_ID_INPUT(void);static __inline void TOSH_MAKE_CC_CHP_OUT_INPUT(void);static __inline void TOSH_SET_CC_PDATA_PIN(void);#line 126static __inline void TOSH_CLR_CC_PDATA_PIN(void);#line 126static __inline int TOSH_READ_CC_PDATA_PIN(void);#line 126static __inline void TOSH_MAKE_CC_PDATA_OUTPUT(void);#line 126static __inline void TOSH_MAKE_CC_PDATA_INPUT(void);static __inline void TOSH_SET_CC_PCLK_PIN(void);#line 127static __inline void TOSH_CLR_CC_PCLK_PIN(void);#line 127static __inline void TOSH_MAKE_CC_PCLK_OUTPUT(void);static __inline void TOSH_SET_CC_PALE_PIN(void);#line 128static __inline void TOSH_CLR_CC_PALE_PIN(void);#line 128static __inline void TOSH_MAKE_CC_PALE_OUTPUT(void);static __inline void TOSH_SET_INT1_PIN(void);#line 138static __inline void TOSH_CLR_INT1_PIN(void);#line 138static __inline void TOSH_MAKE_INT1_OUTPUT(void);#line 138static __inline void TOSH_MAKE_INT1_INPUT(void);static __inline void TOSH_SET_INT2_PIN(void);#line 139static __inline void TOSH_CLR_INT2_PIN(void);#line 139static __inline void TOSH_MAKE_INT2_OUTPUT(void);#line 139static __inline void TOSH_MAKE_INT2_INPUT(void);static __inline void TOSH_MAKE_MOSI_OUTPUT(void);#line 143static __inline void TOSH_MAKE_MOSI_INPUT(void);static __inline void TOSH_MAKE_MISO_OUTPUT(void);#line 144static __inline void TOSH_MAKE_MISO_INPUT(void);static __inline void TOSH_MAKE_SPI_OC1C_INPUT(void);static __inline void TOSH_MAKE_SPI_SCK_INPUT(void);static __inline void TOSH_MAKE_PW0_OUTPUT(void);static __inline void TOSH_MAKE_PW1_OUTPUT(void);static __inline void TOSH_MAKE_PW2_OUTPUT(void);static __inline void TOSH_MAKE_PW3_OUTPUT(void);static __inline void TOSH_MAKE_PW4_OUTPUT(void);static __inline void TOSH_MAKE_PW5_OUTPUT(void);static __inline void TOSH_MAKE_PW6_OUTPUT(void);static __inline void TOSH_MAKE_PW7_OUTPUT(void);static inline #line 171void TOSH_SET_PIN_DIRECTIONS(void );#line 201enum __nesc_unnamed4248 {  TOSH_ADC_PORTMAPSIZE = 12};enum __nesc_unnamed4249 {  TOSH_ACTUAL_CC_RSSI_PORT = 0,   TOSH_ACTUAL_VOLTAGE_PORT = 7,   TOSH_ACTUAL_BANDGAP_PORT = 30,   TOSH_ACTUAL_GND_PORT = 31};enum __nesc_unnamed4250 {  TOS_ADC_CC_RSSI_PORT = 0,   TOS_ADC_VOLTAGE_PORT = 7,   TOS_ADC_BANDGAP_PORT = 10,   TOS_ADC_GND_PORT = 11};# 54 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/types/dbg_modes.h"typedef long long TOS_dbg_mode;enum __nesc_unnamed4251 {  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_POWER = 1ULL << 20,   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_unnamed4252 {  void (*tp)(void);} TOSH_sched_entry_T;enum __nesc_unnamed4253 {  TOSH_MAX_TASKS = 8,   TOSH_TASK_BITMASK = TOSH_MAX_TASKS - 1};volatile TOSH_sched_entry_T TOSH_queue[TOSH_MAX_TASKS];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 102bool  TOS_post(void (*tp)(void));static inline #line 134bool TOSH_run_next_task(void);static inline #line 157void TOSH_run_task(void);# 28 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/system/Ident.h"enum __nesc_unnamed4254 {  IDENT_MAX_PROGRAM_NAME_LENGTH = 10};typedef struct __nesc_unnamed4255 {  uint32_t unix_time;  uint32_t user_hash;  char program_name[IDENT_MAX_PROGRAM_NAME_LENGTH];} Ident_t;# 33 "Surge.h"int INITIAL_TIMER_RATE = 1000;#line 51typedef struct SurgeMsg {  uint8_t type;  uint16_t reading;} __attribute((packed))  SurgeMsg;enum __nesc_unnamed4256 {  AM_SURGEMSG = 17};# 39 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.h"enum __nesc_unnamed4257 {  TIMER_REPEAT = 0,   TIMER_ONE_SHOT = 1,   NUM_TIMERS = 8};# 49 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/types/AM.h"enum __nesc_unnamed4258 {  TOS_BCAST_ADDR = 0xffff,   TOS_UART_ADDR = 0x007e};enum __nesc_unnamed4259 {  TOS_DEFAULT_AM_GROUP = 125};uint8_t TOS_AM_GROUP = TOS_DEFAULT_AM_GROUP;#line 84typedef struct TOS_Msg {  uint16_t addr;  uint8_t type;  uint8_t group;  uint8_t length;  int8_t data[29];  uint16_t crc;  uint16_t strength;  uint8_t ack;  uint16_t time;  uint8_t sendSecurityMode;  uint8_t receiveSecurityMode;} TOS_Msg;typedef struct TOS_Msg_TinySecCompat {  uint16_t addr;  uint8_t type;  uint8_t length;  uint8_t group;  int8_t data[29];  uint16_t crc;  uint16_t strength;  uint8_t ack;  uint16_t time;  uint8_t sendSecurityMode;  uint8_t receiveSecurityMode;} TOS_Msg_TinySecCompat;typedef struct TinySec_Msg {  uint16_t addr;  uint8_t type;  uint8_t length;  uint8_t iv[4];  uint8_t enc[29];  uint8_t mac[4];  uint8_t calc_mac[4];  uint8_t ack_byte;  bool cryptoDone;  bool receiveDone;  bool MACcomputed;} __attribute((packed))  TinySec_Msg;enum __nesc_unnamed4260 {  MSG_DATA_SIZE = (size_t )& ((struct TOS_Msg *)0)->crc + sizeof(uint16_t ),   TINYSEC_MSG_DATA_SIZE = (size_t )& ((struct TinySec_Msg *)0)->mac + 4,   DATA_LENGTH = 29,   LENGTH_BYTE_NUMBER = (size_t )& ((struct TOS_Msg *)0)->length + 1,   TINYSEC_NODE_ID_SIZE = sizeof(uint16_t )};enum __nesc_unnamed4261 {  TINYSEC_AUTH_ONLY = 1,   TINYSEC_ENCRYPT_AND_AUTH = 2,   TINYSEC_DISABLED = 3,   TINYSEC_RECEIVE_AUTHENTICATED = 4,   TINYSEC_RECEIVE_CRC = 5,   TINYSEC_RECEIVE_ANY = 6,   TINYSEC_ENABLED_BIT = 128,   TINYSEC_ENCRYPT_ENABLED_BIT = 64} __attribute((packed)) ;typedef TOS_Msg *TOS_MsgPtr;# 35 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/ADC.h"enum __nesc_unnamed4262 {  TOS_ADCSample3750ns = 0,   TOS_ADCSample7500ns = 1,   TOS_ADCSample15us = 2,   TOS_ADCSample30us = 3,   TOS_ADCSample60us = 4,   TOS_ADCSample120us = 5,   TOS_ADCSample240us = 6,   TOS_ADCSample480us = 7};# 33 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/mica128/Clock.h"enum __nesc_unnamed4263 {  TOS_I1000PS = 32, TOS_S1000PS = 1,   TOS_I100PS = 40, TOS_S100PS = 2,   TOS_I10PS = 101, TOS_S10PS = 3,   TOS_I1024PS = 0, TOS_S1024PS = 3,   TOS_I512PS = 1, TOS_S512PS = 3,   TOS_I256PS = 3, TOS_S256PS = 3,   TOS_I128PS = 7, TOS_S128PS = 3,   TOS_I64PS = 15, TOS_S64PS = 3, 

⌨️ 快捷键说明

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