📄 app.c
字号:
#define nx_struct struct#define nx_union union#define dbg(mode, format, ...) ((void)0)#define dbg_clear(mode, format, ...) ((void)0)#define dbg_active(mode) 0# 151 "/usr/lib/gcc/avr/3.4.6/include/stddef.h" 3typedef int ptrdiff_t;#line 213typedef unsigned int size_t;#line 325typedef int wchar_t;# 8 "/usr/lib/ncc/deputy_nodeputy.h"struct __nesc_attr_nonnull {} ;#line 9struct __nesc_attr_bnd {#line 9 void *lo, *hi;} ;#line 10struct __nesc_attr_bnd_nok {#line 10 void *lo, *hi;} ;#line 11struct __nesc_attr_count {#line 11 int n;} ;#line 12struct __nesc_attr_count_nok {#line 12 int n;} ;#line 13struct __nesc_attr_one {} ;#line 14struct __nesc_attr_one_nok {} ;#line 15struct __nesc_attr_dmemset {#line 15 int a1, a2, a3;} ;#line 16struct __nesc_attr_dmemcpy {#line 16 int a1, a2, a3;} ;#line 17struct __nesc_attr_nts {} ;# 121 "/usr/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h" 3typedef int int8_t __attribute((__mode__(__QI__))) ;typedef unsigned int uint8_t __attribute((__mode__(__QI__))) ;typedef int int16_t __attribute((__mode__(__HI__))) ;typedef unsigned int uint16_t __attribute((__mode__(__HI__))) ;typedef int int32_t __attribute((__mode__(__SI__))) ;typedef unsigned int uint32_t __attribute((__mode__(__SI__))) ;typedef int int64_t __attribute((__mode__(__DI__))) ;typedef unsigned int uint64_t __attribute((__mode__(__DI__))) ;#line 142typedef int16_t intptr_t;typedef uint16_t uintptr_t;#line 159typedef int8_t int_least8_t;typedef uint8_t uint_least8_t;typedef int16_t int_least16_t;typedef uint16_t uint_least16_t;typedef int32_t int_least32_t;typedef uint32_t uint_least32_t;typedef int64_t int_least64_t;typedef uint64_t uint_least64_t;#line 213typedef int8_t int_fast8_t;typedef uint8_t uint_fast8_t;typedef int16_t int_fast16_t;typedef uint16_t uint_fast16_t;typedef int32_t int_fast32_t;typedef uint32_t uint_fast32_t;typedef int64_t int_fast64_t;typedef uint64_t uint_fast64_t;#line 273typedef int64_t intmax_t;typedef uint64_t uintmax_t;# 77 "/usr/lib/gcc/avr/3.4.6/../../../../avr/include/inttypes.h" 3typedef int32_t int_farptr_t;typedef uint32_t uint_farptr_t;# 385 "/usr/lib/ncc/nesc_nx.h"typedef struct { unsigned char data[1]; } __attribute__((packed)) nx_int8_t;typedef int8_t __nesc_nxbase_nx_int8_t ;typedef struct { unsigned char data[2]; } __attribute__((packed)) nx_int16_t;typedef int16_t __nesc_nxbase_nx_int16_t ;typedef struct { unsigned char data[4]; } __attribute__((packed)) nx_int32_t;typedef int32_t __nesc_nxbase_nx_int32_t ;typedef struct { unsigned char data[8]; } __attribute__((packed)) nx_int64_t;typedef int64_t __nesc_nxbase_nx_int64_t ;typedef struct { unsigned char data[1]; } __attribute__((packed)) nx_uint8_t;typedef uint8_t __nesc_nxbase_nx_uint8_t ;typedef struct { unsigned char data[2]; } __attribute__((packed)) nx_uint16_t;typedef uint16_t __nesc_nxbase_nx_uint16_t ;typedef struct { unsigned char data[4]; } __attribute__((packed)) nx_uint32_t;typedef uint32_t __nesc_nxbase_nx_uint32_t ;typedef struct { unsigned char data[8]; } __attribute__((packed)) nx_uint64_t;typedef uint64_t __nesc_nxbase_nx_uint64_t ;typedef struct { unsigned char data[1]; } __attribute__((packed)) nxle_int8_t;typedef int8_t __nesc_nxbase_nxle_int8_t ;typedef struct { unsigned char data[2]; } __attribute__((packed)) nxle_int16_t;typedef int16_t __nesc_nxbase_nxle_int16_t ;typedef struct { unsigned char data[4]; } __attribute__((packed)) nxle_int32_t;typedef int32_t __nesc_nxbase_nxle_int32_t ;typedef struct { unsigned char data[8]; } __attribute__((packed)) nxle_int64_t;typedef int64_t __nesc_nxbase_nxle_int64_t ;typedef struct { unsigned char data[1]; } __attribute__((packed)) nxle_uint8_t;typedef uint8_t __nesc_nxbase_nxle_uint8_t ;typedef struct { unsigned char data[2]; } __attribute__((packed)) nxle_uint16_t;typedef uint16_t __nesc_nxbase_nxle_uint16_t ;typedef struct { unsigned char data[4]; } __attribute__((packed)) nxle_uint32_t;typedef uint32_t __nesc_nxbase_nxle_uint32_t ;typedef struct { unsigned char data[8]; } __attribute__((packed)) nxle_uint64_t;typedef uint64_t __nesc_nxbase_nxle_uint64_t ;# 116 "/usr/lib/gcc/avr/3.4.6/../../../../avr/include/string.h" 3extern void *memset(void *arg_0xf66c70, int arg_0xf66dc8, size_t arg_0xf6b010);# 71 "/usr/lib/gcc/avr/3.4.6/../../../../avr/include/stdlib.h" 3#line 68typedef struct __nesc_unnamed4242 { int quot; int rem;} div_t;#line 74typedef struct __nesc_unnamed4243 { long quot; long rem;} ldiv_t;typedef int (*__compar_fn_t)(const void *arg_0xf7e660, const void *arg_0xf7e7f8);# 23 "/opt/tinyos-2.x/tos/system/tos.h"typedef uint8_t bool;enum __nesc_unnamed4244 {#line 24 FALSE = 0, TRUE = 1};typedef nx_int8_t nx_bool;struct __nesc_attr_atmostonce {};#line 35struct __nesc_attr_atleastonce {};#line 36struct __nesc_attr_exactlyonce {};# 40 "/opt/tinyos-2.x/tos/types/TinyError.h"enum __nesc_unnamed4245 { SUCCESS = 0, FAIL = 1, ESIZE = 2, ECANCEL = 3, EOFF = 4, EBUSY = 5, EINVAL = 6, ERETRY = 7, ERESERVE = 8, EALREADY = 9, ENOMEM = 10, ENOACK = 11, ELAST = 11};typedef uint8_t error_t ;static inline error_t ecombine(error_t r1, error_t r2);# 210 "/usr/lib/gcc/avr/3.4.6/../../../../avr/include/avr/pgmspace.h" 3typedef void prog_void __attribute((__progmem__)) ;typedef char prog_char __attribute((__progmem__)) ;typedef unsigned char prog_uchar __attribute((__progmem__)) ;typedef int8_t prog_int8_t __attribute((__progmem__)) ;typedef uint8_t prog_uint8_t __attribute((__progmem__)) ;typedef int16_t prog_int16_t __attribute((__progmem__)) ;typedef uint16_t prog_uint16_t __attribute((__progmem__)) ;typedef int32_t prog_int32_t __attribute((__progmem__)) ;typedef uint32_t prog_uint32_t __attribute((__progmem__)) ;typedef int64_t prog_int64_t __attribute((__progmem__)) ;typedef uint64_t prog_uint64_t __attribute((__progmem__)) ;# 25 "/opt/tinyos-2.x/tos/chips/atm128/atm128const.h"typedef uint8_t const_uint8_t __attribute((__progmem__)) ;typedef uint16_t const_uint16_t __attribute((__progmem__)) ;typedef uint32_t const_uint32_t __attribute((__progmem__)) ;typedef int8_t const_int8_t __attribute((__progmem__)) ;typedef int16_t const_int16_t __attribute((__progmem__)) ;typedef int32_t const_int32_t __attribute((__progmem__)) ;# 105 "/opt/tinyos-2.x/tos/chips/atm1281/atm128hardware.h"static __inline void __nesc_enable_interrupt();static __inline void __nesc_disable_interrupt();typedef uint8_t __nesc_atomic_t;__nesc_atomic_t __nesc_atomic_start(void );void __nesc_atomic_end(__nesc_atomic_t original_SREG);#line 125__inline __nesc_atomic_t __nesc_atomic_start(void ) ;#line 135__inline void __nesc_atomic_end(__nesc_atomic_t original_SREG) ;typedef uint8_t mcu_power_t ;enum __nesc_unnamed4246 { ATM128_POWER_IDLE = 0, ATM128_POWER_ADC_NR = 1, ATM128_POWER_EXT_STANDBY = 2, ATM128_POWER_SAVE = 3, ATM128_POWER_STANDBY = 4, ATM128_POWER_DOWN = 5};static inline mcu_power_t mcombine(mcu_power_t m1, mcu_power_t m2);#line 170#line 162typedef struct __nesc_unnamed4247 { uint8_t porf : 1; uint8_t extrf : 1; uint8_t borf : 1; uint8_t wdrf : 1; uint8_t jtrf : 1; uint8_t resv1 : 3;} Atm128_MCUSR_t;#line 173typedef struct __nesc_unnamed4248 { uint8_t srw00 : 1; uint8_t srw01 : 1; uint8_t srw10 : 1; uint8_t srw11 : 1; uint8_t srl : 3; uint8_t sre : 1;} Atm128_XMCRA_t;#line 184typedef struct __nesc_unnamed4249 { uint8_t xmm : 3; uint8_t resv1 : 4; uint8_t xmbk : 1;} Atm128_XMCRB_t;# 62 "/opt/tinyos-2.x/tos/chips/atm1281/adc/Atm128Adc.h"enum __nesc_unnamed4250 { ATM128_ADC_VREF_OFF = 0, ATM128_ADC_VREF_AVCC = 1, ATM128_ADC_VREF_RSVD, ATM128_ADC_VREF_2_56 = 3};enum __nesc_unnamed4251 { ATM128_ADC_RIGHT_ADJUST = 0, ATM128_ADC_LEFT_ADJUST = 1};enum __nesc_unnamed4252 { ATM128_ADC_SNGL_ADC0 = 0, ATM128_ADC_SNGL_ADC1, ATM128_ADC_SNGL_ADC2, ATM128_ADC_SNGL_ADC3, ATM128_ADC_SNGL_ADC4, ATM128_ADC_SNGL_ADC5, ATM128_ADC_SNGL_ADC6, ATM128_ADC_SNGL_ADC7, ATM128_ADC_DIFF_ADC00_10x, ATM128_ADC_DIFF_ADC10_10x, ATM128_ADC_DIFF_ADC00_200x, ATM128_ADC_DIFF_ADC10_200x, ATM128_ADC_DIFF_ADC22_10x, ATM128_ADC_DIFF_ADC32_10x, ATM128_ADC_DIFF_ADC22_200x, ATM128_ADC_DIFF_ADC32_200x, ATM128_ADC_DIFF_ADC01_1x, ATM128_ADC_DIFF_ADC11_1x, ATM128_ADC_DIFF_ADC21_1x, ATM128_ADC_DIFF_ADC31_1x, ATM128_ADC_DIFF_ADC41_1x, ATM128_ADC_DIFF_ADC51_1x, ATM128_ADC_DIFF_ADC61_1x, ATM128_ADC_DIFF_ADC71_1x, ATM128_ADC_DIFF_ADC02_1x, ATM128_ADC_DIFF_ADC12_1x, ATM128_ADC_DIFF_ADC22_1x, ATM128_ADC_DIFF_ADC32_1x, ATM128_ADC_DIFF_ADC42_1x, ATM128_ADC_DIFF_ADC52_1x, ATM128_ADC_SNGL_1_23, ATM128_ADC_SNGL_GND};#line 113typedef struct __nesc_unnamed4253 { uint8_t mux : 5; uint8_t adlar : 1; uint8_t refs : 2;} Atm128Admux_t;enum __nesc_unnamed4254 { ATM128_ADC_PRESCALE_2 = 0, ATM128_ADC_PRESCALE_2b, ATM128_ADC_PRESCALE_4, ATM128_ADC_PRESCALE_8, ATM128_ADC_PRESCALE_16, ATM128_ADC_PRESCALE_32, ATM128_ADC_PRESCALE_64, ATM128_ADC_PRESCALE_128, ATM128_ADC_PRESCALE};enum __nesc_unnamed4255 { ATM128_ADC_ENABLE_OFF = 0, ATM128_ADC_ENABLE_ON};enum __nesc_unnamed4256 { ATM128_ADC_START_CONVERSION_OFF = 0, ATM128_ADC_START_CONVERSION_ON};enum __nesc_unnamed4257 { ATM128_ADC_FREE_RUNNING_OFF = 0, ATM128_ADC_FREE_RUNNING_ON};enum __nesc_unnamed4258 { ATM128_ADC_INT_FLAG_OFF = 0, ATM128_ADC_INT_FLAG_ON};enum __nesc_unnamed4259 { ATM128_ADC_INT_ENABLE_OFF = 0, ATM128_ADC_INT_ENABLE_ON};#line 169typedef struct __nesc_unnamed4260 { uint8_t adps : 3; uint8_t adie : 1; uint8_t adif : 1; uint8_t adate : 1; uint8_t adsc : 1; uint8_t aden : 1;} Atm128Adcsra_t;#line 180typedef struct __nesc_unnamed4261 { uint8_t adts : 3; uint8_t mux5 : 1; uint8_t resv1 : 2; uint8_t acme : 1; uint8_t resv2 : 1;} Atm128Adcsrb_t;typedef uint8_t Atm128_ADCH_t;typedef uint8_t Atm128_ADCL_t;# 29 "/opt/tinyos-2.x/tos/lib/timer/Timer.h"typedef struct __nesc_unnamed4262 {#line 29 int notUsed;} #line 29TMilli;typedef struct __nesc_unnamed4263 {#line 30 int notUsed;} #line 30T32khz;typedef struct __nesc_unnamed4264 {#line 31 int notUsed;} #line 31TMicro;# 61 "/opt/tinyos-2.x/tos/chips/atm1281/timer/Atm128Timer.h"enum __nesc_unnamed4265 { ATM128_CLK8_OFF = 0x0, ATM128_CLK8_NORMAL = 0x1, ATM128_CLK8_DIVIDE_8 = 0x2, ATM128_CLK8_DIVIDE_32 = 0x3, ATM128_CLK8_DIVIDE_64 = 0x4, ATM128_CLK8_DIVIDE_128 = 0x5, ATM128_CLK8_DIVIDE_256 = 0x6, ATM128_CLK8_DIVIDE_1024 = 0x7};enum __nesc_unnamed4266 { ATM128_CLK16_OFF = 0x0, ATM128_CLK16_NORMAL = 0x1, ATM128_CLK16_DIVIDE_8 = 0x2, ATM128_CLK16_DIVIDE_64 = 0x3, ATM128_CLK16_DIVIDE_256 = 0x4, ATM128_CLK16_DIVIDE_1024 = 0x5, ATM128_CLK16_EXTERNAL_FALL = 0x6, ATM128_CLK16_EXTERNAL_RISE = 0x7};enum __nesc_unnamed4267 { AVR_CLOCK_OFF = 0, AVR_CLOCK_ON = 1, AVR_CLOCK_DIVIDE_8 = 2};enum __nesc_unnamed4268 { ATM128_TIMER_COMPARE_NORMAL = 0, ATM128_TIMER_COMPARE_TOGGLE, ATM128_TIMER_COMPARE_CLEAR, ATM128_TIMER_COMPARE_SET};enum __nesc_unnamed4269 { ATM128_WAVE8_NORMAL = 0, ATM128_WAVE8_PWM, ATM128_WAVE8_CTC, ATM128_WAVE8_PWM_FAST};enum __nesc_unnamed4270 { ATM128_WAVE16_NORMAL = 0, ATM128_WAVE16_PWM_8BIT, ATM128_WAVE16_PWM_9BIT, ATM128_WAVE16_PWM_10BIT, ATM128_WAVE16_CTC_COMPARE, ATM128_WAVE16_PWM_FAST_8BIT, ATM128_WAVE16_PWM_FAST_9BIT, ATM128_WAVE16_PWM_FAST_10BIT, ATM128_WAVE16_PWM_CAPTURE_LOW, ATM128_WAVE16_PWM_COMPARE_LOW, ATM128_WAVE16_PWM_CAPTURE_HIGH, ATM128_WAVE16_PWM_COMPARE_HIGH, ATM128_WAVE16_CTC_CAPTURE, ATM128_WAVE16_RESERVED, ATM128_WAVE16_PWM_FAST_CAPTURE, ATM128_WAVE16_PWM_FAST_COMPARE};enum __nesc_unnamed4271 { ATM128_COMPARE_OFF = 0, ATM128_COMPARE_TOGGLE, ATM128_COMPARE_CLEAR,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -