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

📄 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;# 91 "C:/PROGRA~1/UCB/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 #line 133result_t rcombine4(result_t r1, result_t r2, result_t r3, result_t r4);enum __nesc_unnamed4246 {  NULL = 0x0};# 81 "/usr/local/avr/include/avr/pgmspace.h"typedef void __attribute((__progmem__)) prog_void;typedef char __attribute((__progmem__)) prog_char;typedef unsigned char __attribute((__progmem__)) prog_uchar;typedef int __attribute((__progmem__)) prog_int;typedef long __attribute((__progmem__)) prog_long;typedef long long __attribute((__progmem__)) prog_long_long;# 124 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/avrhardware.h"enum __nesc_unnamed4247 {  TOSH_period16 = 0x00,   TOSH_period32 = 0x01,   TOSH_period64 = 0x02,   TOSH_period128 = 0x03,   TOSH_period256 = 0x04,   TOSH_period512 = 0x05,   TOSH_period1024 = 0x06,   TOSH_period2048 = 0x07};static inline 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);# 235 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420Const.h"enum __nesc_unnamed4248 {  CP_MAIN = 0,   CP_MDMCTRL0,   CP_MDMCTRL1,   CP_RSSI,   CP_SYNCWORD,   CP_TXCTRL,   CP_RXCTRL0,   CP_RXCTRL1,   CP_FSCTRL,   CP_SECCTRL0,   CP_SECCTRL1,   CP_BATTMON,   CP_IOCFG0,   CP_IOCFG1};# 116 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/micaz/hardware.h"static __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_MAKE_GREEN_LED_OUTPUT(void);static __inline void TOSH_SET_YELLOW_LED_PIN(void);#line 118static __inline void TOSH_CLR_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_RSTN_OUTPUT(void);static __inline void TOSH_MAKE_CC_VREN_OUTPUT(void);static __inline void TOSH_MAKE_CC_FIFOP1_INPUT(void);static __inline void TOSH_MAKE_CC_CCA_INPUT(void);static __inline void TOSH_MAKE_CC_SFD_INPUT(void);static __inline void TOSH_MAKE_CC_CS_INPUT(void);static __inline void TOSH_MAKE_CC_FIFO_INPUT(void);static __inline void TOSH_MAKE_RADIO_CCA_INPUT(void);static __inline void TOSH_SET_FLASH_SELECT_PIN(void);#line 140static __inline void TOSH_MAKE_FLASH_SELECT_OUTPUT(void);static __inline void TOSH_MAKE_FLASH_CLK_OUTPUT(void);static __inline void TOSH_MAKE_FLASH_OUT_OUTPUT(void);static __inline void TOSH_MAKE_MOSI_OUTPUT(void);static __inline void TOSH_MAKE_MISO_INPUT(void);static __inline void TOSH_MAKE_SPI_SCK_OUTPUT(void);static __inline void TOSH_MAKE_PW0_OUTPUT(void);static __inline void TOSH_SET_PW1_PIN(void);#line 159static __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 180void TOSH_SET_PIN_DIRECTIONS(void );#line 236enum __nesc_unnamed4249 {  TOSH_ADC_PORTMAPSIZE = 12};enum __nesc_unnamed4250 {  TOSH_ACTUAL_BANDGAP_PORT = 30,   TOSH_ACTUAL_GND_PORT = 31};enum __nesc_unnamed4251 {  TOS_ADC_BANDGAP_PORT = 10,   TOS_ADC_GND_PORT = 11};# 54 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/types/dbg_modes.h"typedef long long TOS_dbg_mode;enum __nesc_unnamed4252 {  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:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/sched.c"typedef struct __nesc_unnamed4253 {  void (*tp)(void);} TOSH_sched_entry_T;enum __nesc_unnamed4254 {  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 100bool  TOS_post(void (*tp)(void));static inline #line 132bool TOSH_run_next_task(void);static inline #line 155void TOSH_run_task(void);# 28 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/Ident.h"enum __nesc_unnamed4255 {  IDENT_MAX_PROGRAM_NAME_LENGTH = 10};typedef struct __nesc_unnamed4256 {  uint32_t unix_time;  uint32_t user_hash;  char program_name[IDENT_MAX_PROGRAM_NAME_LENGTH];} Ident_t;# 43 "OscopeMsg.h"enum __nesc_unnamed4257 {  BUFFER_SIZE = 10};struct OscopeMsg {  uint16_t sourceMoteID;  uint16_t lastSampleNumber;  uint16_t channel;  uint16_t data[BUFFER_SIZE];};struct OscopeResetMsg {};enum __nesc_unnamed4258 {  AM_OSCOPEMSG = 10,   AM_OSCOPERESETMSG = 32};# 39 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.h"enum __nesc_unnamed4259 {  TIMER_REPEAT = 0,   TIMER_ONE_SHOT = 1,   NUM_TIMERS = 3};# 35 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/ADC.h"enum __nesc_unnamed4260 {  TOS_ADCSample3750ns = 0,   TOS_ADCSample7500ns = 1,   TOS_ADCSample15us = 2,   TOS_ADCSample30us = 3,   TOS_ADCSample60us = 4,   TOS_ADCSample120us = 5,   TOS_ADCSample240us = 6,   TOS_ADCSample480us = 7};# 50 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/micaz/AM.h"enum __nesc_unnamed4261 {  TOS_BCAST_ADDR = 0xffff,   TOS_UART_ADDR = 0x007e};#line 66enum __nesc_unnamed4262 {  TOS_DEFAULT_AM_GROUP = 0x7d};uint8_t TOS_AM_GROUP = TOS_DEFAULT_AM_GROUP;#line 92typedef 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[29];  uint8_t strength;  uint8_t lqi;  bool crc;  uint8_t ack;  uint16_t time;} TOS_Msg;typedef struct TinySec_Msg {  uint8_t invalid;} TinySec_Msg;enum __nesc_unnamed4263 {  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 = 29,   LENGTH_BYTE_NUMBER = (size_t )& ((struct TOS_Msg *)0)->length + 1,   TOS_HEADER_SIZE = 5};typedef TOS_Msg *TOS_MsgPtr;# 33 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica128/Clock.h"enum __nesc_unnamed4264 {  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,   TOS_I32PS = 31, TOS_S32PS = 3,   TOS_I16PS = 63, TOS_S16PS = 3,   TOS_I8PS = 127, TOS_S8PS = 3,   TOS_I4PS = 255, TOS_S4PS = 3,   TOS_I2PS = 15, TOS_S2PS = 7,   TOS_I1PS = 31, TOS_S1PS = 7,   TOS_I0PS = 0, TOS_S0PS = 0};enum __nesc_unnamed4265 {  DEFAULT_SCALE = 3, DEFAULT_INTERVAL = 127};# 47 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/sensorboards/basicsb/sensorboard.h"static __inline void TOSH_SET_PHOTO_CTL_PIN(void);#line 47static __inline void TOSH_MAKE_PHOTO_CTL_OUTPUT(void);#line 64enum __nesc_unnamed4266 {  TOSH_ACTUAL_PHOTO_PORT = 6,   TOSH_ACTUAL_TEMP_PORT = 5,   TOSH_ACTUAL_PZT_PORT = 3};enum __nesc_unnamed4267 {  TOS_ADC_PHOTO_PORT = 1,   TOS_ADC_TEMP_PORT = 2,   TOS_ADC_PZT_PORT = 3};# 31 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/crc.h"uint16_t __attribute((__progmem__)) crcTable[256] = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 };static inline uint16_t crcByte(uint16_t oldCrc, uint8_t byte);static  result_t PotM$Pot$init(uint8_t arg_0xa2c9b58);static  result_t HPLPotC$Pot$finalise(void);static  result_t HPLPotC$Pot$decrease(void);static  result_t HPLPotC$Pot$increase(void);static  result_t HPLInit$init(void);static  result_t OscilloscopeM$DataMsg$sendDone(TOS_MsgPtr arg_0xa32e6c8, result_t arg_0xa32e818);static  TOS_MsgPtr OscilloscopeM$ResetCounterMsg$receive(TOS_MsgPtr arg_0xa32fc70);static   result_t OscilloscopeM$ADC$dataReady(uint16_t arg_0xa329cc0);static  result_t OscilloscopeM$StdControl$init(void);static  result_t OscilloscopeM$StdControl$start(void);static  result_t OscilloscopeM$Timer$fired(void);static   result_t TimerM$Clock$fire(void);static  result_t TimerM$StdControl$init(void);static  result_t TimerM$StdControl$start(void);static  result_t TimerM$Timer$default$fired(uint8_t arg_0xa34a5a0);static  result_t TimerM$Timer$start(uint8_t arg_0xa34a5a0, char arg_0xa30b958, uint32_t arg_0xa30bab0);static   void HPLClock$Clock$setInterval(uint8_t arg_0xa35cbe8);static   uint8_t HPLClock$Clock$readCounter(void);static   result_t HPLClock$Clock$setRate(char arg_0xa35c0e8, char arg_0xa35c228);static   uint8_t HPLPowerManagementM$PowerManagement$adjustPower(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$yellowToggle(void);static   result_t LedsC$Leds$redOn(void);static  result_t PhotoM$StdControl$init(void);static  result_t PhotoM$StdControl$start(void);static   result_t ADCREFM$HPLADC$dataReady(uint16_t arg_0xa41a388);static   result_t ADCREFM$CalADC$default$dataReady(uint8_t arg_0xa3fb138, uint16_t arg_0xa329cc0);

⌨️ 快捷键说明

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