app.c
上传用户:joranyuan
上传日期:2022-06-23
资源大小:3306k
文件大小:323k
- #define dbg(mode, format, ...) ((void)0)
- #define dbg_clear(mode, format, ...) ((void)0)
- #define dbg_active(mode) 0
- # 65 "/usr/avr/include/stdint.h"
- typedef signed char int8_t;
- typedef unsigned char uint8_t;
- # 104 "/usr/avr/include/stdint.h" 3
- typedef int int16_t;
- typedef unsigned int uint16_t;
- typedef long int32_t;
- typedef unsigned long uint32_t;
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
- #line 155
- typedef int16_t intptr_t;
- typedef uint16_t uintptr_t;
- # 213 "/usr/lib/gcc-lib/avr/3.3/include/stddef.h" 3
- typedef unsigned int size_t;
- # 70 "/usr/avr/include/string.h"
- extern char *strcat(char *, const char *);
- extern size_t __attribute((__pure__)) strlen(const char *);
- # 325 "/usr/lib/gcc-lib/avr/3.3/include/stddef.h" 3
- typedef int wchar_t;
- # 66 "/usr/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/lib/gcc-lib/avr/3.3/include/stddef.h" 3
- typedef int ptrdiff_t;
- # 91 "/home/testuser/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 133
- result_t rcombine4(result_t r1, result_t r2, result_t r3,
- result_t r4);
- enum __nesc_unnamed4246 {
- NULL = 0x0
- };
- # 90 "/usr/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 int8_t __attribute((__progmem__)) prog_int8_t;
- typedef uint8_t __attribute((__progmem__)) prog_uint8_t;
- typedef int16_t __attribute((__progmem__)) prog_int16_t;
- typedef uint16_t __attribute((__progmem__)) prog_uint16_t;
- typedef int32_t __attribute((__progmem__)) prog_int32_t;
- typedef uint32_t __attribute((__progmem__)) prog_uint32_t;
- typedef int64_t __attribute((__progmem__)) prog_int64_t;
- typedef uint64_t __attribute((__progmem__)) prog_uint64_t;
- # 139 "/home/testuser/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);
- 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_atomic_sleep(void);
- static
- __inline void __nesc_enable_interrupt(void);
- # 241 "../../tos/platform/mica2/CC1000Const.h"
- static const prog_uchar CC1K_LPL_PreambleLength[9 * 2] = {
- 0, 6,
- 0x0, 48,
- 0x0, 60,
- 0x0, 144,
- 0x1, 0x0f,
- 0x1, 0xf8,
- 0x3, 0xd9,
- 0x7, 0x9b,
- 0xf, 0x06 };
- static const prog_uchar CC1K_LPL_SleepTime[9 * 2] = {
- 0, 0,
- 0x0, 10,
- 0x0, 25,
- 0x0, 50,
- 0x0, 100,
- 0x0, 200,
- 0x1, 0x90,
- 0x3, 0x20,
- 0x6, 0x40 };
- #line 277
- static const prog_uchar CC1K_Params[6][31] = {
- {
- 0x31,
- 0x58, 0x00, 0x00,
- 0x57, 0xf6, 0x85,
- 0X03, 0x55, (
- 4 << 4) | (1 << 2),
- 1 << 1, (
- 0x0 << 4) | (0xf << 0),
- 12 << 3,
- 0xe << 4, (
- 1 << 5) | (6 << 0), (
- 0 << 7) | (28 << 0), (((
- 3 << 5) | (1 << 3)) | (1 << 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 },
- {
- 0x31,
- 0x7c, 0x00, 0x00,
- 0x7b, 0xf9, 0xae,
- 0x02, 0x38, (
- 8 << 4) | (3 << 2), ((
- 1 << 5) | (2 << 3)) | (1 << 1), (
- 0x8 << 4) | (0x0 << 0),
- 8 << 3,
- 0x1 << 4, (
- 1 << 5) | (6 << 0), (
- 1 << 7) | (33 << 0), (((
- 3 << 5) | (1 << 3)) | (1 << 1)) | (1 << 0), ((
- 5 << 4) | (1 << 2)) | (1 << 0), (
- 0x1 << 4) | (0x0 << 0),
- 1 << 0,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00,
- 0x00, (
- 15 << 4) | (3 << 0),
- TRUE },
- {
- 0x31,
- 0x51, 0x00, 0x00,
- 0x50, 0xf7, 0x4F,
- 0X03, 0x0E, (
- 4 << 4) | (1 << 2),
- 1 << 1, (
- 0x0 << 4) | (0xf << 0),
- 11 << 3,
- 0xe << 4, (
- 1 << 5) | (6 << 0), (
- 1 << 7) | (33 << 0), (((
- 3 << 5) | (1 << 3)) | (1 << 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 },
- {
- 0x31,
- 0x5c, 0xe0, 0x00,
- 0x5c, 0xdb, 0x42,
- 0x01, 0xAA, (
- 8 << 4) | (3 << 2), ((
- 1 << 5) | (2 << 3)) | (1 << 1), (
- 0x8 << 4) | (0x0 << 0),
- 6 << 3,
- 0x1 << 4, (
- 1 << 5) | (6 << 0), (
- 1 << 7) | (33 << 0), (((
- 3 << 5) | (1 << 3)) | (1 << 1)) | (1 << 0), ((
- 5 << 4) | (1 << 2)) | (1 << 0), (
- 0x1 << 4) | (0x0 << 0),
- 1 << 0,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00,
- 0x00, (
- 15 << 4) | (3 << 0),
- TRUE },
- {
- 0x31,
- 0x45, 0x60, 0x00,
- 0x45, 0x55, 0xBB,
- 0X03, 0x9C, (
- 8 << 4) | (0 << 2),
- 1 << 1, (
- 0x0 << 4) | (0xf << 0),
- 13 << 3,
- 0xe << 4, (
- 1 << 5) | (6 << 0), (
- 1 << 7) | (33 << 0), (((
- 3 << 5) | (1 << 3)) | (1 << 1)) | (1 << 0), ((
- 5 << 4) | (1 << 2)) | (0 << 0), (
- 0x7 << 4) | (0x0 << 0),
- 1 << 0,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00,
- 0x00, (
- 8 << 4) | (1 << 0),
- TRUE },
- {
- 0x31,
- 0x58, 0x00, 0x00,
- 0x57, 0xf6, 0x85,
- 0X03, 0x55, (
- 8 << 4) | (4 << 2),
- 1 << 1, (
- 0x0 << 4) | (0xf << 0),
- 12 << 3,
- 0xe << 4, (
- 1 << 5) | (6 << 0), (
- 1 << 7) | (33 << 0), (((
- 3 << 5) | (1 << 3)) | (1 << 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 "../../tos/platform/mica2/hardware.h"
- void __inline TOSH_uwait(int u_sec);
- #line 120
- static __inline void TOSH_CLR_SERIAL_ID_PIN(void);
- #line 120
- static __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 126
- static __inline void TOSH_CLR_CC_PDATA_PIN(void);
- #line 126
- static __inline int TOSH_READ_CC_PDATA_PIN(void);
- #line 126
- static __inline void TOSH_MAKE_CC_PDATA_OUTPUT(void);
- #line 126
- static __inline void TOSH_MAKE_CC_PDATA_INPUT(void);
- static __inline void TOSH_SET_CC_PCLK_PIN(void);
- #line 127
- static __inline void TOSH_CLR_CC_PCLK_PIN(void);
- #line 127
- static __inline void TOSH_MAKE_CC_PCLK_OUTPUT(void);
- static __inline void TOSH_SET_CC_PALE_PIN(void);
- #line 128
- static __inline void TOSH_CLR_CC_PALE_PIN(void);
- #line 128
- static __inline void TOSH_MAKE_CC_PALE_OUTPUT(void);
- #line 143
- static __inline void TOSH_MAKE_MOSI_OUTPUT(void);
- #line 143
- static __inline void TOSH_MAKE_MOSI_INPUT(void);
- static __inline void TOSH_MAKE_MISO_OUTPUT(void);
- #line 144
- static __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 171
- void TOSH_SET_PIN_DIRECTIONS(void );
- #line 201
- enum __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 "/home/testuser/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 "/home/testuser/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_sched_init(void );
- bool TOS_post(void (*tp)(void));
- #line 102
- bool TOS_post(void (*tp)(void));
- static inline
- #line 136
- bool TOSH_run_next_task(void);
- static inline
- #line 159
- void TOSH_run_task(void);
- static inline
- # 159 "/home/testuser/tinyos-1.x/tos/system/tos.h"
- void *nmemset(void *to, int val, size_t n);
- # 28 "/home/testuser/tinyos-1.x/tos/system/Ident.h"
- enum __nesc_unnamed4254 {
- IDENT_MAX_PROGRAM_NAME_LENGTH = 16
- };
- typedef struct __nesc_unnamed4255 {
- uint32_t unix_time;
- uint32_t user_hash;
- char program_name[IDENT_MAX_PROGRAM_NAME_LENGTH];
- } Ident_t;
- # 6 "MultiHopTtestMSG.h"
- enum __nesc_unnamed4256 {
- AM_MULTIHOP = 77
- };
- enum __nesc_unnamed4257 {
- ROUTE_TIME = 60000L,
- DRAND_TIME = 200000L,
- STAT_TIME = 10240
- };
- typedef struct multiHopMsg {
- uint8_t sendID;
- uint8_t dummyData[20];
- } multiHopMsg;
- # 39 "../../tos/interfaces/SClock.h"
- enum __nesc_unnamed4258 {
- CLK_STOP = 0,
- CLK_DIV_1 = 1,
- CLK_DIV_8 = 2,
- CLK_DIV_64 = 3,
- CLK_DIV_256 = 4,
- CLK_DIV_1024 = 5
- };
- enum __nesc_unnamed4259 {
- MAX_VAL = 0xFFFF
- };
- enum __nesc_unnamed4260 {
- POSITIVE = 1,
- NEGATIVE = 2,
- ZERO = 3
- };
- typedef struct GTime {
- uint16_t sticks;
- uint16_t mticks;
- } GTime;
- # 6 "../../tos/system/DrandMSG.h"
- enum __nesc_unnamed4261 {
- MAX_NBR = 20,
- MAX_ONE_HOP = 15
- };
- enum __nesc_unnamed4262 {
- MAX_GRANT = 30,
- MAX_REQUEST = 30,
- MAX_FRAME = 30,
- MAX_REPORT = 30
- };
- enum __nesc_unnamed4263 {
- AM_HELLO = 31,
- AM_REQUEST = 32,
- AM_GRANT = 33,
- AM_RELEASE = 34,
- AM_REJECT = 35,
- AM_TWOHOP = 36,
- AM_REPORT = 37,
- AM_FRAME = 38
- };
- enum __nesc_unnamed4264 {
- HELLO_PERIOD = 30000L,
- HELLO_INTERVAL = 500,
- GRANT_INTERVAL = 100,
- REPORT_INTERVAL = 100,
- REPORT_XPERIOD = 1000,
- FRAME_INTERVAL = 100,
- FRAME_XPERIOD = 1000,
- DRAND_PERIOD = 120000L,
- REPORT_PERIOD = 30000L
- };
- enum __nesc_unnamed4265 {
- HELLO_STATE,
- REQUEST_STATE,
- GRANT_STATE,
- IDLE_STATE2,
- RELEASE_STATE,
- REPORT_STATE,
- FRAME_STATE
- };
- enum __nesc_unnamed4266 {
- ONE_HOP = 0x1,
- TWO_HOP = 0x2,
- GRANT_SENT = 0x4
- };
- enum __nesc_unnamed4267 {
- REPORT_REQUEST = 0,
- REPORT_REPLY = 1,
- FRAME_REQUEST = 2,
- FRAME_REPLY = 3
- };
- # 7 "../../tos/system/DrandInfo.h"
- typedef struct nodeInfo {
- uint8_t nodeID;
- uint8_t slot;
- uint8_t frame;
- uint8_t bitMap;
- } nodeInfo;
- typedef struct helloMsg {
- uint8_t sendID;
- uint8_t OneWayLen;
- uint8_t OneWayId[MAX_NBR];
- } helloMsg;
- typedef struct requestMsg {
- uint8_t sendID;
- uint8_t numRemaining;
- uint16_t OTT;
- GTime timestamp;
- uint8_t idMap[MAX_NBR];
- } requestMsg;
- typedef struct grantMsg {
- uint8_t sendID;
- uint8_t timeSlot[MAX_NBR];
- GTime timestamp;
- } grantMsg;
- typedef struct rejectMsg {
- uint8_t sendID;
- }
- rejectMsg;
- typedef struct releaseMsg {
- uint8_t sendID;
- uint8_t slot;
- } releaseMsg;
- typedef struct twoHopMsg {
- uint8_t sendID;
- uint8_t slot;
- uint8_t slotID;
- } twoHopMsg;
- typedef struct frameMsg {
- uint8_t sendID;
- uint8_t frame;
- uint8_t type;
- uint8_t oneHopNodeID[MAX_ONE_HOP];
- uint8_t frameArray[MAX_ONE_HOP];
- } frameMsg;
- typedef struct reportMsg {
- uint8_t sendID;
- uint8_t slot;
- uint8_t type;
- uint8_t timeSlot[MAX_NBR];
- } reportMsg;
- # 4 "../../tos/types/AM.h"
- enum __nesc_unnamed4268 {
- TOS_BCAST_ADDR = 0xffff,
- TOS_UART_ADDR = 0x007e
- };
- enum __nesc_unnamed4269 {
- TOS_DEFAULT_AM_GROUP = 0x7d
- };
- uint8_t TOS_AM_GROUP = TOS_DEFAULT_AM_GROUP;
- #line 39
- typedef struct TOS_Msg {
- uint16_t addr;
- uint8_t type;
- uint8_t group;
- uint8_t length;
- int8_t data[70];
- 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[70];
- 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[70];
- 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_unnamed4270 {
- 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 = 70,
- LENGTH_BYTE_NUMBER = (size_t )& ((struct TOS_Msg *)0)->length + 1,
- TINYSEC_NODE_ID_SIZE = sizeof(uint16_t )
- };
- enum __nesc_unnamed4271 {
- 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;
- # 39 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.h"
- enum __nesc_unnamed4272 {
- TIMER_REPEAT = 0,
- TIMER_ONE_SHOT = 1,
- NUM_TIMERS = 10
- };
- # 4 "../../tos/platform/mica2/zmacInfo.h"
- typedef struct syncMsgType {
- uint16_t mticks;
- uint16_t sticks;
- uint8_t trust;
- uint16_t sender;
- } syncMsgType;
- typedef struct ecnMsgType {
- uint8_t hopCount;
- uint16_t nextHop;
- uint16_t senderAddress;
- } ecnMsgType;
- typedef struct ecnForwardMsgType {
- uint8_t hopCount;
- uint16_t nextHop;
- uint16_t senderAddress;
- } ecnForwardMsgType;
- # 31 "/home/testuser/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);
- # 35 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.h"
- enum __nesc_unnamed4273 {
- 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 "/home/testuser/tinyos-1.x/tos/platform/mica128/Clock.h"
- enum __nesc_unnamed4274 {
- 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_unnamed4275 {
- DEFAULT_SCALE = 3, DEFAULT_INTERVAL = 127
- };
- # 44 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHop.h"
- enum __nesc_unnamed4276 {
- AM_MULTIHOPMSG = 250,
- AM_DEBUGPACKET = 3
- };
- typedef struct TOS_MHopNeighbor {
- uint16_t addr;
- uint16_t recv_count;
- uint16_t fail_count;
- int16_t last_seqno;
- uint8_t goodness;
- uint8_t hopcount;
- uint8_t timeouts;
- } TOS_MHopNeighbor;
- typedef struct MultihopMsg {
- uint16_t sourceaddr;
- uint16_t originaddr;
- int16_t seqno;
- uint8_t hopcount;
- uint8_t data[70 - 7];
- } __attribute((packed)) TOS_MHopMsg;
- typedef struct DBGEstEntry {
- uint16_t id;
- uint8_t hopcount;
- uint8_t sendEst;
- } __attribute((packed)) DBGEstEntry;
- typedef struct DebugPacket {
- uint8_t estEntries;
- DBGEstEntry estList[5];
- } __attribute((packed)) DebugPacket;
- static result_t PotM$Pot$init(uint8_t arg_0x85191f0);
- 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 MultiHopTtestM$SendTimer$fired(void);
- static result_t MultiHopTtestM$Intercept$intercept(TOS_MsgPtr arg_0x854f548, void *arg_0x854f6a0, uint16_t arg_0x854f7f8);
- static result_t MultiHopTtestM$Send$sendDone(TOS_MsgPtr arg_0x8563dd8, result_t arg_0x8563f28);
- static result_t MultiHopTtestM$RouteTimer$fired(void);
- static result_t MultiHopTtestM$StatTimer$fired(void);
- static result_t MultiHopTtestM$StdControl$init(void);
- static result_t MultiHopTtestM$StdControl$start(void);
- static TOS_MsgPtr AMPromiscuous$ReceiveMsg$default$receive(uint8_t arg_0x85aae88, TOS_MsgPtr arg_0x85b1db0);
- static result_t AMPromiscuous$ActivityTimer$fired(void);
- static result_t AMPromiscuous$UARTSend$sendDone(TOS_MsgPtr arg_0x85bb080, result_t arg_0x85bb1d0);
- static TOS_MsgPtr AMPromiscuous$RadioReceive$receive(TOS_MsgPtr arg_0x85b1db0);
- static result_t AMPromiscuous$CommControl$setPromiscuous(bool arg_0x85a8158);
- static result_t AMPromiscuous$Control$init(void);
- static result_t AMPromiscuous$Control$start(void);
- static result_t AMPromiscuous$default$sendDone(void);
- static result_t AMPromiscuous$RadioSend$sendDone(TOS_MsgPtr arg_0x85bb080, result_t arg_0x85bb1d0);
- static result_t AMPromiscuous$SendMsg$send(uint8_t arg_0x85aa8d0, uint16_t arg_0x85a9e28, uint8_t arg_0x85b0010, TOS_MsgPtr arg_0x85b0160);
- static TOS_MsgPtr AMPromiscuous$UARTReceive$receive(TOS_MsgPtr arg_0x85b1db0);
- static result_t CC1000RadioIntM$SetDrand$Set(nodeInfo *arg_0x85796b8, uint8_t arg_0x8579800, nodeInfo *arg_0x8579968, uint16_t arg_0x8579ab8);
- static uint16_t CC1000RadioIntM$GetPower_sp(void);
- static result_t CC1000RadioIntM$SquelchTimer$fired(void);
- static uint16_t CC1000RadioIntM$GetSquelch(void);
- static result_t CC1000RadioIntM$ResetPower(void);
- static result_t CC1000RadioIntM$Send$send(TOS_MsgPtr arg_0x85bab68);
- static uint16_t CC1000RadioIntM$GetDataSent(void);
- static result_t CC1000RadioIntM$ResetDataSent(void);
- static result_t CC1000RadioIntM$TDMATimer$fired(void);
- static result_t CC1000RadioIntM$SpiByteFifo$dataReady(uint8_t arg_0x86357c8);
- static result_t CC1000RadioIntM$WakeupTimer$fired(void);
- static void CC1000RadioIntM$RadioReceiveCoordinator$default$byte(TOS_MsgPtr arg_0x85f8180, uint8_t arg_0x85f82d0);
- static void CC1000RadioIntM$RadioReceiveCoordinator$default$blockTimer(void);
- static void CC1000RadioIntM$RadioReceiveCoordinator$default$startSymbol(uint8_t arg_0x85eba50, uint8_t arg_0x85ebb98, TOS_MsgPtr arg_0x85ebce8);
- static void CC1000RadioIntM$RadioSendCoordinator$default$byte(TOS_MsgPtr arg_0x85f8180, uint8_t arg_0x85f82d0);
- static void CC1000RadioIntM$RadioSendCoordinator$default$blockTimer(void);
- static void CC1000RadioIntM$RadioSendCoordinator$default$startSymbol(uint8_t arg_0x85eba50, uint8_t arg_0x85ebb98, TOS_MsgPtr arg_0x85ebce8);
- static uint16_t CC1000RadioIntM$GetPower_tx(void);
- static uint16_t CC1000RadioIntM$GetPower_rx(void);
- static result_t CC1000RadioIntM$SClock$syncDone(void);
- static result_t CC1000RadioIntM$SClock$fire(uint16_t arg_0x8624768);
- static result_t CC1000RadioIntM$StdControl$init(void);
- static result_t CC1000RadioIntM$StdControl$start(void);
- static result_t CC1000RadioIntM$RSSIADC$dataReady(uint16_t arg_0x8636a60);
- static int16_t CC1000RadioIntM$MacBackoff$default$initialBackoff(TOS_MsgPtr arg_0x85f7e60);
- static int16_t CC1000RadioIntM$MacBackoff$default$congestionBackoff(TOS_MsgPtr arg_0x85fe310);
- static result_t CC1000ControlM$CC1000Control$SetRFPower(uint8_t arg_0x856ce78);
- static bool CC1000ControlM$CC1000Control$GetLOStatus(void);
- static result_t CC1000ControlM$CC1000Control$TunePreset(uint8_t arg_0x85513e8);
- static result_t CC1000ControlM$CC1000Control$RxMode(void);
- static result_t CC1000ControlM$CC1000Control$BIASOn(void);
- static result_t CC1000ControlM$CC1000Control$TxMode(void);
- static result_t CC1000ControlM$CC1000Control$SelectLock(uint8_t arg_0x856d710);
- static result_t CC1000ControlM$StdControl$init(void);
- static result_t CC1000ControlM$StdControl$start(void);
- static result_t CC1000ControlM$StdControl$stop(void);
- static result_t HPLCC1000M$HPLCC1000$init(void);
- static uint8_t HPLCC1000M$HPLCC1000$read(uint8_t arg_0x87b1d20);
- static result_t HPLCC1000M$HPLCC1000$write(uint8_t arg_0x87b1768, uint8_t arg_0x87b18b0);
- static uint16_t RandomLFSR$Random$rand(void);
- static result_t RandomLFSR$Random$init(void);
- static result_t ADCREFM$HPLADC$dataReady(uint16_t arg_0x87f91b8);
- static result_t ADCREFM$CalADC$default$dataReady(uint8_t arg_0x87e1f08, uint16_t arg_0x8636a60);
- static result_t ADCREFM$ADCControl$bindPort(uint8_t arg_0x8630810, uint8_t arg_0x8630958);
- static result_t ADCREFM$ADCControl$init(void);
- static result_t ADCREFM$ADCControl$manualCalibrate(void);
- static result_t ADCREFM$ADC$getData(uint8_t arg_0x87e1880);
- static result_t ADCREFM$ADC$default$dataReady(uint8_t arg_0x87e1880, uint16_t arg_0x8636a60);
- static result_t ADCREFM$Timer$fired(void);
- static result_t HPLADCM$ADC$bindPort(uint8_t arg_0x87f8060, uint8_t arg_0x87f81a8);
- static result_t HPLADCM$ADC$init(void);
- static result_t HPLADCM$ADC$samplePort(uint8_t arg_0x87f8690);
- 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_0x85e4d90);
- static result_t TimerM$Timer$start(uint8_t arg_0x85e4d90, char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static result_t TimerM$Timer$stop(uint8_t arg_0x85e4d90);
- static void HPLClock$Clock$setInterval(uint8_t arg_0x882d378);
- static uint8_t HPLClock$Clock$readCounter(void);
- static result_t HPLClock$Clock$setRate(char arg_0x882c878, char arg_0x882c9b8);
- static uint8_t HPLClock$Clock$getInterval(void);
- static result_t NoLeds$Leds$greenToggle(void);
- static result_t NoLeds$Leds$yellowToggle(void);
- static result_t NoLeds$Leds$redToggle(void);
- static uint8_t HPLPowerManagementM$PowerManagement$adjustPower(void);
- static result_t HPLSpiM$SpiByteFifo$initSlave(void);
- static result_t HPLSpiM$SpiByteFifo$disableIntr(void);
- static result_t HPLSpiM$SpiByteFifo$writeByte(uint8_t arg_0x8634010);
- static result_t HPLSpiM$SpiByteFifo$enableIntr(void);
- static result_t HPLSpiM$SpiByteFifo$txMode(void);
- static result_t HPLSpiM$SpiByteFifo$rxMode(void);
- static void HPLSClock$SClock$getTime(GTime *arg_0x862b720);
- static void HPLSClock$SClock$setTime(uint8_t arg_0x862bb68, GTime *arg_0x862bcc8);
- static result_t HPLSClock$SClock$SetRate(uint16_t arg_0x862a9b0, char arg_0x862aaf0);
- static result_t FramerM$ByteComm$txDone(void);
- static result_t FramerM$ByteComm$txByteReady(bool arg_0x88b1400);
- static result_t FramerM$ByteComm$rxByteReady(uint8_t arg_0x88b0c30, bool arg_0x88b0d78, uint16_t arg_0x88b0ed0);
- static result_t FramerM$BareSendMsg$send(TOS_MsgPtr arg_0x85bab68);
- static result_t FramerM$StdControl$init(void);
- static result_t FramerM$StdControl$start(void);
- static result_t FramerM$TokenReceiveMsg$ReflectToken(uint8_t arg_0x88b2a98);
- static TOS_MsgPtr FramerAckM$ReceiveMsg$receive(TOS_MsgPtr arg_0x85b1db0);
- static TOS_MsgPtr FramerAckM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0x88b2338, uint8_t arg_0x88b2480);
- static result_t UARTM$HPLUART$get(uint8_t arg_0x88d4fc8);
- static result_t UARTM$HPLUART$putDone(void);
- static result_t UARTM$ByteComm$txByte(uint8_t arg_0x88b07a0);
- static result_t UARTM$Control$init(void);
- static result_t UARTM$Control$start(void);
- static result_t HPLUART0M$UART$init(void);
- static result_t HPLUART0M$UART$put(uint8_t arg_0x88d4ac8);
- static TOS_MsgPtr MultiHopEngineM$ReceiveMsg$receive(uint8_t arg_0x89170b0, TOS_MsgPtr arg_0x85b1db0);
- static result_t MultiHopEngineM$Intercept$default$intercept(uint8_t arg_0x8913f48, TOS_MsgPtr arg_0x854f548, void *arg_0x854f6a0, uint16_t arg_0x854f7f8);
- static result_t MultiHopEngineM$Send$send(uint8_t arg_0x89138e0, TOS_MsgPtr arg_0x8562cc0, uint16_t arg_0x8562e10);
- static void *MultiHopEngineM$Send$getBuffer(uint8_t arg_0x89138e0, TOS_MsgPtr arg_0x8563448, uint16_t *arg_0x85635b0);
- static result_t MultiHopEngineM$Send$default$sendDone(uint8_t arg_0x89138e0, TOS_MsgPtr arg_0x8563dd8, result_t arg_0x8563f28);
- static result_t MultiHopEngineM$SendMsg$sendDone(uint8_t arg_0x89175b0, TOS_MsgPtr arg_0x85b0580, result_t arg_0x85b06d0);
- static result_t MultiHopEngineM$StdControl$init(void);
- static result_t MultiHopEngineM$StdControl$start(void);
- static uint16_t MultiHopEngineM$RouteControl$getParent(void);
- static result_t MultiHopWMEWMA$RouteSelect$selectRoute(TOS_MsgPtr arg_0x89392f8, uint8_t arg_0x8939440);
- static result_t MultiHopWMEWMA$RouteSelect$initializeFields(TOS_MsgPtr arg_0x89399b8, uint8_t arg_0x8939b00);
- static result_t MultiHopWMEWMA$Timer$fired(void);
- static TOS_MsgPtr MultiHopWMEWMA$ReceiveMsg$receive(TOS_MsgPtr arg_0x85b1db0);
- static result_t MultiHopWMEWMA$Snoop$intercept(uint8_t arg_0x8947910, TOS_MsgPtr arg_0x854f548, void *arg_0x854f6a0, uint16_t arg_0x854f7f8);
- static result_t MultiHopWMEWMA$DebugSendMsg$sendDone(TOS_MsgPtr arg_0x8563dd8, result_t arg_0x8563f28);
- static result_t MultiHopWMEWMA$ATimer$fired(void);
- static result_t MultiHopWMEWMA$SendMsg$sendDone(TOS_MsgPtr arg_0x85b0580, result_t arg_0x85b06d0);
- static result_t MultiHopWMEWMA$StdControl$init(void);
- static result_t MultiHopWMEWMA$StdControl$start(void);
- static uint16_t MultiHopWMEWMA$RouteControl$getParent(void);
- static result_t QueuedSendM$QueueSendMsg$send(uint8_t arg_0x89a2010, uint16_t arg_0x85a9e28, uint8_t arg_0x85b0010, TOS_MsgPtr arg_0x85b0160);
- static result_t QueuedSendM$StdControl$init(void);
- static result_t QueuedSendM$StdControl$start(void);
- static result_t QueuedSendM$SerialSendMsg$sendDone(uint8_t arg_0x89a2998, TOS_MsgPtr arg_0x85b0580, result_t arg_0x85b06d0);
- static
- # 47 "/home/testuser/tinyos-1.x/tos/system/RealMain.nc"
- result_t RealMain$hardwareInit(void);
- static
- # 78 "/home/testuser/tinyos-1.x/tos/interfaces/Pot.nc"
- result_t RealMain$Pot$init(uint8_t arg_0x85191f0);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t RealMain$StdControl$init(void);
- static
- result_t RealMain$StdControl$start(void);
- # 54 "/home/testuser/tinyos-1.x/tos/system/RealMain.nc"
- int main(void);
- static
- # 74 "/home/testuser/tinyos-1.x/tos/interfaces/HPLPot.nc"
- result_t PotM$HPLPot$finalise(void);
- static
- #line 59
- result_t PotM$HPLPot$decrease(void);
- static
- result_t PotM$HPLPot$increase(void);
- # 91 "/home/testuser/tinyos-1.x/tos/system/PotM.nc"
- uint8_t PotM$potSetting;
- static inline
- void PotM$setPot(uint8_t value);
- static inline
- #line 106
- result_t PotM$Pot$init(uint8_t initialSetting);
- static inline
- # 57 "../../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 "/home/testuser/tinyos-1.x/tos/platform/avrmote/HPLInit.nc"
- result_t HPLInit$init(void);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t MultiHopTtestM$SendTimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- # 4 "../../tos/interfaces/SetDrand.nc"
- result_t MultiHopTtestM$SetDrand$Set(nodeInfo *arg_0x85796b8, uint8_t arg_0x8579800, nodeInfo *arg_0x8579968, uint16_t arg_0x8579ab8);
- static
- # 29 "MultiHopTtestM.nc"
- uint16_t MultiHopTtestM$GetPower_sp(void);
- static
- # 83 "/home/testuser/tinyos-1.x/tos/interfaces/Send.nc"
- result_t MultiHopTtestM$Send$send(TOS_MsgPtr arg_0x8562cc0, uint16_t arg_0x8562e10);
- static
- #line 106
- void *MultiHopTtestM$Send$getBuffer(TOS_MsgPtr arg_0x8563448, uint16_t *arg_0x85635b0);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/Random.nc"
- uint16_t MultiHopTtestM$Random$rand(void);
- static
- #line 57
- result_t MultiHopTtestM$Random$init(void);
- static
- # 25 "MultiHopTtestM.nc"
- result_t MultiHopTtestM$ResetPower(void);
- static result_t MultiHopTtestM$ResetDataSent(void);
- static
- uint16_t MultiHopTtestM$GetDataSent(void);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t MultiHopTtestM$RouteTimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- #line 59
- result_t MultiHopTtestM$StatTimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- # 150 "../../tos/platform/mica2/CC1000Control.nc"
- result_t MultiHopTtestM$RFset$SetRFPower(uint8_t arg_0x856ce78);
- static
- # 27 "MultiHopTtestM.nc"
- uint16_t MultiHopTtestM$GetPower_tx(void);
- static
- uint16_t MultiHopTtestM$GetPower_rx(void);
- static
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/RouteControl.nc"
- uint16_t MultiHopTtestM$RouteControl$getParent(void);
- # 43 "/usr/lib/gcc-lib/avr/3.3/include/stdarg.h" 3
- typedef __builtin_va_list MultiHopTtestM$__gnuc_va_list;
- #line 105
- typedef MultiHopTtestM$__gnuc_va_list MultiHopTtestM$va_list;
- # 8 "../../tos/interfaces/SODebug.h"
- char MultiHopTtestM$debugbuf[256];
- static inline
- void MultiHopTtestM$init_debug(void);
- static
- #line 35
- void MultiHopTtestM$UARTPutChar(char c);
- static
- void MultiHopTtestM$writedebug(void);
- static
- int MultiHopTtestM$sprintf(uint8_t *buf, const uint8_t *format, ...);
- # 37 "MultiHopTtestM.nc"
- TOS_Msg MultiHopTtestM$DataPkt;
- uint16_t MultiHopTtestM$Rcount;
- uint16_t MultiHopTtestM$Scount;
- uint16_t MultiHopTtestM$time;
- bool MultiHopTtestM$txBusy;
- #line 41
- bool MultiHopTtestM$gotFrames;
- #line 41
- bool MultiHopTtestM$startSender;
- #line 41
- bool MultiHopTtestM$drandFirstTime;
- uint8_t MultiHopTtestM$eachCount[50];
- static inline
- result_t MultiHopTtestM$StdControl$init(void);
- static inline
- #line 68
- result_t MultiHopTtestM$StdControl$start(void);
- static inline
- #line 87
- result_t MultiHopTtestM$Send$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- result_t MultiHopTtestM$Intercept$intercept(TOS_MsgPtr m, void *payload, uint16_t payloadLen);
- static inline
- result_t MultiHopTtestM$SendTimer$fired(void);
- static inline
- #line 123
- result_t MultiHopTtestM$StatTimer$fired(void);
- static inline
- #line 149
- result_t MultiHopTtestM$RouteTimer$fired(void);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr AMPromiscuous$ReceiveMsg$receive(
- # 57 "/home/testuser/tinyos-1.x/tos/system/AMPromiscuous.nc"
- uint8_t arg_0x85aae88,
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr arg_0x85b1db0);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t AMPromiscuous$ActivityTimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- # 58 "/home/testuser/tinyos-1.x/tos/interfaces/BareSendMsg.nc"
- result_t AMPromiscuous$UARTSend$send(TOS_MsgPtr arg_0x85bab68);
- static
- # 41 "/home/testuser/tinyos-1.x/tos/interfaces/PowerManagement.nc"
- uint8_t AMPromiscuous$PowerManagement$adjustPower(void);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t AMPromiscuous$RadioControl$init(void);
- static
- result_t AMPromiscuous$RadioControl$start(void);
- static
- #line 63
- result_t AMPromiscuous$TimerControl$init(void);
- static
- result_t AMPromiscuous$TimerControl$start(void);
- static
- #line 63
- result_t AMPromiscuous$UARTControl$init(void);
- static
- result_t AMPromiscuous$UARTControl$start(void);
- static
- # 106 "/home/testuser/tinyos-1.x/tos/interfaces/Leds.nc"
- result_t AMPromiscuous$Leds$greenToggle(void);
- static
- # 67 "/home/testuser/tinyos-1.x/tos/system/AMPromiscuous.nc"
- result_t AMPromiscuous$sendDone(void);
- static
- # 58 "/home/testuser/tinyos-1.x/tos/interfaces/BareSendMsg.nc"
- result_t AMPromiscuous$RadioSend$send(TOS_MsgPtr arg_0x85bab68);
- static
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t AMPromiscuous$SendMsg$sendDone(
- # 56 "/home/testuser/tinyos-1.x/tos/system/AMPromiscuous.nc"
- uint8_t arg_0x85aa8d0,
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- TOS_MsgPtr arg_0x85b0580, result_t arg_0x85b06d0);
- # 84 "/home/testuser/tinyos-1.x/tos/system/AMPromiscuous.nc"
- bool AMPromiscuous$state;
- TOS_MsgPtr AMPromiscuous$buffer;
- uint16_t AMPromiscuous$lastCount;
- uint16_t AMPromiscuous$counter;
- bool AMPromiscuous$promiscuous_mode;
- bool AMPromiscuous$crc_check;
- static inline
- result_t AMPromiscuous$Control$init(void);
- static inline
- #line 109
- result_t AMPromiscuous$Control$start(void);
- static inline
- #line 146
- result_t AMPromiscuous$CommControl$setPromiscuous(bool value);
- static inline
- #line 159
- void AMPromiscuous$dbgPacket(TOS_MsgPtr data);
- static
- result_t AMPromiscuous$reportSendDone(TOS_MsgPtr msg, result_t success);
- static inline
- result_t AMPromiscuous$ActivityTimer$fired(void);
- static inline
- result_t AMPromiscuous$default$sendDone(void);
- static inline
- void AMPromiscuous$sendTask(void);
- static inline
- #line 206
- result_t AMPromiscuous$SendMsg$send(uint8_t id, uint16_t addr, uint8_t length, TOS_MsgPtr data);
- static inline
- #line 236
- result_t AMPromiscuous$UARTSend$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- result_t AMPromiscuous$RadioSend$sendDone(TOS_MsgPtr msg, result_t success);
- TOS_MsgPtr prom_received(TOS_MsgPtr packet);
- static inline
- #line 271
- TOS_MsgPtr AMPromiscuous$ReceiveMsg$default$receive(uint8_t id, TOS_MsgPtr msg);
- static inline
- TOS_MsgPtr AMPromiscuous$UARTReceive$receive(TOS_MsgPtr packet);
- static inline
- TOS_MsgPtr AMPromiscuous$RadioReceive$receive(TOS_MsgPtr packet);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t CC1000RadioIntM$SquelchTimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- result_t CC1000RadioIntM$SquelchTimer$stop(void);
- static
- # 67 "/home/testuser/tinyos-1.x/tos/interfaces/BareSendMsg.nc"
- result_t CC1000RadioIntM$Send$sendDone(TOS_MsgPtr arg_0x85bb080, result_t arg_0x85bb1d0);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/Random.nc"
- uint16_t CC1000RadioIntM$Random$rand(void);
- static
- #line 57
- result_t CC1000RadioIntM$Random$init(void);
- static
- # 116 "../../tos/platform/mica2/ADCControl.nc"
- result_t CC1000RadioIntM$ADCControl$bindPort(uint8_t arg_0x8630810, uint8_t arg_0x8630958);
- static
- #line 77
- result_t CC1000RadioIntM$ADCControl$init(void);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t CC1000RadioIntM$TDMATimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t CC1000RadioIntM$CC1000StdControl$init(void);
- static
- result_t CC1000RadioIntM$CC1000StdControl$start(void);
- static
- result_t CC1000RadioIntM$CC1000StdControl$stop(void);
- static
- #line 63
- result_t CC1000RadioIntM$TimerControl$init(void);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr CC1000RadioIntM$Receive$receive(TOS_MsgPtr arg_0x85b1db0);
- static
- # 38 "../../tos/platform/mica2/SpiByteFifo.nc"
- result_t CC1000RadioIntM$SpiByteFifo$initSlave(void);
- static
- #line 37
- result_t CC1000RadioIntM$SpiByteFifo$disableIntr(void);
- static
- #line 33
- result_t CC1000RadioIntM$SpiByteFifo$writeByte(uint8_t arg_0x8634010);
- static
- result_t CC1000RadioIntM$SpiByteFifo$enableIntr(void);
- static
- result_t CC1000RadioIntM$SpiByteFifo$txMode(void);
- static result_t CC1000RadioIntM$SpiByteFifo$rxMode(void);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t CC1000RadioIntM$WakeupTimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- result_t CC1000RadioIntM$WakeupTimer$stop(void);
- static
- # 36 "../../tos/platform/mica2/RadioCoordinator.nc"
- void CC1000RadioIntM$RadioReceiveCoordinator$byte(TOS_MsgPtr arg_0x85f8180, uint8_t arg_0x85f82d0);
- static
- void CC1000RadioIntM$RadioReceiveCoordinator$blockTimer(void);
- static
- #line 31
- void CC1000RadioIntM$RadioReceiveCoordinator$startSymbol(uint8_t arg_0x85eba50, uint8_t arg_0x85ebb98, TOS_MsgPtr arg_0x85ebce8);
- static
- # 81 "/home/testuser/tinyos-1.x/tos/interfaces/Leds.nc"
- result_t CC1000RadioIntM$Leds$redToggle(void);
- static
- # 190 "../../tos/platform/mica2/CC1000Control.nc"
- bool CC1000RadioIntM$CC1000Control$GetLOStatus(void);
- static
- #line 116
- result_t CC1000RadioIntM$CC1000Control$RxMode(void);
- static
- #line 137
- result_t CC1000RadioIntM$CC1000Control$BIASOn(void);
- static
- #line 108
- result_t CC1000RadioIntM$CC1000Control$TxMode(void);
- static
- #line 170
- result_t CC1000RadioIntM$CC1000Control$SelectLock(uint8_t arg_0x856d710);
- static
- # 36 "../../tos/platform/mica2/RadioCoordinator.nc"
- void CC1000RadioIntM$RadioSendCoordinator$byte(TOS_MsgPtr arg_0x85f8180, uint8_t arg_0x85f82d0);
- static
- void CC1000RadioIntM$RadioSendCoordinator$blockTimer(void);
- static
- #line 31
- void CC1000RadioIntM$RadioSendCoordinator$startSymbol(uint8_t arg_0x85eba50, uint8_t arg_0x85ebb98, TOS_MsgPtr arg_0x85ebce8);
- static
- # 63 "../../tos/interfaces/SClock.nc"
- void CC1000RadioIntM$SClock$getTime(GTime *arg_0x862b720);
- static
- void CC1000RadioIntM$SClock$setTime(uint8_t arg_0x862bb68, GTime *arg_0x862bcc8);
- static
- #line 45
- result_t CC1000RadioIntM$SClock$SetRate(uint16_t arg_0x862a9b0, char arg_0x862aaf0);
- static
- # 52 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.nc"
- result_t CC1000RadioIntM$RSSIADC$getData(void);
- static
- # 39 "../../tos/platform/mica2/MacBackoff.nc"
- int16_t CC1000RadioIntM$MacBackoff$initialBackoff(TOS_MsgPtr arg_0x85f7e60);
- static int16_t CC1000RadioIntM$MacBackoff$congestionBackoff(TOS_MsgPtr arg_0x85fe310);
- # 60 "../../tos/platform/mica2/CC1000RadioIntM.nc"
- enum CC1000RadioIntM$__nesc_unnamed4277 {
- CC1000RadioIntM$NULL_STATE,
- CC1000RadioIntM$TX_STATE,
- CC1000RadioIntM$DISABLED_STATE,
- CC1000RadioIntM$IDLE_STATE,
- CC1000RadioIntM$PRETX_STATE,
- CC1000RadioIntM$SYNC_STATE,
- CC1000RadioIntM$RX_STATE,
- CC1000RadioIntM$SENDING_ACK,
- CC1000RadioIntM$POWER_DOWN_STATE,
- CC1000RadioIntM$PULSE_CHECK_STATE
- };
- enum CC1000RadioIntM$__nesc_unnamed4278 {
- CC1000RadioIntM$TXSTATE_WAIT,
- CC1000RadioIntM$TXSTATE_START,
- CC1000RadioIntM$TXSTATE_PREAMBLE,
- CC1000RadioIntM$TXSTATE_SYNC,
- CC1000RadioIntM$TXSTATE_DATA,
- CC1000RadioIntM$TXSTATE_CRC,
- CC1000RadioIntM$TXSTATE_FLUSH,
- CC1000RadioIntM$TXSTATE_WAIT_FOR_ACK,
- CC1000RadioIntM$TXSTATE_READ_ACK,
- CC1000RadioIntM$TXSTATE_DONE
- };
- enum CC1000RadioIntM$__nesc_unnamed4279 {
- CC1000RadioIntM$SYNC_BYTE = 0x33,
- CC1000RadioIntM$NSYNC_BYTE = 0xcc,
- CC1000RadioIntM$SYNC_WORD = 0x33cc,
- CC1000RadioIntM$NSYNC_WORD = 0xcc33,
- CC1000RadioIntM$ACK_LENGTH = 16,
- CC1000RadioIntM$MAX_ACK_WAIT = 18,
- CC1000RadioIntM$TIME_BETWEEN_CHECKS = 50,
- CC1000RadioIntM$TIME_AFTER_CHECK = 30,
- CC1000RadioIntM$CHECK_MA_COUNT = 100,
- CC1000RadioIntM$SEND_MA_COUNT = 100,
- CC1000RadioIntM$PREAMBLE_LENGTH_TO_BASE = 8,
- CC1000RadioIntM$RECEIVE_MA_COUNT = 100
- };
- uint8_t CC1000RadioIntM$ack_code[5] = { 0xab, 0xba, 0x83, 0xaa, 0xaa };
- uint8_t CC1000RadioIntM$RadioState;
- uint8_t CC1000RadioIntM$RadioTxState;
- uint8_t CC1000RadioIntM$iRSSIcount;
- uint8_t CC1000RadioIntM$RSSIInitState;
- uint8_t CC1000RadioIntM$iSquelchCount;
- uint16_t CC1000RadioIntM$txlength;
- uint16_t CC1000RadioIntM$rxlength;
- TOS_MsgPtr CC1000RadioIntM$txbufptr;
- TOS_MsgPtr CC1000RadioIntM$rxbufptr;
- TOS_Msg CC1000RadioIntM$RxBuf;
- uint8_t CC1000RadioIntM$NextTxByte;
- uint8_t CC1000RadioIntM$lplpower;
- uint8_t CC1000RadioIntM$lplpowertx;
- uint16_t CC1000RadioIntM$preamblelen;
- uint16_t CC1000RadioIntM$sleeptime;
- uint16_t CC1000RadioIntM$PreambleCount;
- uint8_t CC1000RadioIntM$SOFCount;
- uint16_t CC1000RadioIntM$search_word;
- enum CC1000RadioIntM$__nesc_unnamed4280 {
- CC1000RadioIntM$BMAC,
- CC1000RadioIntM$ZMAC
- };
- enum CC1000RadioIntM$__nesc_unnamed4281 {
- CC1000RadioIntM$MAX_VAL = 0xFFFF
- };
- enum CC1000RadioIntM$__nesc_unnamed4282 {
- CC1000RadioIntM$POSITIVE = 1,
- CC1000RadioIntM$NEGATIVE = 2,
- CC1000RadioIntM$ZERO = 3
- };
- nodeInfo CC1000RadioIntM$nbrInfo[MAX_NBR];
- GTime CC1000RadioIntM$currentDiff;
- #line 150
- GTime CC1000RadioIntM$constOffset;
- uint16_t CC1000RadioIntM$currentSender;
- uint8_t CC1000RadioIntM$currentSign;
- uint8_t CC1000RadioIntM$currentMAC;
- uint16_t CC1000RadioIntM$localFrameLength;
- uint16_t CC1000RadioIntM$globalFrameLength;
- uint16_t CC1000RadioIntM$slotSize;
- uint16_t CC1000RadioIntM$nextHop;
- uint16_t CC1000RadioIntM$ownSlot;
- uint16_t CC1000RadioIntM$slots_since_ecnsend;
- uint16_t CC1000RadioIntM$slots_since_ecnrecv;
- uint16_t CC1000RadioIntM$slots_since_ecncheck;
- uint16_t CC1000RadioIntM$globalFrameSize;
- uint16_t CC1000RadioIntM$localFrameSize;
- uint16_t CC1000RadioIntM$globalSlot;
- uint16_t CC1000RadioIntM$currentSlot;
- uint16_t CC1000RadioIntM$slotMultiplier;
- uint32_t CC1000RadioIntM$slotNum;
- uint16_t CC1000RadioIntM$packetsSent;
- uint16_t CC1000RadioIntM$pktsLastSync;
- bool CC1000RadioIntM$needTimeSync;
- uint16_t CC1000RadioIntM$congBackOffs;
- double CC1000RadioIntM$avgLoss;
- uint32_t CC1000RadioIntM$curHCLlist;
- bool CC1000RadioIntM$HCLselect;
- bool CC1000RadioIntM$ackOrig;
- bool CC1000RadioIntM$ecnPending;
- bool CC1000RadioIntM$ecnforward;
- bool CC1000RadioIntM$enableHCL;
- bool CC1000RadioIntM$pureHCL;
- TOS_Msg CC1000RadioIntM$ecnMsgHdr;
- TOS_Msg CC1000RadioIntM$ecnForwardMsgHdr;
- TOS_Msg CC1000RadioIntM$syncMsgHdr;
- union CC1000RadioIntM$__nesc_unnamed4283 {
- uint16_t W;
- struct {
- uint8_t LSB;
- uint8_t MSB;
- } ;
- } CC1000RadioIntM$RxShiftBuf;
- uint8_t CC1000RadioIntM$RxBitOffset;
- uint16_t CC1000RadioIntM$RxByteCnt;
- uint16_t CC1000RadioIntM$TxByteCnt;
- uint16_t CC1000RadioIntM$RSSISampleFreq;
- bool CC1000RadioIntM$bInvertRxData;
- bool CC1000RadioIntM$bTxPending;
- bool CC1000RadioIntM$bAckEnable;
- bool CC1000RadioIntM$bCCAEnable;
- bool CC1000RadioIntM$bTxBusy;
- bool CC1000RadioIntM$bRSSIValid;
- uint16_t CC1000RadioIntM$CC1K_PulseLevel;
- uint16_t CC1000RadioIntM$usRunningCRC;
- uint16_t CC1000RadioIntM$usRSSIVal;
- uint16_t CC1000RadioIntM$usSquelchVal;
- uint16_t CC1000RadioIntM$usTempSquelch;
- uint8_t CC1000RadioIntM$usSquelchIndex;
- uint8_t CC1000RadioIntM$pulse_check_count;
- uint16_t CC1000RadioIntM$pulse_check_sum;
- uint16_t CC1000RadioIntM$send_sum;
- uint16_t CC1000RadioIntM$receive_sum;
- uint16_t CC1000RadioIntM$power_sum;
- uint16_t CC1000RadioIntM$sp_sum;
- uint16_t CC1000RadioIntM$rx_sum;
- uint16_t CC1000RadioIntM$tx_sum;
- uint16_t CC1000RadioIntM$dataSent;
- uint16_t CC1000RadioIntM$usSquelchTable[9];
- int16_t CC1000RadioIntM$sMacDelay;
- volatile uint16_t CC1000RadioIntM$LocalAddr;
- static inline
- #line 245
- uint16_t CC1000RadioIntM$getOwnerBackoff(void);
- static inline
- uint16_t CC1000RadioIntM$getNonOwnerBackoff(void);
- static inline
- void CC1000RadioIntM$DivTime2(GTime *B, GTime *A);
- static inline
- void CC1000RadioIntM$AddTime(GTime *C, GTime *A, GTime *B);
- static
- void CC1000RadioIntM$SubTime(GTime *C, GTime *A, GTime *B);
- static
- uint16_t CC1000RadioIntM$getZMACBackoff(uint16_t residualBackoff);
- static inline
- #line 306
- uint8_t CC1000RadioIntM$ModSubTime(GTime *C, GTime *A, GTime *B);
- static inline
- #line 329
- bool CC1000RadioIntM$IsHCL(uint32_t gSlot);
- static
- #line 342
- void CC1000RadioIntM$adjustSquelch(void);
- static inline
- #line 387
- void CC1000RadioIntM$getTimeDiff(void);
- static
- #line 409
- void CC1000RadioIntM$Blacklist(uint8_t slot, uint8_t fsize);
- static inline
- #line 424
- void CC1000RadioIntM$adjustTime(void);
- static
- void CC1000RadioIntM$PacketRcvd(void);
- static inline
- #line 506
- void CC1000RadioIntM$PacketSent(void);
- static
- #line 563
- result_t CC1000RadioIntM$SetDrand$Set(nodeInfo *mInfo, uint8_t nHop, nodeInfo *nInfo, uint16_t sSize);
- static inline
- #line 648
- result_t CC1000RadioIntM$StdControl$init(void);
- static inline
- #line 916
- result_t CC1000RadioIntM$SquelchTimer$fired(void);
- static inline
- result_t CC1000RadioIntM$WakeupTimer$fired(void);
- static inline
- #line 980
- result_t CC1000RadioIntM$TDMATimer$fired(void);
- static inline
- #line 1056
- result_t CC1000RadioIntM$StdControl$start(void);
- static
- #line 1102
- result_t CC1000RadioIntM$Send$send(TOS_MsgPtr pMsg);
- static
- #line 1166
- result_t CC1000RadioIntM$SpiByteFifo$dataReady(uint8_t data_in);
- static
- #line 1586
- void CC1000RadioIntM$IdleTimerTask(void);
- static inline
- #line 1606
- void CC1000RadioIntM$SleepTimerTask(void);
- static inline
- result_t CC1000RadioIntM$RSSIADC$dataReady(uint16_t data);
- static inline
- #line 1724
- uint16_t CC1000RadioIntM$GetSquelch(void);
- static inline
- uint16_t CC1000RadioIntM$GetDataSent(void);
- static inline
- result_t CC1000RadioIntM$ResetDataSent(void);
- static inline
- uint16_t CC1000RadioIntM$GetPower_tx(void);
- static inline
- uint16_t CC1000RadioIntM$GetPower_rx(void);
- static inline
- uint16_t CC1000RadioIntM$GetPower_sp(void);
- static
- result_t CC1000RadioIntM$ResetPower(void);
- static inline
- #line 1786
- void CC1000RadioIntM$RadioSendCoordinator$default$startSymbol(uint8_t bitsPerBlock, uint8_t offset,
- TOS_MsgPtr msgBuff);
- static inline void CC1000RadioIntM$RadioSendCoordinator$default$byte(TOS_MsgPtr msg, uint8_t byteCount);
- static inline void CC1000RadioIntM$RadioSendCoordinator$default$blockTimer(void);
- static inline
- void CC1000RadioIntM$RadioReceiveCoordinator$default$startSymbol(uint8_t bitsPerBlock, uint8_t offset,
- TOS_MsgPtr msgBuff);
- static inline void CC1000RadioIntM$RadioReceiveCoordinator$default$byte(TOS_MsgPtr msg, uint8_t byteCount);
- static inline void CC1000RadioIntM$RadioReceiveCoordinator$default$blockTimer(void);
- static inline
- int16_t CC1000RadioIntM$MacBackoff$default$initialBackoff(TOS_MsgPtr m);
- static inline
- int16_t CC1000RadioIntM$MacBackoff$default$congestionBackoff(TOS_MsgPtr m);
- static inline
- result_t CC1000RadioIntM$SClock$syncDone(void);
- static inline
- #line 1823
- result_t CC1000RadioIntM$SClock$fire(uint16_t mticks);
- static
- # 51 "../../tos/platform/mica2/HPLCC1000.nc"
- result_t CC1000ControlM$HPLChipcon$init(void);
- static
- #line 65
- uint8_t CC1000ControlM$HPLChipcon$read(uint8_t arg_0x87b1d20);
- static
- #line 58
- result_t CC1000ControlM$HPLChipcon$write(uint8_t arg_0x87b1768, uint8_t arg_0x87b18b0);
-
- # 83 "../../tos/platform/mica2/CC1000ControlM.nc"
- uint8_t CC1000ControlM$gCurrentParameters[31];
- enum CC1000ControlM$__nesc_unnamed4284 {
- CC1000ControlM$IF = 150000,
- CC1000ControlM$FREQ_MIN = 4194304,
- CC1000ControlM$FREQ_MAX = 16751615
- };
- static inline
- #line 131
- result_t CC1000ControlM$chipcon_cal(void);
- static inline
- #line 187
- void CC1000ControlM$cc1000SetFreq(void);
- static inline
- #line 203
- void CC1000ControlM$cc1000SetModem(void);
- static inline
- #line 342
- result_t CC1000ControlM$StdControl$init(void);
- static inline
- #line 400
- result_t CC1000ControlM$CC1000Control$TunePreset(uint8_t freq);
- static
- #line 422
- result_t CC1000ControlM$CC1000Control$TxMode(void);
- static
- #line 435
- result_t CC1000ControlM$CC1000Control$RxMode(void);
- static inline
- #line 457
- result_t CC1000ControlM$CC1000Control$BIASOn(void);
- static inline
- #line 469
- result_t CC1000ControlM$StdControl$stop(void);
- static inline
- result_t CC1000ControlM$StdControl$start(void);
- static inline
- #line 494
- result_t CC1000ControlM$CC1000Control$SetRFPower(uint8_t power);
- static inline
- result_t CC1000ControlM$CC1000Control$SelectLock(uint8_t Value);
- static inline
- #line 517
- bool CC1000ControlM$CC1000Control$GetLOStatus(void);
- static inline
- # 51 "../../tos/platform/mica2/HPLCC1000M.nc"
- result_t HPLCC1000M$HPLCC1000$init(void);
- static
- #line 75
- result_t HPLCC1000M$HPLCC1000$write(uint8_t addr, uint8_t data);
- static
- #line 128
- uint8_t HPLCC1000M$HPLCC1000$read(uint8_t addr);
- # 54 "/home/testuser/tinyos-1.x/tos/system/RandomLFSR.nc"
- uint16_t RandomLFSR$shiftReg;
- uint16_t RandomLFSR$initSeed;
- uint16_t RandomLFSR$mask;
- static
- result_t RandomLFSR$Random$init(void);
- static
- uint16_t RandomLFSR$Random$rand(void);
- static
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/HPLADC.nc"
- result_t ADCREFM$HPLADC$bindPort(uint8_t arg_0x87f8060, uint8_t arg_0x87f81a8);
- static
- #line 54
- result_t ADCREFM$HPLADC$init(void);
- static
- #line 77
- result_t ADCREFM$HPLADC$samplePort(uint8_t arg_0x87f8690);
- static
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.nc"
- result_t ADCREFM$CalADC$dataReady(
- # 67 "../../tos/platform/mica2/ADCREFM.nc"
- uint8_t arg_0x87e1f08,
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.nc"
- uint16_t arg_0x8636a60);
- static
- #line 70
- result_t ADCREFM$ADC$dataReady(
- # 66 "../../tos/platform/mica2/ADCREFM.nc"
- uint8_t arg_0x87e1880,
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.nc"
- uint16_t arg_0x8636a60);
- # 80 "../../tos/platform/mica2/ADCREFM.nc"
- enum ADCREFM$__nesc_unnamed4285 {
- ADCREFM$IDLE = 0,
- ADCREFM$SINGLE_CONVERSION = 1,
- ADCREFM$CONTINUOUS_CONVERSION = 2
- };
- uint16_t ADCREFM$ReqPort;
- uint16_t ADCREFM$ReqVector;
- uint16_t ADCREFM$ContReqMask;
- uint16_t ADCREFM$CalReqMask;
- uint32_t ADCREFM$RefVal;
- static inline
- void ADCREFM$CalTask(void);
- static inline
- result_t ADCREFM$ADCControl$init(void);
- static inline
- #line 114
- result_t ADCREFM$ADCControl$bindPort(uint8_t port, uint8_t adcPort);
- static inline
- result_t ADCREFM$ADC$default$dataReady(uint8_t port, uint16_t data);
- static inline
- result_t ADCREFM$CalADC$default$dataReady(uint8_t port, uint16_t data);
- static inline
- result_t ADCREFM$Timer$fired(void);
- static inline
- result_t ADCREFM$HPLADC$dataReady(uint16_t data);
- static
- #line 198
- result_t ADCREFM$startGet(uint8_t port);
- static inline
- #line 222
- result_t ADCREFM$ADC$getData(uint8_t port);
- static inline
- #line 284
- result_t ADCREFM$ADCControl$manualCalibrate(void);
- static
- # 99 "/home/testuser/tinyos-1.x/tos/interfaces/HPLADC.nc"
- result_t HPLADCM$ADC$dataReady(uint16_t arg_0x87f91b8);
- # 60 "../../tos/platform/mica2/HPLADCM.nc"
- bool HPLADCM$init_portmap_done;
- uint8_t HPLADCM$TOSH_adc_portmap[TOSH_ADC_PORTMAPSIZE];
- static
- void HPLADCM$init_portmap(void);
- static inline
- #line 90
- result_t HPLADCM$ADC$init(void);
- static inline
- #line 110
- result_t HPLADCM$ADC$bindPort(uint8_t port, uint8_t adcPort);
- static
- #line 122
- result_t HPLADCM$ADC$samplePort(uint8_t port);
- #line 144
- void __attribute((signal)) __vector_21(void);
- static
- # 41 "/home/testuser/tinyos-1.x/tos/interfaces/PowerManagement.nc"
- uint8_t TimerM$PowerManagement$adjustPower(void);
- static
- # 105 "/home/testuser/tinyos-1.x/tos/interfaces/Clock.nc"
- void TimerM$Clock$setInterval(uint8_t arg_0x882d378);
- static
- #line 153
- uint8_t TimerM$Clock$readCounter(void);
- static
- #line 96
- result_t TimerM$Clock$setRate(char arg_0x882c878, char arg_0x882c9b8);
- static
- #line 121
- uint8_t TimerM$Clock$getInterval(void);
- static
- # 73 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t TimerM$Timer$fired(
- # 49 "/home/testuser/tinyos-1.x/tos/system/TimerM.nc"
- uint8_t arg_0x85e4d90);
- uint32_t TimerM$mState;
- uint8_t TimerM$setIntervalFlag;
- uint8_t TimerM$mScale;
- #line 61
- uint8_t TimerM$mInterval;
- int8_t TimerM$queue_head;
- int8_t TimerM$queue_tail;
- uint8_t TimerM$queue_size;
- uint8_t TimerM$queue[NUM_TIMERS];
- volatile uint16_t TimerM$interval_outstanding;
- struct TimerM$timer_s {
- uint8_t type;
- int32_t ticks;
- int32_t ticksLeft;
- } TimerM$mTimerList[NUM_TIMERS];
- enum TimerM$__nesc_unnamed4286 {
- TimerM$maxTimerInterval = 230
- };
- static result_t TimerM$StdControl$init(void);
- static inline
- result_t TimerM$StdControl$start(void);
- static
- result_t TimerM$Timer$start(uint8_t id, char type,
- uint32_t interval);
- #line 129
- static void TimerM$adjustInterval(void);
- static
- #line 168
- result_t TimerM$Timer$stop(uint8_t id);
- static inline
- #line 182
- result_t TimerM$Timer$default$fired(uint8_t id);
- static inline
- void TimerM$enqueue(uint8_t value);
- static inline
- uint8_t TimerM$dequeue(void);
- static inline
- void TimerM$signalOneTimer(void);
- static inline
- void TimerM$HandleFire(void);
- static inline
- #line 253
- result_t TimerM$Clock$fire(void);
- static
- # 180 "/home/testuser/tinyos-1.x/tos/interfaces/Clock.nc"
- result_t HPLClock$Clock$fire(void);
- # 54 "/home/testuser/tinyos-1.x/tos/platform/mica/HPLClock.nc"
- uint8_t HPLClock$set_flag;
- uint8_t HPLClock$mscale;
- #line 55
- uint8_t HPLClock$nextScale;
- #line 55
- uint8_t HPLClock$minterval;
- static inline
- #line 87
- void HPLClock$Clock$setInterval(uint8_t value);
- static inline
- uint8_t HPLClock$Clock$getInterval(void);
- static inline
- #line 134
- uint8_t HPLClock$Clock$readCounter(void);
- static inline
- #line 149
- result_t HPLClock$Clock$setRate(char interval, char scale);
- #line 167
- void __attribute((interrupt)) __vector_15(void);
- static inline
- # 63 "/home/testuser/tinyos-1.x/tos/system/NoLeds.nc"
- result_t NoLeds$Leds$redToggle(void);
- static inline
- #line 75
- result_t NoLeds$Leds$greenToggle(void);
- static inline
- #line 87
- result_t NoLeds$Leds$yellowToggle(void);
-
- # 51 "../../tos/platform/mica2/HPLPowerManagementM.nc"
- int8_t HPLPowerManagementM$disableCount = 1;
- uint8_t HPLPowerManagementM$powerLevel;
- enum HPLPowerManagementM$__nesc_unnamed4287 {
- HPLPowerManagementM$IDLE = 0,
- HPLPowerManagementM$ADC_NR = 1 << 3,
- HPLPowerManagementM$POWER_DOWN = 1 << 4,
- HPLPowerManagementM$POWER_SAVE = (1 << 3) + (1 << 4),
- HPLPowerManagementM$STANDBY = (1 << 2) + (1 << 4),
- HPLPowerManagementM$EXT_STANDBY = (1 << 3) + (1 << 4) + (1 << 2)
- };
- static inline
- uint8_t HPLPowerManagementM$getPowerLevel(void);
- static inline
- #line 85
- void HPLPowerManagementM$doAdjustment(void);
- static
- #line 102
- uint8_t HPLPowerManagementM$PowerManagement$adjustPower(void);
- static
- # 41 "/home/testuser/tinyos-1.x/tos/interfaces/PowerManagement.nc"
- uint8_t HPLSpiM$PowerManagement$adjustPower(void);
- static
- # 42 "../../tos/platform/mica2/SpiByteFifo.nc"
- result_t HPLSpiM$SpiByteFifo$dataReady(uint8_t arg_0x86357c8);
-
- # 51 "../../tos/platform/mica2/HPLSpiM.nc"
- uint8_t HPLSpiM$OutgoingByte;
- void __attribute((signal)) __vector_17(void);
- static inline
- result_t HPLSpiM$SpiByteFifo$writeByte(uint8_t data);
- static inline
- #line 74
- result_t HPLSpiM$SpiByteFifo$enableIntr(void);
- static
- result_t HPLSpiM$SpiByteFifo$disableIntr(void);
- static inline
- result_t HPLSpiM$SpiByteFifo$initSlave(void);
- static inline
- #line 103
- result_t HPLSpiM$SpiByteFifo$txMode(void);
- static inline
- result_t HPLSpiM$SpiByteFifo$rxMode(void);
- static
- # 94 "../../tos/interfaces/SClock.nc"
- result_t HPLSClock$SClock$syncDone(void);
- static
- #line 88
- result_t HPLSClock$SClock$fire(uint16_t arg_0x8624768);
- # 45 "../../tos/platform/mica2/HPLSClock.nc"
- uint16_t HPLSClock$MTicks;
- GTime HPLSClock$Update;
- uint8_t HPLSClock$sign;
- uint8_t HPLSClock$needupdate;
- static inline
- #line 66
- result_t HPLSClock$SClock$SetRate(uint16_t interval, char scale);
- static
- #line 95
- void HPLSClock$SClock$getTime(GTime *t);
- static inline
- #line 107
- void HPLSClock$SClock$setTime(uint8_t PosOrNeg, GTime *t);
- #line 124
- void __attribute((interrupt)) __vector_26(void);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr FramerM$ReceiveMsg$receive(TOS_MsgPtr arg_0x85b1db0);
- static
- # 55 "/home/testuser/tinyos-1.x/tos/interfaces/ByteComm.nc"
- result_t FramerM$ByteComm$txByte(uint8_t arg_0x88b07a0);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t FramerM$ByteControl$init(void);
- static
- result_t FramerM$ByteControl$start(void);
- static
- # 67 "/home/testuser/tinyos-1.x/tos/interfaces/BareSendMsg.nc"
- result_t FramerM$BareSendMsg$sendDone(TOS_MsgPtr arg_0x85bb080, result_t arg_0x85bb1d0);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/TokenReceiveMsg.nc"
- TOS_MsgPtr FramerM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0x88b2338, uint8_t arg_0x88b2480);
- # 82 "/home/testuser/tinyos-1.x/tos/system/FramerM.nc"
- enum FramerM$__nesc_unnamed4288 {
- FramerM$HDLC_QUEUESIZE = 2,
- FramerM$HDLC_MTU = sizeof(TOS_Msg ),
- FramerM$HDLC_FLAG_BYTE = 0x7e,
- FramerM$HDLC_CTLESC_BYTE = 0x7d,
- FramerM$PROTO_ACK = 64,
- FramerM$PROTO_PACKET_ACK = 65,
- FramerM$PROTO_PACKET_NOACK = 66,
- FramerM$PROTO_UNKNOWN = 255
- };
- enum FramerM$__nesc_unnamed4289 {
- FramerM$RXSTATE_NOSYNC,
- FramerM$RXSTATE_PROTO,
- FramerM$RXSTATE_TOKEN,
- FramerM$RXSTATE_INFO,
- FramerM$RXSTATE_ESC
- };
- enum FramerM$__nesc_unnamed4290 {
- FramerM$TXSTATE_IDLE,
- FramerM$TXSTATE_PROTO,
- FramerM$TXSTATE_INFO,
- FramerM$TXSTATE_ESC,
- FramerM$TXSTATE_FCS1,
- FramerM$TXSTATE_FCS2,
- FramerM$TXSTATE_ENDFLAG,
- FramerM$TXSTATE_FINISH,
- FramerM$TXSTATE_ERROR
- };
- enum FramerM$__nesc_unnamed4291 {
- FramerM$FLAGS_TOKENPEND = 0x2,
- FramerM$FLAGS_DATAPEND = 0x4,
- FramerM$FLAGS_UNKNOWN = 0x8
- };
- TOS_Msg FramerM$gMsgRcvBuf[FramerM$HDLC_QUEUESIZE];
- typedef struct FramerM$_MsgRcvEntry {
- uint8_t Proto;
- uint8_t Token;
- uint16_t Length;
- TOS_MsgPtr pMsg;
- } FramerM$MsgRcvEntry_t;
- FramerM$MsgRcvEntry_t FramerM$gMsgRcvTbl[FramerM$HDLC_QUEUESIZE];
- uint8_t *FramerM$gpRxBuf;
- uint8_t *FramerM$gpTxBuf;
- uint8_t FramerM$gFlags;
-
- uint8_t FramerM$gTxState;
- uint8_t FramerM$gPrevTxState;
- uint16_t FramerM$gTxProto;
- uint16_t FramerM$gTxByteCnt;
- uint16_t FramerM$gTxLength;
- uint16_t FramerM$gTxRunningCRC;
- uint8_t FramerM$gRxState;
- uint8_t FramerM$gRxHeadIndex;
- uint8_t FramerM$gRxTailIndex;
- uint16_t FramerM$gRxByteCnt;
- uint16_t FramerM$gRxRunningCRC;
- TOS_MsgPtr FramerM$gpTxMsg;
- uint8_t FramerM$gTxTokenBuf;
- uint8_t FramerM$gTxUnknownBuf;
- uint8_t FramerM$gTxEscByte;
- static
- void FramerM$PacketSent(void);
- static
- result_t FramerM$StartTx(void);
- static inline
- #line 202
- void FramerM$PacketUnknown(void);
- static inline
- void FramerM$PacketRcvd(void);
- static
- #line 246
- void FramerM$PacketSent(void);
- static
- #line 268
- void FramerM$HDLCInitialize(void);
- static inline
- #line 291
- result_t FramerM$StdControl$init(void);
- static inline
- result_t FramerM$StdControl$start(void);
- static inline
- result_t FramerM$BareSendMsg$send(TOS_MsgPtr pMsg);
- static inline
- #line 328
- result_t FramerM$TokenReceiveMsg$ReflectToken(uint8_t Token);
- static
- #line 348
- result_t FramerM$ByteComm$rxByteReady(uint8_t data, bool error, uint16_t strength);
- static
- #line 469
- result_t FramerM$TxArbitraryByte(uint8_t inByte);
- static inline
- #line 482
- result_t FramerM$ByteComm$txByteReady(bool LastByteSuccess);
- static inline
- #line 552
- result_t FramerM$ByteComm$txDone(void);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr FramerAckM$ReceiveCombined$receive(TOS_MsgPtr arg_0x85b1db0);
- static
- # 88 "/home/testuser/tinyos-1.x/tos/interfaces/TokenReceiveMsg.nc"
- result_t FramerAckM$TokenReceiveMsg$ReflectToken(uint8_t arg_0x88b2a98);
- # 72 "/home/testuser/tinyos-1.x/tos/system/FramerAckM.nc"
- uint8_t FramerAckM$gTokenBuf;
- static inline
- void FramerAckM$SendAckTask(void);
- static inline
- TOS_MsgPtr FramerAckM$TokenReceiveMsg$receive(TOS_MsgPtr Msg, uint8_t token);
- static inline
- #line 91
- TOS_MsgPtr FramerAckM$ReceiveMsg$receive(TOS_MsgPtr Msg);
- static
- # 62 "/home/testuser/tinyos-1.x/tos/interfaces/HPLUART.nc"
- result_t UARTM$HPLUART$init(void);
- static
- #line 80
- result_t UARTM$HPLUART$put(uint8_t arg_0x88d4ac8);
- static
- # 83 "/home/testuser/tinyos-1.x/tos/interfaces/ByteComm.nc"
- result_t UARTM$ByteComm$txDone(void);
- static
- #line 75
- result_t UARTM$ByteComm$txByteReady(bool arg_0x88b1400);
- static
- #line 66
- result_t UARTM$ByteComm$rxByteReady(uint8_t arg_0x88b0c30, bool arg_0x88b0d78, uint16_t arg_0x88b0ed0);
- # 58 "/home/testuser/tinyos-1.x/tos/system/UARTM.nc"
- bool UARTM$state;
- static inline
- result_t UARTM$Control$init(void);
- static inline
- result_t UARTM$Control$start(void);
- static inline
- result_t UARTM$HPLUART$get(uint8_t data);
- static
- result_t UARTM$HPLUART$putDone(void);
- static
- #line 110
- result_t UARTM$ByteComm$txByte(uint8_t data);
- static
- # 88 "/home/testuser/tinyos-1.x/tos/interfaces/HPLUART.nc"
- result_t HPLUART0M$UART$get(uint8_t arg_0x88d4fc8);
- static
- result_t HPLUART0M$UART$putDone(void);
- static inline
- # 60 "../../tos/platform/mica2/HPLUART0M.nc"
- result_t HPLUART0M$UART$init(void);
- #line 90
- void __attribute((signal)) __vector_18(void);
- void __attribute((interrupt)) __vector_20(void);
- static inline
- result_t HPLUART0M$UART$put(uint8_t data);
- # 74 "/home/testuser/tinyos-1.x/tos/system/NoCRCPacket.nc"
- enum NoCRCPacket$__nesc_unnamed4292 {
- NoCRCPacket$IDLE,
- NoCRCPacket$PACKET,
- NoCRCPacket$BYTES
- };
- static
- # 71 "/home/testuser/tinyos-1.x/tos/interfaces/RouteSelect.nc"
- result_t MultiHopEngineM$RouteSelect$selectRoute(TOS_MsgPtr arg_0x89392f8, uint8_t arg_0x8939440);
- static
- #line 86
- result_t MultiHopEngineM$RouteSelect$initializeFields(TOS_MsgPtr arg_0x89399b8, uint8_t arg_0x8939b00);
- static
- # 86 "/home/testuser/tinyos-1.x/tos/interfaces/Intercept.nc"
- result_t MultiHopEngineM$Intercept$intercept(
- # 52 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopEngineM.nc"
- uint8_t arg_0x8913f48,
- # 86 "/home/testuser/tinyos-1.x/tos/interfaces/Intercept.nc"
- TOS_MsgPtr arg_0x854f548, void *arg_0x854f6a0, uint16_t arg_0x854f7f8);
- static
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/RouteControl.nc"
- uint16_t MultiHopEngineM$RouteSelectCntl$getParent(void);
- static
- # 86 "/home/testuser/tinyos-1.x/tos/interfaces/Intercept.nc"
- result_t MultiHopEngineM$Snoop$intercept(
- # 53 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopEngineM.nc"
- uint8_t arg_0x8916490,
- # 86 "/home/testuser/tinyos-1.x/tos/interfaces/Intercept.nc"
- TOS_MsgPtr arg_0x854f548, void *arg_0x854f6a0, uint16_t arg_0x854f7f8);
- static
- # 119 "/home/testuser/tinyos-1.x/tos/interfaces/Send.nc"
- result_t MultiHopEngineM$Send$sendDone(
- # 51 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopEngineM.nc"
- uint8_t arg_0x89138e0,
- # 119 "/home/testuser/tinyos-1.x/tos/interfaces/Send.nc"
- TOS_MsgPtr arg_0x8563dd8, result_t arg_0x8563f28);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t MultiHopEngineM$CommStdControl$init(void);
- static
- result_t MultiHopEngineM$CommStdControl$start(void);
- static
- #line 63
- result_t MultiHopEngineM$SubControl$init(void);
- static
- result_t MultiHopEngineM$SubControl$start(void);
- static
- # 65 "/home/testuser/tinyos-1.x/tos/interfaces/CommControl.nc"
- result_t MultiHopEngineM$CommControl$setPromiscuous(bool arg_0x85a8158);
- static
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t MultiHopEngineM$SendMsg$send(
- # 58 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopEngineM.nc"
- uint8_t arg_0x89175b0,
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- uint16_t arg_0x85a9e28, uint8_t arg_0x85b0010, TOS_MsgPtr arg_0x85b0160);
- # 69 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopEngineM.nc"
- enum MultiHopEngineM$__nesc_unnamed4293 {
- MultiHopEngineM$FWD_QUEUE_SIZE = 16,
- MultiHopEngineM$EMPTY = 0xff
- };
- TOS_Msg MultiHopEngineM$FwdBuffers[MultiHopEngineM$FWD_QUEUE_SIZE];
- TOS_Msg *MultiHopEngineM$FwdBufList[MultiHopEngineM$FWD_QUEUE_SIZE];
- uint8_t MultiHopEngineM$iFwdBufHead;
- #line 82
- uint8_t MultiHopEngineM$iFwdBufTail;
- static void MultiHopEngineM$initialize(void);
- static inline
- result_t MultiHopEngineM$StdControl$init(void);
- static inline
- result_t MultiHopEngineM$StdControl$start(void);
- static inline
- #line 124
- result_t MultiHopEngineM$Send$send(uint8_t id, TOS_MsgPtr pMsg, uint16_t PayloadLen);
- static
- #line 150
- void *MultiHopEngineM$Send$getBuffer(uint8_t id, TOS_MsgPtr pMsg, uint16_t *length);
- static TOS_MsgPtr MultiHopEngineM$mForward(TOS_MsgPtr pMsg, uint8_t id);
- static
- #line 182
- TOS_MsgPtr MultiHopEngineM$ReceiveMsg$receive(uint8_t id, TOS_MsgPtr pMsg);
- static
- #line 205
- result_t MultiHopEngineM$SendMsg$sendDone(uint8_t id, TOS_MsgPtr pMsg, result_t success);
- static inline
- uint16_t MultiHopEngineM$RouteControl$getParent(void);
- static inline
- #line 246
- result_t MultiHopEngineM$Send$default$sendDone(uint8_t id, TOS_MsgPtr pMsg, result_t success);
- static inline
- result_t MultiHopEngineM$Intercept$default$intercept(uint8_t id, TOS_MsgPtr pMsg, void *payload,
- uint16_t payloadLen);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t MultiHopWMEWMA$Timer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- #line 59
- result_t MultiHopWMEWMA$ATimer$start(char arg_0x8561bb8, uint32_t arg_0x8561d10);
- static
- # 106 "/home/testuser/tinyos-1.x/tos/interfaces/Leds.nc"
- result_t MultiHopWMEWMA$Leds$greenToggle(void);
- static
- #line 131
- result_t MultiHopWMEWMA$Leds$yellowToggle(void);
- static
- #line 81
- result_t MultiHopWMEWMA$Leds$redToggle(void);
- static
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t MultiHopWMEWMA$SendMsg$send(uint16_t arg_0x85a9e28, uint8_t arg_0x85b0010, TOS_MsgPtr arg_0x85b0160);
- # 71 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopWMEWMA.nc"
- enum MultiHopWMEWMA$__nesc_unnamed4294 {
- MultiHopWMEWMA$NBRFLAG_VALID = 0x01,
- MultiHopWMEWMA$NBRFLAG_NEW = 0x02,
- MultiHopWMEWMA$NBRFLAG_EST_INIT = 0x04
- };
- enum MultiHopWMEWMA$__nesc_unnamed4295 {
- MultiHopWMEWMA$BASE_STATION_ADDRESS = 0,
- MultiHopWMEWMA$ROUTE_TABLE_SIZE = 16,
- MultiHopWMEWMA$ESTIMATE_TO_ROUTE_RATIO = 10,
- MultiHopWMEWMA$ACCEPTABLE_MISSED = -20,
- MultiHopWMEWMA$DATA_TO_ROUTE_RATIO = 1,
- MultiHopWMEWMA$DATA_FREQ = 8192,
- MultiHopWMEWMA$SWITCH_THRESHOLD = 384,
- MultiHopWMEWMA$MAX_ALLOWABLE_LINK_COST = 256 * 6,
- MultiHopWMEWMA$LIVELINESS = 5,
- MultiHopWMEWMA$MAX_DESCENDANT_LIVE = 5
- };
- enum MultiHopWMEWMA$__nesc_unnamed4296 {
- MultiHopWMEWMA$ROUTE_INVALID = 0xff
- };
- struct MultiHopWMEWMA$SortEntry {
- uint16_t id;
- uint8_t receiveEst;
- };
- struct MultiHopWMEWMA$SortDbgEntry {
- uint16_t id;
- uint8_t sendEst;
- uint8_t hopcount;
- };
- typedef struct MultiHopWMEWMA$RPEstEntry {
- uint16_t id;
- uint8_t receiveEst;
- } __attribute((packed)) MultiHopWMEWMA$RPEstEntry;
- typedef struct MultiHopWMEWMA$RoutePacket {
- uint16_t parent;
- uint16_t cost;
- uint8_t estEntries;
- MultiHopWMEWMA$RPEstEntry estList[1];
- } __attribute((packed)) MultiHopWMEWMA$RoutePacket;
- typedef struct MultiHopWMEWMA$TableEntry {
- uint16_t id;
- uint16_t parent;
- uint16_t cost;
- uint8_t childLiveliness;
- uint16_t missed;
- uint16_t received;
- int16_t lastSeqno;
- uint8_t flags;
- uint8_t liveliness;
- uint8_t hop;
- uint8_t receiveEst;
- uint8_t sendEst;
- } MultiHopWMEWMA$TableEntry;
- TOS_Msg MultiHopWMEWMA$routeMsg;
- bool MultiHopWMEWMA$gfSendRouteBusy;
- bool MultiHopWMEWMA$gSelfTimer;
- MultiHopWMEWMA$TableEntry MultiHopWMEWMA$BaseStation;
- MultiHopWMEWMA$TableEntry MultiHopWMEWMA$NeighborTbl[MultiHopWMEWMA$ROUTE_TABLE_SIZE];
- MultiHopWMEWMA$TableEntry *MultiHopWMEWMA$gpCurrentParent;
- uint8_t MultiHopWMEWMA$gbCurrentHopCount;
- uint16_t MultiHopWMEWMA$gbCurrentCost;
- int16_t MultiHopWMEWMA$gCurrentSeqNo;
- uint16_t MultiHopWMEWMA$gwEstTicks;
- uint32_t MultiHopWMEWMA$gUpdateInterval;
- static
- uint8_t MultiHopWMEWMA$findEntry(uint16_t id);
- static inline
- #line 174
- uint8_t MultiHopWMEWMA$findEntryToBeReplaced(void);
- static
- #line 198
- void MultiHopWMEWMA$newEntry(uint8_t indes, uint16_t id);
- static inline
- #line 226
- uint8_t MultiHopWMEWMA$findPreparedIndex(uint16_t id);
- static
- #line 256
- uint32_t MultiHopWMEWMA$evaluateCost(uint16_t cost, uint8_t sendEst, uint8_t receiveEst);
- static inline
- #line 268
- void MultiHopWMEWMA$updateEst(MultiHopWMEWMA$TableEntry *Nbr);
- static inline
- #line 316
- void MultiHopWMEWMA$updateTable(void);
- static
- #line 332
- bool MultiHopWMEWMA$updateNbrCounters(uint16_t saddr, int16_t seqno, uint8_t *NbrIndex);
- static inline
- #line 369
- void MultiHopWMEWMA$chooseParent(void);
- #line 445
- uint8_t MultiHopWMEWMA$last_entry_sent;
- static inline
- void MultiHopWMEWMA$SendRouteTask(void);
- static
- #line 543
- void MultiHopWMEWMA$TimerTask(void);
- static inline
- #line 589
- result_t MultiHopWMEWMA$ATimer$fired(void);
- static inline
- result_t MultiHopWMEWMA$StdControl$init(void);
- static inline
- #line 612
- result_t MultiHopWMEWMA$StdControl$start(void);
- static inline
- #line 657
- void MultiHopWMEWMA$updateDescendant(uint16_t id);
- static
- result_t MultiHopWMEWMA$RouteSelect$selectRoute(TOS_MsgPtr Msg, uint8_t id);
- static inline
- #line 722
- result_t MultiHopWMEWMA$RouteSelect$initializeFields(TOS_MsgPtr Msg, uint8_t id);
- static inline
- #line 735
- uint16_t MultiHopWMEWMA$RouteControl$getParent(void);
- static inline
- #line 792
- result_t MultiHopWMEWMA$Timer$fired(void);
- static inline
- TOS_MsgPtr MultiHopWMEWMA$ReceiveMsg$receive(TOS_MsgPtr Msg);
- static inline
- #line 832
- result_t MultiHopWMEWMA$Snoop$intercept(uint8_t id, TOS_MsgPtr Msg, void *Payload, uint16_t Len);
- static inline
- #line 845
- result_t MultiHopWMEWMA$SendMsg$sendDone(TOS_MsgPtr pMsg, result_t success);
- static inline
- result_t MultiHopWMEWMA$DebugSendMsg$sendDone(TOS_MsgPtr pMsg, result_t success);
- static
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t QueuedSendM$QueueSendMsg$sendDone(
- # 60 "/home/testuser/tinyos-1.x/tos/lib/Queue/QueuedSendM.nc"
- uint8_t arg_0x89a2010,
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- TOS_MsgPtr arg_0x85b0580, result_t arg_0x85b06d0);
- static
- # 106 "/home/testuser/tinyos-1.x/tos/interfaces/Leds.nc"
- result_t QueuedSendM$Leds$greenToggle(void);
- static
- #line 81
- result_t QueuedSendM$Leds$redToggle(void);
- static
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t QueuedSendM$SerialSendMsg$send(
- # 65 "/home/testuser/tinyos-1.x/tos/lib/Queue/QueuedSendM.nc"
- uint8_t arg_0x89a2998,
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- uint16_t arg_0x85a9e28, uint8_t arg_0x85b0010, TOS_MsgPtr arg_0x85b0160);
- # 74 "/home/testuser/tinyos-1.x/tos/lib/Queue/QueuedSendM.nc"
- enum QueuedSendM$__nesc_unnamed4297 {
- QueuedSendM$MESSAGE_QUEUE_SIZE = 32,
- QueuedSendM$MAX_RETRANSMIT_COUNT = 5
- };
- struct QueuedSendM$_msgq_entry {
- uint16_t address;
- uint8_t length;
- uint8_t id;
- uint8_t xmit_count;
- TOS_MsgPtr pMsg;
- } QueuedSendM$msgqueue[QueuedSendM$MESSAGE_QUEUE_SIZE];
- uint16_t QueuedSendM$enqueue_next;
- #line 87
- uint16_t QueuedSendM$dequeue_next;
- bool QueuedSendM$retransmit;
- bool QueuedSendM$fQueueIdle;
- static inline
- result_t QueuedSendM$StdControl$init(void);
- static inline
- #line 106
- result_t QueuedSendM$StdControl$start(void);
- static
- #line 121
- void QueuedSendM$QueueServiceTask(void);
- static
- #line 143
- result_t QueuedSendM$QueueSendMsg$send(uint8_t id, uint16_t address, uint8_t length, TOS_MsgPtr msg);
- static inline
- #line 188
- result_t QueuedSendM$SerialSendMsg$sendDone(uint8_t id, TOS_MsgPtr msg, result_t success);
- # 120 "../../tos/platform/mica2/hardware.h"
- static __inline void TOSH_CLR_SERIAL_ID_PIN(void)
- #line 120
- {
- #line 120
- * (volatile uint8_t *)(0x1B + 0x20) &= ~(1 << 4);
- }
- #line 120
- static __inline void TOSH_MAKE_SERIAL_ID_INPUT(void)
- #line 120
- {
- #line 120
- * (volatile uint8_t *)(0x1A + 0x20) &= ~(1 << 4);
- }
- #line 145
- static __inline void TOSH_MAKE_SPI_OC1C_INPUT(void)
- #line 145
- {
- #line 145
- * (volatile uint8_t *)(0x17 + 0x20) &= ~(1 << 7);
- }
- #line 144
- static __inline void TOSH_MAKE_MISO_INPUT(void)
- #line 144
- {
- #line 144
- * (volatile uint8_t *)(0x17 + 0x20) &= ~(1 << 3);
- }
- #line 127
- static __inline void TOSH_MAKE_CC_PCLK_OUTPUT(void)
- #line 127
- {
- #line 127
- * (volatile uint8_t *)(0x11 + 0x20) |= 1 << 6;
- }
- #line 126
- static __inline void TOSH_MAKE_CC_PDATA_OUTPUT(void)
- #line 126
- {
- #line 126
- * (volatile uint8_t *)(0x11 + 0x20) |= 1 << 7;
- }
- #line 128
- static __inline void TOSH_MAKE_CC_PALE_OUTPUT(void)
- #line 128
- {
- #line 128
- * (volatile uint8_t *)(0x11 + 0x20) |= 1 << 4;
- }
- #line 149
- static __inline void TOSH_MAKE_PW0_OUTPUT(void)
- #line 149
- {
- #line 149
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 0;
- }
- #line 150
- static __inline void TOSH_MAKE_PW1_OUTPUT(void)
- #line 150
- {
- #line 150
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 1;
- }
- #line 151
- static __inline void TOSH_MAKE_PW2_OUTPUT(void)
- #line 151
- {
- #line 151
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 2;
- }
- #line 152
- static __inline void TOSH_MAKE_PW3_OUTPUT(void)
- #line 152
- {
- #line 152
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 3;
- }
- #line 153
- static __inline void TOSH_MAKE_PW4_OUTPUT(void)
- #line 153
- {
- #line 153
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 4;
- }
- #line 154
- static __inline void TOSH_MAKE_PW5_OUTPUT(void)
- #line 154
- {
- #line 154
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 5;
- }
- #line 155
- static __inline void TOSH_MAKE_PW6_OUTPUT(void)
- #line 155
- {
- #line 155
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 6;
- }
- #line 156
- static __inline void TOSH_MAKE_PW7_OUTPUT(void)
- #line 156
- {
- #line 156
- * (volatile uint8_t *)(0x14 + 0x20) |= 1 << 7;
- }
- #line 125
- static __inline void TOSH_MAKE_CC_CHP_OUT_INPUT(void)
- #line 125
- {
- #line 125
- * (volatile uint8_t *)(0x1A + 0x20) &= ~(1 << 6);
- }
- static inline
- #line 171
- void TOSH_SET_PIN_DIRECTIONS(void )
- {
- TOSH_MAKE_CC_CHP_OUT_INPUT();
- TOSH_MAKE_PW7_OUTPUT();
- TOSH_MAKE_PW6_OUTPUT();
- TOSH_MAKE_PW5_OUTPUT();
- TOSH_MAKE_PW4_OUTPUT();
- TOSH_MAKE_PW3_OUTPUT();
- TOSH_MAKE_PW2_OUTPUT();
- TOSH_MAKE_PW1_OUTPUT();
- TOSH_MAKE_PW0_OUTPUT();
- TOSH_MAKE_CC_PALE_OUTPUT();
- TOSH_MAKE_CC_PDATA_OUTPUT();
- TOSH_MAKE_CC_PCLK_OUTPUT();
- TOSH_MAKE_MISO_INPUT();
- TOSH_MAKE_SPI_OC1C_INPUT();
- TOSH_MAKE_SERIAL_ID_INPUT();
- TOSH_CLR_SERIAL_ID_PIN();
- }
- static inline
- # 57 "/home/testuser/tinyos-1.x/tos/platform/avrmote/HPLInit.nc"
- result_t HPLInit$init(void)
- #line 57
- {
- TOSH_SET_PIN_DIRECTIONS();
- return SUCCESS;
- }
- # 47 "/home/testuser/tinyos-1.x/tos/system/RealMain.nc"
- inline static result_t RealMain$hardwareInit(void){
- #line 47
- unsigned char result;
- #line 47
- #line 47
- result = HPLInit$init();
- #line 47
- #line 47
- return result;
- #line 47
- }
- #line 47
- static inline
- # 75 "../../tos/platform/mica2/HPLPotC.nc"
- result_t HPLPotC$Pot$finalise(void)
- #line 75
- {
- return SUCCESS;
- }
- # 74 "/home/testuser/tinyos-1.x/tos/interfaces/HPLPot.nc"
- inline static result_t PotM$HPLPot$finalise(void){
- #line 74
- unsigned char result;
- #line 74
- #line 74
- result = HPLPotC$Pot$finalise();
- #line 74
- #line 74
- return result;
- #line 74
- }
- #line 74
- static inline
- # 66 "../../tos/platform/mica2/HPLPotC.nc"
- result_t HPLPotC$Pot$increase(void)
- #line 66
- {
- return SUCCESS;
- }
- # 67 "/home/testuser/tinyos-1.x/tos/interfaces/HPLPot.nc"
- inline static result_t PotM$HPLPot$increase(void){
- #line 67
- unsigned char result;
- #line 67
- #line 67
- result = HPLPotC$Pot$increase();
- #line 67
- #line 67
- return result;
- #line 67
- }
- #line 67
- static inline
- # 57 "../../tos/platform/mica2/HPLPotC.nc"
- result_t HPLPotC$Pot$decrease(void)
- #line 57
- {
- return SUCCESS;
- }
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/HPLPot.nc"
- inline static result_t PotM$HPLPot$decrease(void){
- #line 59
- unsigned char result;
- #line 59
- #line 59
- result = HPLPotC$Pot$decrease();
- #line 59
- #line 59
- return result;
- #line 59
- }
- #line 59
- static inline
- # 93 "/home/testuser/tinyos-1.x/tos/system/PotM.nc"
- void PotM$setPot(uint8_t value)
- #line 93
- {
- uint8_t i;
- #line 95
- for (i = 0; i < 151; i++)
- PotM$HPLPot$decrease();
- for (i = 0; i < value; i++)
- PotM$HPLPot$increase();
- PotM$HPLPot$finalise();
- PotM$potSetting = value;
- }
- static inline result_t PotM$Pot$init(uint8_t initialSetting)
- #line 106
- {
- PotM$setPot(initialSetting);
- return SUCCESS;
- }
- # 78 "/home/testuser/tinyos-1.x/tos/interfaces/Pot.nc"
- inline static result_t RealMain$Pot$init(uint8_t arg_0x85191f0){
- #line 78
- unsigned char result;
- #line 78
- #line 78
- result = PotM$Pot$init(arg_0x85191f0);
- #line 78
- #line 78
- return result;
- #line 78
- }
- #line 78
- static inline
- # 79 "/home/testuser/tinyos-1.x/tos/system/sched.c"
- void TOSH_sched_init(void )
- {
- int i;
- #line 82
- TOSH_sched_free = 0;
- TOSH_sched_full = 0;
- for (i = 0; i < TOSH_MAX_TASKS; i++)
- TOSH_queue[i].tp = (void *)0;
- }
- static inline
- # 120 "/home/testuser/tinyos-1.x/tos/system/tos.h"
- result_t rcombine(result_t r1, result_t r2)
- {
- return r1 == FAIL ? FAIL : r2;
- }
- # 57 "/home/testuser/tinyos-1.x/tos/interfaces/Random.nc"
- inline static result_t MultiHopTtestM$Random$init(void){
- #line 57
- unsigned char result;
- #line 57
- #line 57
- result = RandomLFSR$Random$init();
- #line 57
- #line 57
- return result;
- #line 57
- }
- #line 57
- static inline
- # 14 "../../tos/interfaces/SODebug.h"
- void MultiHopTtestM$init_debug(void)
- #line 14
- {
- * (volatile uint8_t *)0x90 = 0;
- * (volatile uint8_t *)(0x09 + 0x20) = 15;
- * (volatile uint8_t *)(0x0B + 0x20) = 1 << 1;
- * (volatile uint8_t *)0x95 = (1 << 2) | (1 << 1);
- * (volatile uint8_t *)(0x0C + 0x20);
- * (volatile uint8_t *)(0x0A + 0x20) = 1 << 3;
- }
- # 25 "MultiHopTtestM.nc"
- inline static result_t MultiHopTtestM$ResetPower(void){
- #line 25
- unsigned char result;
- #line 25
- #line 25
- result = CC1000RadioIntM$ResetPower();
- #line 25
- #line 25
- return result;
- #line 25
- }
- #line 25
- static inline
- # 1734 "../../tos/platform/mica2/CC1000RadioIntM.nc"
- result_t CC1000RadioIntM$ResetDataSent(void)
- #line 1734
- {
- CC1000RadioIntM$dataSent = 0;
- return SUCCESS;
- }
- # 26 "MultiHopTtestM.nc"
- inline static result_t MultiHopTtestM$ResetDataSent(void){
- #line 26
- unsigned char result;
- #line 26
- #line 26
- result = CC1000RadioIntM$ResetDataSent();
- #line 26
- #line 26
- return result;
- #line 26
- }
- #line 26
- static inline
- #line 45
- result_t MultiHopTtestM$StdControl$init(void)
- #line 45
- {
- uint8_t i;
- #line 47
- MultiHopTtestM$Rcount = 0;
- MultiHopTtestM$Scount = 0;
- MultiHopTtestM$ResetDataSent();
- MultiHopTtestM$ResetPower();
- for (i = 0; i < 50; i++)
- MultiHopTtestM$eachCount[i] = 0;
- MultiHopTtestM$txBusy = MultiHopTtestM$startSender = FALSE;
- MultiHopTtestM$init_debug();
- MultiHopTtestM$gotFrames = TRUE;
- MultiHopTtestM$drandFirstTime = FALSE;
- MultiHopTtestM$Random$init();
- return SUCCESS;
- }
- static inline
- # 159 "/home/testuser/tinyos-1.x/tos/system/tos.h"
- void *nmemset(void *to, int val, size_t n)
- {
- char *cto = to;
- while (n--) * cto++ = val;
- return to;
- }
- static inline
- # 594 "/home/testuser/tinyos-1.x/tos/lib/MintRoute/MultiHopWMEWMA.nc"
- result_t MultiHopWMEWMA$StdControl$init(void)
- #line 594
- {
- nmemset((void *)MultiHopWMEWMA$NeighborTbl, 0, sizeof(MultiHopWMEWMA$TableEntry ) * MultiHopWMEWMA$ROUTE_TABLE_SIZE);
- MultiHopWMEWMA$BaseStation.id = TOS_UART_ADDR;
- MultiHopWMEWMA$BaseStation.parent = TOS_UART_ADDR;
- MultiHopWMEWMA$BaseStation.flags = MultiHopWMEWMA$NBRFLAG_VALID;
- MultiHopWMEWMA$BaseStation.hop = 0;
- MultiHopWMEWMA$gpCurrentParent = (void *)0;
- MultiHopWMEWMA$gbCurrentHopCount = MultiHopWMEWMA$ROUTE_INVALID;
- MultiHopWMEWMA$gCurrentSeqNo = 0;
- MultiHopWMEWMA$gwEstTicks = 0;
- MultiHopWMEWMA$gUpdateInterval = MultiHopWMEWMA$DATA_TO_ROUTE_RATIO * MultiHopWMEWMA$DATA_FREQ;
- MultiHopWMEWMA$gfSendRouteBusy = FALSE;
- MultiHopWMEWMA$gSelfTimer = TRUE;
- return SUCCESS;
- }
- static inline
- # 91 "/home/testuser/tinyos-1.x/tos/lib/Queue/QueuedSendM.nc"
- result_t QueuedSendM$StdControl$init(void)
- #line 91
- {
- int i;
- #line 93
- for (i = 0; i < QueuedSendM$MESSAGE_QUEUE_SIZE; i++) {
- QueuedSendM$msgqueue[i].length = 0;
- QueuedSendM$msgqueue[i].pMsg = (void *)0;
- }
- QueuedSendM$retransmit = FALSE;
- QueuedSendM$enqueue_next = 0;
- QueuedSendM$dequeue_next = 0;
- QueuedSendM$fQueueIdle = TRUE;
- return SUCCESS;
- }
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- inline static result_t MultiHopEngineM$SubControl$init(void){
- #line 63
- unsigned char result;
- #line 63
- #line 63
- result = QueuedSendM$StdControl$init();
- #line 63
- result = rcombine(result, MultiHopWMEWMA$StdControl$init());
- #line 63
- #line 63
- return result;
- #line 63
- }
- #line 63
- inline static result_t CC1000RadioIntM$TimerControl$init(void){
- #line 63
- unsigned char result;
- #line 63
- #line 63
- result = TimerM$StdControl$init();
- #line 63
- #line 63
- return result;
- #line 63
- }
- #line 63
- # 57 "/home/testuser/tinyos-1.x/tos/interfaces/Random.nc"
- inline static result_t CC1000RadioIntM$Random$init(void){
- #line 57
- unsigned char result;
- #line 57
- #line 57
- result = RandomLFSR$Random$init();
- #line 57
- #line 57
- return result;
- #line 57
- }
- #line 57
- static inline
- # 90 "../../tos/platform/mica2/HPLADCM.nc"
- result_t HPLADCM$ADC$init(void)
- #line 90
- {
- HPLADCM$init_portmap();
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 95
- {
- * (volatile uint8_t *)(0x06 + 0x20) = (1 << 3) | (6 << 0);
- * (volatile uint8_t *)(0x07 + 0x20) = 0;
- }
- #line 99
- __nesc_atomic_end(__nesc_atomic); }
- return SUCCESS;
- }
- # 54 "/home/testuser/tinyos-1.x/tos/interfaces/HPLADC.nc"
- inline static result_t ADCREFM$HPLADC$init(void){
- #line 54
- unsigned char result;
- #line 54
- #line 54
- result = HPLADCM$ADC$init();
- #line 54
- #line 54
- return result;
- #line 54
- }
- #line 54
- static inline
- # 99 "../../tos/platform/mica2/ADCREFM.nc"
- result_t ADCREFM$ADCControl$init(void)
- #line 99
- {
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 100
- {
- ADCREFM$ReqPort = 0;
- ADCREFM$ReqVector = ADCREFM$ContReqMask = ADCREFM$CalReqMask = 0;
- ADCREFM$RefVal = 381;
- }
- #line 104
- __nesc_atomic_end(__nesc_atomic); }
- {
- }
- #line 105
- ;
- return ADCREFM$HPLADC$init();
- }
- # 77 "../../tos/platform/mica2/ADCControl.nc"
- inline static result_t CC1000RadioIntM$ADCControl$init(void){
- #line 77
- unsigned char result;
- #line 77
- #line 77
- result = ADCREFM$ADCControl$init();
- #line 77
- #line 77
- return result;
- #line 77
- }
- #line 77
- static inline
- # 110 "../../tos/platform/mica2/HPLADCM.nc"
- result_t HPLADCM$ADC$bindPort(uint8_t port, uint8_t adcPort)
- #line 110
- {
- if (
- #line 111
- port < TOSH_ADC_PORTMAPSIZE &&
- port != TOS_ADC_BANDGAP_PORT &&
- port != TOS_ADC_GND_PORT) {
- HPLADCM$init_portmap();
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 115
- HPLADCM$TOSH_adc_portmap[port] = adcPort;
- #line 115
- __nesc_atomic_end(__nesc_atomic); }
- return SUCCESS;
- }
- else {
- return FAIL;
- }
- }
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/HPLADC.nc"
- inline static result_t ADCREFM$HPLADC$bindPort(uint8_t arg_0x87f8060, uint8_t arg_0x87f81a8){
- #line 70
- unsigned char result;
- #line 70
- #line 70
- result = HPLADCM$ADC$bindPort(arg_0x87f8060, arg_0x87f81a8);
- #line 70
- #line 70
- return result;
- #line 70
- }
- #line 70
- static inline
- # 114 "../../tos/platform/mica2/ADCREFM.nc"
- result_t ADCREFM$ADCControl$bindPort(uint8_t port, uint8_t adcPort)
- #line 114
- {
- return ADCREFM$HPLADC$bindPort(port, adcPort);
- }
- # 116 "../../tos/platform/mica2/ADCControl.nc"
- inline static result_t CC1000RadioIntM$ADCControl$bindPort(uint8_t arg_0x8630810, uint8_t arg_0x8630958){
- #line 116
- unsigned char result;
- #line 116
- #line 116
- result = ADCREFM$ADCControl$bindPort(arg_0x8630810, arg_0x8630958);
- #line 116
- #line 116
- return result;
- #line 116
- }
- #line 116
- static inline
- # 517 "../../tos/platform/mica2/CC1000ControlM.nc"
- bool CC1000ControlM$CC1000Control$GetLOStatus(void)
- #line 517
- {
- return CC1000ControlM$gCurrentParameters[0x1e];
- }
- # 190 "../../tos/platform/mica2/CC1000Control.nc"
- inline static bool CC1000RadioIntM$CC1000Control$GetLOStatus(void){
- #line 190
- unsigned char result;
- #line 190
- #line 190
- result = CC1000ControlM$CC1000Control$GetLOStatus();
- #line 190
- #line 190
- return result;
- #line 190
- }
- #line 190
- # 58 "../../tos/platform/mica2/HPLCC1000.nc"
- inline static result_t CC1000ControlM$HPLChipcon$write(uint8_t arg_0x87b1768, uint8_t arg_0x87b18b0){
- #line 58
- unsigned char result;
- #line 58
- #line 58
- result = HPLCC1000M$HPLCC1000$write(arg_0x87b1768, arg_0x87b18b0);
- #line 58
- #line 58
- return result;
- #line 58
- }
- #line 58
- static inline
- # 505 "../../tos/platform/mica2/CC1000ControlM.nc"
- result_t CC1000ControlM$CC1000Control$SelectLock(uint8_t Value)
- #line 505
- {
- CC1000ControlM$gCurrentParameters[0xd] = Value << 4;
- return CC1000ControlM$HPLChipcon$write(0x0D, Value << 4);
- }
- # 170 "../../tos/platform/mica2/CC1000Control.nc"
- inline static result_t CC1000RadioIntM$CC1000Control$SelectLock(uint8_t arg_0x856d710){
- #line 170
- unsigned char result;
- #line 170
- #line 170
- result = CC1000ControlM$CC1000Control$SelectLock(arg_0x856d710);
- #line 170
- #line 170
- return result;
- #line 170
- }
- #line 170
- # 65 "../../tos/platform/mica2/HPLCC1000.nc"
- inline static uint8_t CC1000ControlM$HPLChipcon$read(uint8_t arg_0x87b1d20){
- #line 65
- unsigned char result;
- #line 65
- #line 65
- result = HPLCC1000M$HPLCC1000$read(arg_0x87b1d20);
- #line 65
- #line 65
- return result;
- #line 65
- }
- #line 65
- static inline
- # 131 "../../tos/platform/mica2/CC1000ControlM.nc"
- result_t CC1000ControlM$chipcon_cal(void)
- {
- CC1000ControlM$HPLChipcon$write(0x0B, 0x00);
- CC1000ControlM$HPLChipcon$write(0x42, 0x3f);
- CC1000ControlM$HPLChipcon$write(0x00, (
- 1 << 4) | (1 << 0));
- CC1000ControlM$HPLChipcon$write(0x0E, ((
- 1 << 7) | (
- 1 << 5)) | (6 << 0));
- while ((CC1000ControlM$HPLChipcon$read(0x0E) & (1 << 3)) == 0) ;
- CC1000ControlM$HPLChipcon$write(0x0E, (
- 1 << 5) | (6 << 0));
- CC1000ControlM$HPLChipcon$write(0x00, (((
- 1 << 7) | (1 << 6)) | (1 << 5)) | (
- 1 << 0));
- CC1000ControlM$HPLChipcon$write(0x09, CC1000ControlM$gCurrentParameters[29]);
- CC1000ControlM$HPLChipcon$write(0x0B, 0x00);
- CC1000ControlM$HPLChipcon$write(0x0E, ((
- 1 << 7) | (
- 1 << 5)) | (6 << 0));
- while ((CC1000ControlM$HPLChipcon$read(0x0E) & (1 << 3)) == 0) ;
- CC1000ControlM$HPLChipcon$write(0x0E, (
- 1 << 5) | (6 << 0));
- return SUCCESS;
- }
- static inline void CC1000ControlM$cc1000SetFreq(void)
- #line 187
- {
- uint8_t i;
- for (i = 1; i < 0x0d; i++) {
- CC1000ControlM$HPLChipcon$write(i, CC1000ControlM$gCurrentParameters[i]);
- }
- CC1000ControlM$HPLChipcon$write(0x12, CC1000ControlM$gCurrentParameters[0x12]);
- CC1000ControlM$chipcon_cal();
- return;
- }
- static inline
- #line 400
- result_t CC1000ControlM$CC1000Control$TunePreset(uint8_t freq)
- #line 400
- {
- int i;
- for (i = 1; i < 31; i++) {
- CC1000ControlM$gCurrentParameters[i] = ({
- #line 405
- uint16_t __addr16 = (uint16_t )(uint16_t )&CC1K_Params[freq][i];
- #line 405
- uint8_t __result;
- #line 405
- __asm ("lpm %0, Z""nt" : "=r"(__result) : "z"(__addr16));__result;
- }
- );
- }
- #line 407
- CC1000ControlM$cc1000SetFreq();
- return SUCCESS;
- }
- static inline
- #line 203
- void CC1000ControlM$cc1000SetModem(void)
- #line 203
- {
- CC1000ControlM$HPLChipcon$write(0x0F, CC1000ControlM$gCurrentParameters[0x0f]);
- CC1000ControlM$HPLChipcon$write(0x10, CC1000ControlM$gCurrentParameters[0x10]);
- CC1000ControlM$HPLChipcon$write(0x11, CC1000ControlM$gCurrentParameters[0x11]);
- return;
- }
- static
- # 101 "../../tos/platform/mica2/hardware.h"
- void __inline TOSH_uwait(int u_sec)
- #line 101
- {
- while (u_sec > 0) {
- __asm volatile ("nop");
- __asm volatile ("nop");
- __asm volatile ("nop");
- __asm volatile ("nop");
- __asm volatile ("nop");
- __asm volatile ("nop");
- __asm volatile ("nop");
- __asm volatile ("nop");
- u_sec--;
- }
- }
- #line 127
- static __inline void TOSH_SET_CC_PCLK_PIN(void)
- #line 127
- {
- #line 127
- * (volatile uint8_t *)(0x12 + 0x20) |= 1 << 6;
- }
- #line 126
- static __inline void TOSH_SET_CC_PDATA_PIN(void)
- #line 126
- {
- #line 126
- * (volatile uint8_t *)(0x12 + 0x20) |= 1 << 7;
- }
- #line 128
- static __inline void TOSH_SET_CC_PALE_PIN(void)
- #line 128
- {
- #line 128
- * (volatile uint8_t *)(0x12 + 0x20) |= 1 << 4;
- }
- static inline
- # 51 "../../tos/platform/mica2/HPLCC1000M.nc"
- result_t HPLCC1000M$HPLCC1000$init(void)
- #line 51
- {
- TOSH_MAKE_CC_CHP_OUT_INPUT();
- TOSH_MAKE_CC_PALE_OUTPUT();
- TOSH_MAKE_CC_PCLK_OUTPUT();
- TOSH_MAKE_CC_PDATA_OUTPUT();
- TOSH_SET_CC_PALE_PIN();
- TOSH_SET_CC_PDATA_PIN();
- TOSH_SET_CC_PCLK_PIN();
- return SUCCESS;
- }
- # 51 "../../tos/platform/mica2/HPLCC1000.nc"
- inline static result_t CC1000ControlM$HPLChipcon$init(void){
- #line 51
- unsigned char result;
- #line 51
- #line 51
- result = HPLCC1000M$HPLCC1000$init();
- #line 51
- #line 51
- return result;
- #line 51
- }
- #line 51
- static inline
- # 342 "../../tos/platform/mica2/CC1000ControlM.nc"
- result_t CC1000ControlM$StdControl$init(void)
- #line 342
- {
- * (volatile uint8_t *)0x8A = 0x41;
- CC1000ControlM$HPLChipcon$init();
- CC1000ControlM$HPLChipcon$write(0x00, (((
- 1 << 5) | (1 << 4)) | (
- 1 << 3)) | (1 << 1));
- CC1000ControlM$HPLChipcon$write(0x00, ((((
- 1 << 5) | (1 << 4)) | (
- 1 << 3)) | (1 << 1)) | (
- 1 << 0));
- TOSH_uwait(2000);
- CC1000ControlM$gCurrentParameters[0xb] = (8 << 4) | (0 << 0);
- CC1000ControlM$HPLChipcon$write(0x0B, CC1000ControlM$gCurrentParameters[0xb]);
- CC1000ControlM$gCurrentParameters[0xd] = 9 << 4;
- CC1000ControlM$HPLChipcon$write(4, CC1000ControlM$gCurrentParameters[0xd]);
- CC1000ControlM$gCurrentParameters[0xf] = 0;
- CC1000ControlM$gCurrentParameters[0x10] = (((3 << 5) | (1 << 3)) | (