📄 app.c
字号:
#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};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);#line 140enum __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;__nesc_atomic_t __nesc_atomic_start(void );void __nesc_atomic_end(__nesc_atomic_t oldSreg);__inline __nesc_atomic_t __nesc_atomic_start(void );__inline void __nesc_atomic_end(__nesc_atomic_t oldSreg);static __inline void __nesc_enable_interrupt(void);# 120 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica2/hardware.h"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);#line 144static __inline void TOSH_MAKE_MISO_INPUT(void);static __inline void TOSH_MAKE_SPI_OC1C_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:/PROGRA~1/UCB/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:/PROGRA~1/UCB/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 );bool TOS_post(void (*tp)(void));#line 106bool TOS_post(void (*tp)(void));static inline #line 140bool TOSH_run_next_task(void);static inline #line 163void TOSH_run_task(void);# 28 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/Ident.h"enum __nesc_unnamed4254 { IDENT_MAX_PROGRAM_NAME_LENGTH = 17};typedef struct __nesc_unnamed4255 { uint32_t unix_time; uint32_t user_hash; char program_name[IDENT_MAX_PROGRAM_NAME_LENGTH];} Ident_t;# 39 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.h"enum __nesc_unnamed4256 { TIMER_REPEAT = 0, TIMER_ONE_SHOT = 1, NUM_TIMERS = 1};# 33 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica128/Clock.h"enum __nesc_unnamed4257 { 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_unnamed4258 { DEFAULT_SCALE = 3, DEFAULT_INTERVAL = 127};static result_t cc1km$HPLUART$get(uint8_t arg_0xa2dfed0);static result_t cc1km$HPLUART$putDone(void);static result_t cc1km$StdControl$init(void);static result_t cc1km$StdControl$start(void);static result_t cc1km$Timer$fired(void);static result_t HPLUART0M$UART$init(void);static result_t HPLUART0M$UART$put(uint8_t arg_0xa2df9d0);static result_t PotM$Pot$init(uint8_t arg_0xa31fc38);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 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_0xa36dd98);static result_t TimerM$Timer$start(uint8_t arg_0xa36dd98, char arg_0xa2f11c0, uint32_t arg_0xa2f1318);static void HPLClock$Clock$setInterval(uint8_t arg_0xa3868c8);static uint8_t HPLClock$Clock$readCounter(void);static result_t HPLClock$Clock$setRate(char arg_0xa38b8b8, char arg_0xa38b9f8);static uint8_t HPLClock$Clock$getInterval(void);static uint8_t HPLPowerManagementM$PowerManagement$adjustPower(void);static result_t HPLCC1000M$HPLCC1000$init(void);static uint8_t HPLCC1000M$HPLCC1000$read(uint8_t arg_0xa2dc5c8);static result_t HPLCC1000M$HPLCC1000$write(uint8_t arg_0xa2dc010, uint8_t arg_0xa2dc158);static # 62 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLUART.nc"result_t cc1km$HPLUART$init(void);static #line 80result_t cc1km$HPLUART$put(uint8_t arg_0xa2df9d0);static # 51 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica2/HPLCC1000.nc"result_t cc1km$HPLCC1000$init(void);static #line 65uint8_t cc1km$HPLCC1000$read(uint8_t arg_0xa2dc5c8);static #line 58result_t cc1km$HPLCC1000$write(uint8_t arg_0xa2dc010, uint8_t arg_0xa2dc158);static # 59 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Timer.nc"result_t cc1km$Timer$start(char arg_0xa2f11c0, uint32_t arg_0xa2f1318);# 15 "cc1km.nc"uint8_t cc1km$addr = 0xff;uint8_t cc1km$data = 0;static inline result_t cc1km$StdControl$init(void);static inline #line 33result_t cc1km$StdControl$start(void);static inline result_t cc1km$Timer$fired(void);static inline result_t cc1km$HPLUART$putDone(void);static inline result_t cc1km$HPLUART$get(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_0xa2dfed0);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);static # 47 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/RealMain.nc"result_t RealMain$hardwareInit(void);static # 78 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/Pot.nc"result_t RealMain$Pot$init(uint8_t arg_0xa31fc38);static # 63 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"result_t RealMain$StdControl$init(void);static result_t RealMain$StdControl$start(void);# 54 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/RealMain.nc"int main(void);static # 74 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/interfaces/HPLPot.nc"result_t PotM$HPLPot$finalise(void);static #line 59result_t PotM$HPLPot$decrease(void);static result_t PotM$HPLPot$increase(void);# 91 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/PotM.nc"uint8_t PotM$potSetting;static inline void PotM$setPot(uint8_t value);static inline #line 106result_t PotM$Pot$init(uint8_t initialSetting);static inline # 57 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/mica2/HPLPotC.nc"result_t HPLPotC$Pot$decrease(void);static inline result_t HPLPotC$Pot$increase(void);static inline result_t HPLPotC$Pot$finalise(void);static inline # 57 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/avrmote/HPLInit.nc"result_t HPLInit$init(void);# 52 "C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/system/LedsC.nc"enum LedsC$__nesc_unnamed4259 { LedsC$RED_BIT = 1,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -