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

📄 app_receiver.c

📁 CC2430 上面运行TinyOS&nbsp2.0 测试程序 可以在CC2430上面运行TinyOS&nbsp2.0无线传感器网络操作系统 具体使用见下载包里面的使用说明。
💻 C
📖 第 1 页 / 共 5 页
字号:
#define MANGLED_NESC_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) 0typedef signed char int8_t;typedef short int16_t;typedef long int32_t;typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef unsigned long uint32_t;typedef signed char int_least8_t;typedef short int int_least16_t;typedef long int_least32_t;/*__extension__*/ typedef long  int int_least64_t;typedef unsigned char uint_least8_t;typedef unsigned short uint_least16_t;typedef unsigned long uint_least32_t;/*__extension__*/ typedef unsigned long  int uint_least64_t;typedef signed char int_fast8_t;typedef int int_fast16_t;typedef int int_fast32_t;/*__extension__*/ typedef long  int int_fast64_t;typedef unsigned char uint_fast8_t;typedef unsigned int uint_fast16_t;typedef unsigned int uint_fast32_t;/*__extension__*/ typedef unsigned long  int uint_fast64_t;typedef int intptr_t;typedef unsigned int uintptr_t;/*__extension__*/ typedef long  int intmax_t;/*__extension__*/ typedef unsigned long  int uintmax_t;typedef struct __nesc_unnamed4242 {  intmax_t quot;  intmax_t rem;} imaxdiv_t;typedef struct { char _data[1]; } /*__attribute__((packed))*/ nx_int8_t;typedef int8_t __nesc_nxbase_nx_int8_t  ;typedef struct { char _data[2]; } /*__attribute__((packed))*/ nx_int16_t;typedef int16_t __nesc_nxbase_nx_int16_t  ;typedef struct { char _data[4]; } /*__attribute__((packed))*/ nx_int32_t;typedef int32_t __nesc_nxbase_nx_int32_t  ;typedef struct { char _data[8]; } /*__attribute__((packed))*/ nx_int64_t;typedef int32_t __nesc_nxbase_nx_int64_t  ;typedef struct { char _data[1]; } /*__attribute__((packed))*/ nx_uint8_t;typedef uint8_t __nesc_nxbase_nx_uint8_t  ;typedef struct { char _data[2]; } /*__attribute__((packed))*/ nx_uint16_t;typedef uint16_t __nesc_nxbase_nx_uint16_t  ;typedef struct { char _data[4]; } /*__attribute__((packed))*/ nx_uint32_t;typedef uint32_t __nesc_nxbase_nx_uint32_t  ;typedef struct { char _data[8]; } /*__attribute__((packed))*/ nx_uint64_t;typedef uint32_t __nesc_nxbase_nx_uint64_t  ;typedef struct { char _data[1]; } /*__attribute__((packed))*/ nxle_int8_t;typedef int8_t __nesc_nxbase_nxle_int8_t  ;typedef struct { char _data[2]; } /*__attribute__((packed))*/ nxle_int16_t;typedef int16_t __nesc_nxbase_nxle_int16_t  ;typedef struct { char _data[4]; } /*__attribute__((packed))*/ nxle_int32_t;typedef int32_t __nesc_nxbase_nxle_int32_t  ;typedef struct { char _data[8]; } /*__attribute__((packed))*/ nxle_int64_t;typedef int32_t __nesc_nxbase_nxle_int64_t  ;typedef struct { char _data[1]; } /*__attribute__((packed))*/ nxle_uint8_t;typedef uint8_t __nesc_nxbase_nxle_uint8_t  ;typedef struct { char _data[2]; } /*__attribute__((packed))*/ nxle_uint16_t;typedef uint16_t __nesc_nxbase_nxle_uint16_t  ;typedef struct { char _data[4]; } /*__attribute__((packed))*/ nxle_uint32_t;typedef uint32_t __nesc_nxbase_nxle_uint32_t  ;typedef struct { char _data[8]; } /*__attribute__((packed))*/ nxle_uint64_t;typedef uint32_t __nesc_nxbase_nxle_uint64_t  ;extern void *memset(void *s, char val, int n);//typedef unsigned int size_t;typedef short unsigned int wchar_t;typedef void *_LOCK_T;typedef long _off_t;/*__extension__*/ typedef long  _off64_t;typedef int _ssize_t;typedef unsigned int wint_t;typedef struct __nesc_unnamed4243 {  int __count;  union __nesc_unnamed4244 {    wint_t __wch;    unsigned char __wchb[4];  } __value;} _mbstate_t;typedef _LOCK_T _flock_t;typedef void *_iconv_t;typedef unsigned long __ULong;struct _reent;struct _Bigint {  struct _Bigint *_next;  int _k, _maxwds, _sign, _wds;  __ULong _x[1];};struct __tm {  int __tm_sec;  int __tm_min;  int __tm_hour;  int __tm_mday;  int __tm_mon;  int __tm_year;  int __tm_wday;  int __tm_yday;  int __tm_isdst;};struct _on_exit_args {  void *_fnargs[32];  void *_dso_handle[32];  __ULong _fntypes;  __ULong _is_cxa;};struct _atexit {  struct _atexit *_next;  int _ind;  void (*_fns[32])(void );  struct _on_exit_args _on_exit_args;};struct __sbuf {  unsigned char *_base;  int _size;};typedef long _fpos_t;typedef _off64_t _fpos64_t;struct __sFILE {  unsigned char *_p;  int _r;  int _w;  short _flags;  short _file;  struct __sbuf _bf;  int _lbfsize;  void *_cookie;  _ssize_t /*__attribute((__cdecl__))*/ (*_read)(struct _reent *, void *, char *, int );  _ssize_t /*__attribute((__cdecl__))*/ (*_write)(struct _reent *, void *, const char *, int );  _fpos_t /*__attribute((__cdecl__))*/ (*_seek)(struct _reent *, void *, _fpos_t , int );  int /*__attribute((__cdecl__))*/ (*_close)(struct _reent *, void *);  struct __sbuf _ub;  unsigned char *_up;  int _ur;  unsigned char _ubuf[3];  unsigned char _nbuf[1];  struct __sbuf _lb;  int _blksize;  int _offset;  struct _reent *__data;  _flock_t _lock;};struct __sFILE64 {  unsigned char *_p;  int _r;  int _w;  short _flags;  short _file;  struct __sbuf _bf;  int _lbfsize;  struct _reent *__data;  void *_cookie;  _ssize_t /*__attribute((__cdecl__))*/ (*_read)(struct _reent *, void *, char *, int );  _ssize_t /*__attribute((__cdecl__))*/ (*_write)(struct _reent *, void *, const char *, int );  _fpos_t /*__attribute((__cdecl__))*/ (*_seek)(struct _reent *, void *, _fpos_t , int );  int /*__attribute((__cdecl__))*/ (*_close)(struct _reent *, void *);  struct __sbuf _ub;  unsigned char *_up;  int _ur;  unsigned char _ubuf[3];  unsigned char _nbuf[1];  struct __sbuf _lb;  int _blksize;  int _flags2;  _off64_t _offset;  _fpos64_t /*__attribute((__cdecl__))*/ (*_seek64)(struct _reent *, void *, _fpos64_t , int );  _flock_t _lock;};typedef struct __sFILE64 __FILE;struct _glue {  struct _glue *_next;  int _niobs;  __FILE *_iobs;};struct _rand48 {  unsigned short _seed[3];  unsigned short _mult[3];  unsigned short _add;};struct _reent {  int _errno;  __FILE *_stdin, *_stdout, *_stderr;  int _inc;  char _emergency[25];  int _current_category;  const char *_current_locale;  int __sdidinit;  void /*__attribute((__cdecl__))*/ (*__cleanup)(struct _reent *);  struct _Bigint *_result;  int _result_k;  struct _Bigint *_p5s;  struct _Bigint **_freelist;  int _cvtlen;  char *_cvtbuf;  union __nesc_unnamed4245 {    struct __nesc_unnamed4246 {      unsigned int _unused_rand;      char *_strtok_last;      char _asctime_buf[26];      struct __tm _localtime_buf;      int _gamma_signgam;      /*__extension__*/ unsigned long  _rand_next;      struct _rand48 _r48;      _mbstate_t _mblen_state;      _mbstate_t _mbtowc_state;      _mbstate_t _wctomb_state;      char _l64a_buf[8];      char _signal_buf[24];      int _getdate_err;      _mbstate_t _mbrlen_state;      _mbstate_t _mbrtowc_state;      _mbstate_t _mbsrtowcs_state;      _mbstate_t _wcrtomb_state;      _mbstate_t _wcsrtombs_state;    } _reent;    struct __nesc_unnamed4247 {      unsigned char *_nextf[30];      unsigned int _nmalloc[30];    } _unused;  } _new;  struct _atexit *_atexit;  struct _atexit _atexit0;  void (**_sig_func)(int );  struct _glue __sglue;  __FILE __sf[3];};struct _reent;struct _reent;struct _reent;typedef struct __nesc_unnamed4248 {  int quot;  int rem;} div_t;typedef struct __nesc_unnamed4249 {  long quot;  long rem;} ldiv_t;typedef struct __nesc_unnamed4250 {  long  int quot;  long  int rem;} lldiv_t;union __dmath {  __ULong i[2];  double d;};union __fmath {  __ULong i[1];  float f;};union __ldmath {  __ULong i[4];  long double ld;};typedef float float_t;typedef double double_t;struct exception {  int type;  char *name;  double arg1;  double arg2;  double retval;  int err;};enum __fdlibm_version {  __fdlibm_ieee = -1,   __fdlibm_svid,   __fdlibm_xopen,   __fdlibm_posix};enum __fdlibm_version;typedef int ptrdiff_t;typedef uint8_t bool  ;enum __nesc_unnamed4251 {  FALSE = 0, TRUE = 1};typedef nx_int8_t nx_bool;uint16_t TOS_NODE_ID = 1;/*struct __nesc_attr_atmostonce {};*//*struct __nesc_attr_atleastonce {};*//*struct __nesc_attr_exactlyonce {};*/enum __nesc_unnamed4252 {  SUCCESS = 0,   FAIL = 1,   ESIZE = 2,   ECANCEL = 3,   EOFF = 4,   EBUSY = 5,   EINVAL = 6,   ERETRY = 7,   ERESERVE = 8,   EALREADY = 9};typedef uint8_t error_t  ;static  /*inline*/  error_t ecombine(error_t r1, error_t r2);sbit EA = 0xAF;sbit P1_0 = 0x90;sbit P1_1 = 0x91;enum __nesc_unnamed4253 {  CC2430_IEN0_EA = 0x7,   CC2430_IEN0_STIE = 0x5,   CC2430_IEN0_ENCIE = 0x4,   CC2430_IEN0_URX1IE = 0x3,   CC2430_IEN0_URX0IE = 0x2,   CC2430_IEN0_ADCIE = 0x1,   CC2430_IEN0_RFERRIE = 0x0};enum __nesc_unnamed4254 {  CC2430_IEN2_WDTIE = 0x5,   CC2430_IEN2_P1IE = 0x4,   CC2430_IEN2_UTX1IE = 0x3,   CC2430_IEN2_UTX0IE = 0x2,   CC2430_IEN2_P2IE = 0x1,   CC2430_IEN2_RFIE = 0x0};enum __nesc_unnamed4255 {  CC2430_IRCON_STIF = 0x7,   CC2430_IRCON_P0IF = 0x5,   CC2430_IRCON_T4IF = 0x4,   CC2430_IRCON_T3IF = 0x3,   CC2430_IRCON_T2IF = 0x2,   CC2430_IRCON_T1IF = 0x1,   CC2430_IRCON_DMAIF = 0x0};enum __nesc_unnamed4256 {  CC2430_IRCON2_WDTIF = 0x4,   CC2430_IRCON2_P1IF = 0x3,   CC2430_IRCON2_UTX1IF = 0x2,   CC2430_IRCON2_UTX0IF = 0x1,   CC2430_IRCON2_P2IF = 0x0};enum __nesc_unnamed4257 {  CC2430_RFIM_RREG_PD = 0x7,   CC2430_RFIM_TXDONE = 0x6,   CC2430_RFIM_FIFOP = 0x5,   CC2430_RFIM_SFD = 0x4,   CC2430_RFIM_CCA = 0x3,   CC2430_RFIM_CSP_WT = 0x2,   CC2430_RFIM_CSP_STOP = 0x1,   CC2430_RFIM_CSP_INT = 0x0};enum __nesc_unnamed4258 {  CC2430_RFIF_RREG_ON = 0x7,   CC2430_RFIF_TXDONE = 0x6,   CC2430_RFIF_FIFOP = 0x5,   CC2430_RFIF_SFD = 0x4,   CC2430_RFIF_CCA = 0x3,   CC2430_RFIF_CSP_WT = 0x2,   CC2430_RFIF_CSP_STOP = 0x1,   CC2430_RFIF_CSP_INT = 0x0};sfr U0CSR = 0x86;sbit URX0IF = 0x8B;sbit RFERRIF = 0x89;sfr RFIM = 0x91;

⌨️ 快捷键说明

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