app.c
上传用户:joranyuan
上传日期:2022-06-23
资源大小:3306k
文件大小:273k
- #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);
- # 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;
- # 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;
- # 39 "../../tos/interfaces/SClock.h"
- enum __nesc_unnamed4256 {
- 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_unnamed4257 {
- MAX_VAL = 0xFFFF
- };
- enum __nesc_unnamed4258 {
- POSITIVE = 1,
- NEGATIVE = 2,
- ZERO = 3
- };
- typedef struct GTime {
- uint16_t sticks;
- uint16_t mticks;
- } GTime;
- # 6 "../../tos/system/DrandMSG.h"
- enum __nesc_unnamed4259 {
- MAX_NBR = 20,
- MAX_ONE_HOP = 15
- };
- enum __nesc_unnamed4260 {
- MAX_GRANT = 30,
- MAX_REQUEST = 30,
- MAX_FRAME = 30,
- MAX_REPORT = 30
- };
- enum __nesc_unnamed4261 {
- 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_unnamed4262 {
- 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_unnamed4263 {
- HELLO_STATE,
- REQUEST_STATE,
- GRANT_STATE,
- IDLE_STATE2,
- RELEASE_STATE,
- REPORT_STATE,
- FRAME_STATE
- };
- enum __nesc_unnamed4264 {
- ONE_HOP = 0x1,
- TWO_HOP = 0x2,
- GRANT_SENT = 0x4
- };
- enum __nesc_unnamed4265 {
- 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 myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- uint8_t numRemaining;
- uint16_t OTT;
- GTime timestamp;
- uint8_t idMap[MAX_NBR];
- } requestMsg;
- typedef struct grantMsg {
- uint8_t sendID;
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- uint8_t timeSlot[MAX_NBR];
- GTime timestamp;
- } grantMsg;
- typedef struct rejectMsg {
- uint8_t sendID;
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- }
- rejectMsg;
- typedef struct releaseMsg {
- uint8_t sendID;
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- uint8_t slot;
- } releaseMsg;
- typedef struct twoHopMsg {
- uint8_t sendID;
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- 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;
- # 49 "/home/testuser/tinyos-1.x/tos/types/AM.h"
- enum __nesc_unnamed4266 {
- TOS_BCAST_ADDR = 0xffff,
- TOS_UART_ADDR = 0x007e
- };
- enum __nesc_unnamed4267 {
- TOS_DEFAULT_AM_GROUP = 0x7d
- };
- uint8_t TOS_AM_GROUP = TOS_DEFAULT_AM_GROUP;
- #line 84
- typedef struct TOS_Msg {
- uint16_t addr;
- uint8_t type;
- uint8_t group;
- uint8_t length;
- int8_t data[29];
- 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[29];
- 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[29];
- 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_unnamed4268 {
- 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 = 29,
- LENGTH_BYTE_NUMBER = (size_t )& ((struct TOS_Msg *)0)->length + 1,
- TINYSEC_NODE_ID_SIZE = sizeof(uint16_t )
- };
- enum __nesc_unnamed4269 {
- 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_unnamed4270 {
- TIMER_REPEAT = 0,
- TIMER_ONE_SHOT = 1,
- NUM_TIMERS = 8
- };
- # 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_unnamed4271 {
- 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_unnamed4272 {
- 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_unnamed4273 {
- DEFAULT_SCALE = 3, DEFAULT_INTERVAL = 127
- };
- static result_t PotM$Pot$init(uint8_t arg_0x8515e08);
- 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 void TestBedTopologyM$Drand$gotFrame(void);
- static void TestBedTopologyM$Drand$helloOver(void);
- static result_t TestBedTopologyM$StdControl$init(void);
- static result_t TestBedTopologyM$StdControl$start(void);
- static result_t DrandM$drandRoundTimer$fired(void);
- static TOS_MsgPtr DrandM$ReceiveReportMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static TOS_MsgPtr DrandM$ReceiveRequestMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static TOS_MsgPtr DrandM$ReceiveHelloMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t DrandM$SendGrantMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static TOS_MsgPtr DrandM$ReceiveRejectMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static TOS_MsgPtr DrandM$ReceiveGrantMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t DrandM$SendReportMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static result_t DrandM$SendRequestMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static TOS_MsgPtr DrandM$ReceiveReleaseMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t DrandM$SendRejectMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static TOS_MsgPtr DrandM$ReceiveTwoHopMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t DrandM$SendHelloMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static result_t DrandM$SendReleaseMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static result_t DrandM$roundTimer$fired(void);
- static result_t DrandM$reXTimer$fired(void);
- static result_t DrandM$SendTwoHopMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static TOS_MsgPtr DrandM$ReceiveFrameMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t DrandM$SClock$syncDone(void);
- static result_t DrandM$SClock$fire(uint16_t arg_0x8585230);
- static result_t DrandM$StdControl$init(void);
- static result_t DrandM$StdControl$start(void);
- static result_t DrandM$SendFrameMsg$sendDone(TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static TOS_MsgPtr AMStandard$ReceiveMsg$default$receive(uint8_t arg_0x86aab68, TOS_MsgPtr arg_0x856c0f0);
- static result_t AMStandard$ActivityTimer$fired(void);
- static result_t AMStandard$UARTSend$sendDone(TOS_MsgPtr arg_0x86bed88, result_t arg_0x86beed8);
- static TOS_MsgPtr AMStandard$RadioReceive$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t AMStandard$Control$init(void);
- static result_t AMStandard$Control$start(void);
- static result_t AMStandard$default$sendDone(void);
- static result_t AMStandard$RadioSend$sendDone(TOS_MsgPtr arg_0x86bed88, result_t arg_0x86beed8);
- static result_t AMStandard$SendMsg$send(uint8_t arg_0x86aa5b0, uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static result_t AMStandard$SendMsg$default$sendDone(uint8_t arg_0x86aa5b0, TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- static TOS_MsgPtr AMStandard$UARTReceive$receive(TOS_MsgPtr arg_0x856c0f0);
- static result_t CC1000RadioIntM$SquelchTimer$fired(void);
- static uint16_t CC1000RadioIntM$GetSquelch(void);
- static result_t CC1000RadioIntM$Send$send(TOS_MsgPtr arg_0x86be870);
- static result_t CC1000RadioIntM$TDMATimer$fired(void);
- static result_t CC1000RadioIntM$SpiByteFifo$dataReady(uint8_t arg_0x8713520);
- static result_t CC1000RadioIntM$WakeupTimer$fired(void);
- static void CC1000RadioIntM$RadioReceiveCoordinator$default$byte(TOS_MsgPtr arg_0x86d4f68, uint8_t arg_0x86d50b8);
- static void CC1000RadioIntM$RadioReceiveCoordinator$default$blockTimer(void);
- static void CC1000RadioIntM$RadioReceiveCoordinator$default$startSymbol(uint8_t arg_0x86d4858, uint8_t arg_0x86d49a0, TOS_MsgPtr arg_0x86d4af0);
- static void CC1000RadioIntM$RadioSendCoordinator$default$byte(TOS_MsgPtr arg_0x86d4f68, uint8_t arg_0x86d50b8);
- static void CC1000RadioIntM$RadioSendCoordinator$default$blockTimer(void);
- static void CC1000RadioIntM$RadioSendCoordinator$default$startSymbol(uint8_t arg_0x86d4858, uint8_t arg_0x86d49a0, TOS_MsgPtr arg_0x86d4af0);
- static result_t CC1000RadioIntM$SClock$syncDone(void);
- static result_t CC1000RadioIntM$SClock$fire(uint16_t arg_0x8585230);
- static result_t CC1000RadioIntM$StdControl$init(void);
- static result_t CC1000RadioIntM$StdControl$start(void);
- static result_t CC1000RadioIntM$RSSIADC$dataReady(uint16_t arg_0x86fa7d8);
- static int16_t CC1000RadioIntM$MacBackoff$default$initialBackoff(TOS_MsgPtr arg_0x86d6c88);
- static int16_t CC1000RadioIntM$MacBackoff$default$congestionBackoff(TOS_MsgPtr arg_0x86d70b0);
- static result_t CC1000ControlM$CC1000Control$SetRFPower(uint8_t arg_0x85440e8);
- static bool CC1000ControlM$CC1000Control$GetLOStatus(void);
- static result_t CC1000ControlM$CC1000Control$TunePreset(uint8_t arg_0x853c680);
- 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_0x8544980);
- 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_0x8873158);
- static result_t HPLCC1000M$HPLCC1000$write(uint8_t arg_0x8872ba0, uint8_t arg_0x8872ce8);
- static uint16_t RandomLFSR$Random$rand(void);
- static result_t RandomLFSR$Random$init(void);
- static result_t ADCREFM$HPLADC$dataReady(uint16_t arg_0x88c8548);
- static result_t ADCREFM$CalADC$default$dataReady(uint8_t arg_0x86d1290, uint16_t arg_0x86fa7d8);
- static result_t ADCREFM$ADCControl$bindPort(uint8_t arg_0x86fe5c0, uint8_t arg_0x86fe708);
- static result_t ADCREFM$ADCControl$init(void);
- static result_t ADCREFM$ADCControl$manualCalibrate(void);
- static result_t ADCREFM$ADC$getData(uint8_t arg_0x86d0c08);
- static result_t ADCREFM$ADC$default$dataReady(uint8_t arg_0x86d0c08, uint16_t arg_0x86fa7d8);
- static result_t ADCREFM$Timer$fired(void);
- static result_t HPLADCM$ADC$bindPort(uint8_t arg_0x88ab3d0, uint8_t arg_0x88ab518);
- static result_t HPLADCM$ADC$init(void);
- static result_t HPLADCM$ADC$samplePort(uint8_t arg_0x88aba00);
- 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_0x88d4158);
- static result_t TimerM$Timer$start(uint8_t arg_0x88d4158, char arg_0x85800e0, uint32_t arg_0x8580238);
- static result_t TimerM$Timer$stop(uint8_t arg_0x88d4158);
- static void HPLClock$Clock$setInterval(uint8_t arg_0x88f08c8);
- static uint8_t HPLClock$Clock$readCounter(void);
- static result_t HPLClock$Clock$setRate(char arg_0x8913d88, char arg_0x8913ec8);
- static uint8_t HPLClock$Clock$getInterval(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_0x86fbd50);
- 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_0x8584228);
- static void HPLSClock$SClock$setTime(uint8_t arg_0x8584670, GTime *arg_0x85847d0);
- static result_t HPLSClock$SClock$SetRate(uint16_t arg_0x857f4a8, char arg_0x857f5e8);
- static result_t FramerM$ByteComm$txDone(void);
- static result_t FramerM$ByteComm$txByteReady(bool arg_0x8978ad8);
- static result_t FramerM$ByteComm$rxByteReady(uint8_t arg_0x8978308, bool arg_0x8978450, uint16_t arg_0x89785a8);
- static result_t FramerM$BareSendMsg$send(TOS_MsgPtr arg_0x86be870);
- static result_t FramerM$StdControl$init(void);
- static result_t FramerM$StdControl$start(void);
- static result_t FramerM$TokenReceiveMsg$ReflectToken(uint8_t arg_0x897a0e8);
- static TOS_MsgPtr FramerAckM$ReceiveMsg$receive(TOS_MsgPtr arg_0x856c0f0);
- static TOS_MsgPtr FramerAckM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0x897f970, uint8_t arg_0x897fab8);
- static result_t UARTM$HPLUART$get(uint8_t arg_0x89be800);
- static result_t UARTM$HPLUART$putDone(void);
- static result_t UARTM$ByteComm$txByte(uint8_t arg_0x897bdd8);
- 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_0x89be300);
- 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_0x8515e08);
- 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
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t TestBedTopologyM$SubControl$init(void);
- static
- result_t TestBedTopologyM$SubControl$start(void);
- static
- # 150 "../../tos/platform/mica2/CC1000Control.nc"
- result_t TestBedTopologyM$RFset$SetRFPower(uint8_t arg_0x85440e8);
- static inline
- # 15 "TestBedTopologyM.nc"
- result_t TestBedTopologyM$StdControl$init(void);
- static inline
- result_t TestBedTopologyM$StdControl$start(void);
- static inline
- #line 32
- void TestBedTopologyM$Drand$gotFrame(void);
- static inline void TestBedTopologyM$Drand$helloOver(void);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t DrandM$drandRoundTimer$start(char arg_0x85800e0, uint32_t arg_0x8580238);
- static
- result_t DrandM$drandRoundTimer$stop(void);
- static
- # 5 "../../tos/interfaces/Drand.nc"
- void DrandM$Drand$gotFrame(void);
- static void DrandM$Drand$helloOver(void);
- static
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t DrandM$SendGrantMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- #line 48
- result_t DrandM$SendReportMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- #line 48
- result_t DrandM$SendRequestMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- #line 48
- result_t DrandM$SendRejectMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- #line 48
- result_t DrandM$SendHelloMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- #line 48
- result_t DrandM$SendReleaseMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t DrandM$roundTimer$start(char arg_0x85800e0, uint32_t arg_0x8580238);
- static
- #line 59
- result_t DrandM$reXTimer$start(char arg_0x85800e0, uint32_t arg_0x8580238);
- static
- result_t DrandM$reXTimer$stop(void);
- static
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t DrandM$SendTwoHopMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- static
- # 63 "../../tos/interfaces/SClock.nc"
- void DrandM$SClock$getTime(GTime *arg_0x8584228);
- static
- # 48 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t DrandM$SendFrameMsg$send(uint16_t arg_0x857ab18, uint8_t arg_0x857ac60, TOS_MsgPtr arg_0x857adb0);
- # 43 "/usr/lib/gcc-lib/avr/3.3/include/stdarg.h" 3
- typedef __builtin_va_list DrandM$__gnuc_va_list;
- #line 105
- typedef DrandM$__gnuc_va_list DrandM$va_list;
- # 8 "../../tos/interfaces/SODebug.h"
- char DrandM$debugbuf[256];
- static inline
- void DrandM$init_debug(void);
- static
- #line 35
- void DrandM$UARTPutChar(char c);
- static
- void DrandM$writedebug(void);
- static
- int DrandM$sprintf(uint8_t *buf, const uint8_t *format, ...);
- # 43 "../../tos/system/DrandM.nc"
- struct TOS_Msg DrandM$DataPkt;
- uint8_t DrandM$globalState;
- bool DrandM$setMySlot;
- #line 46
- bool DrandM$gotAllFrames;
- uint8_t DrandM$OneWayId[MAX_NBR];
- uint8_t DrandM$TwoWayId[MAX_NBR];
- nodeInfo DrandM$nbrInfo[MAX_NBR];
- #line 51
- nodeInfo DrandM$myInfo;
- uint8_t DrandM$requestFireCount;
- #line 53
- uint8_t DrandM$grantFireCount;
- #line 53
- uint8_t DrandM$frameFireCount;
- #line 53
- uint8_t DrandM$reportFireCount;
- uint16_t DrandM$OTT;
- #line 54
- uint16_t DrandM$ROUND_TIME;
- #line 54
- uint16_t DrandM$REQUEST_TIME;
- #line 54
- uint16_t DrandM$GRANT_TIME;
- GTime DrandM$requestStartTime;
- #line 55
- GTime DrandM$locTime;
- #line 55
- GTime DrandM$drandStartTime;
- #line 55
- GTime DrandM$drandRunTime;
- uint16_t DrandM$shiftReg;
- #line 56
- uint16_t DrandM$mask;
- GTime DrandM$roundStartTime;
- uint8_t DrandM$reqCount;
- #line 59
- uint8_t DrandM$graCount;
- #line 59
- uint8_t DrandM$rejCount;
- #line 59
- uint8_t DrandM$relCount;
- #line 59
- uint8_t DrandM$twoCount;
- #line 59
- uint8_t DrandM$reqXCount;
- #line 59
- uint8_t DrandM$graXCount;
- bool DrandM$reqX;
- #line 60
- bool DrandM$graX;
- uint8_t DrandM$roundNum;
- bool DrandM$sendBusy;
- #line 64
- bool DrandM$drandFinishedFirstTime;
- #line 64
- bool DrandM$reportFinishedFirstTime;
- #line 64
- bool DrandM$sentRelease;
- #line 64
- bool DrandM$firstGrant;
- uint8_t DrandM$lastReqID;
- static
- GTime DrandM$timeDiff(GTime A, GTime B);
- static
- #line 109
- void DrandM$printNbrInfo(void);
- static
- #line 146
- void DrandM$timeCheck(void);
- static
- #line 204
- int DrandM$isPresentHelloID(uint8_t node, uint8_t *array, uint8_t max);
- static inline
- bool DrandM$checkForRetransGrant(requestMsg *reqMsgPtr);
- static inline
- bool DrandM$checkForRetransReport(void);
- static inline
- #line 233
- bool DrandM$checkForRetransFrame(void);
- static
- #line 245
- uint8_t DrandM$getMaxSlot(void);
- static
- void DrandM$addNode(uint8_t nodeID, uint8_t type);
- static
- #line 271
- void DrandM$removeNode(uint8_t nodeID, uint8_t type);
- static inline
- #line 283
- void DrandM$initializeGrantSent(void);
- static
- uint8_t DrandM$numGrantsRemaining(void);
- static inline
- #line 302
- uint8_t DrandM$numOneHop(void);
- static
- bool DrandM$updateNeighborInfo(uint8_t nID, uint8_t slot);
- static inline
- void DrandM$fillGrantSendInfo(uint8_t *array);
- static inline
- void DrandM$fillTimeSlotInfo(uint8_t *array);
- static inline
- void DrandM$fillFrameInfo(frameMsg *pkt);
- static inline
- #line 355
- void DrandM$fillTimeSlotInfoForReport(uint8_t *array);
- static
- void DrandM$addHelloID(uint8_t node, uint8_t *array);
- static
- #line 380
- void DrandM$removeHelloID(uint8_t node, uint8_t *array);
- static
- #line 392
- int DrandM$isPresent(uint8_t nodeID, uint8_t type);
- static
- uint8_t DrandM$getContenders(void);
- static inline
- void DrandM$removeNodesForRequest(void);
- static inline
- #line 424
- void DrandM$removeNodeForGrant(uint8_t nodeID);
- static
- #line 440
- void DrandM$removeNodesForReport(void);
- static inline
- #line 454
- void DrandM$removeNodesForFrame(void);
- static inline
- #line 468
- void DrandM$updateNeighborInfoForReport(int nIndex, reportMsg *pkt);
- static inline
- #line 485
- void DrandM$updateNeighborInfoForFrame(uint8_t nIndex, frameMsg *pkt);
- static
- #line 501
- uint16_t DrandM$randNew(void);
- static inline
- #line 517
- result_t DrandM$StdControl$init(void);
- static inline
- #line 565
- result_t DrandM$StdControl$start(void);
- static
- #line 579
- void DrandM$sendHelloMsg(void);
- static
- #line 616
- void DrandM$sendRequestMsg(void);
- static inline
- #line 648
- void DrandM$sendRejectMsg(uint8_t msgADDR);
- static
- #line 670
- void DrandM$sendReleaseMsg(uint8_t slot);
- static
- #line 693
- void DrandM$setSlot(void);
- static
- #line 722
- void DrandM$setFrame(void);
- static inline
- #line 738
- void DrandM$sendTwoHopMsg(uint8_t slot, uint8_t sendID);
- static inline
- #line 761
- void DrandM$sendGrantMsg(uint8_t msgADDR);
- static
- #line 792
- void DrandM$sendReportMsg(uint8_t type);
- static
- #line 817
- void DrandM$sendFrameMsg(uint8_t frameType);
- static inline
- #line 842
- result_t DrandM$SendHelloMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 856
- result_t DrandM$SendRequestMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 886
- result_t DrandM$SendRejectMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 910
- result_t DrandM$SendReleaseMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 932
- result_t DrandM$SendTwoHopMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 954
- result_t DrandM$SendGrantMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 984
- result_t DrandM$SendReportMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 1002
- result_t DrandM$SendFrameMsg$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- #line 1017
- TOS_MsgPtr DrandM$ReceiveHelloMsg$receive(TOS_MsgPtr m);
- static inline
- #line 1098
- TOS_MsgPtr DrandM$ReceiveRequestMsg$receive(TOS_MsgPtr m);
- static inline
- #line 1149
- TOS_MsgPtr DrandM$ReceiveRejectMsg$receive(TOS_MsgPtr m);
- static
- #line 1177
- TOS_MsgPtr DrandM$ReceiveReleaseMsg$receive(TOS_MsgPtr m);
- static inline
- #line 1215
- TOS_MsgPtr DrandM$ReceiveTwoHopMsg$receive(TOS_MsgPtr m);
- static inline
- #line 1236
- TOS_MsgPtr DrandM$ReceiveGrantMsg$receive(TOS_MsgPtr m);
- static
- #line 1308
- void DrandM$reXFrame(void);
- static
- #line 1331
- void DrandM$reXReport(void);
- static inline
- #line 1347
- TOS_MsgPtr DrandM$ReceiveReportMsg$receive(TOS_MsgPtr m);
- static inline
- #line 1373
- TOS_MsgPtr DrandM$ReceiveFrameMsg$receive(TOS_MsgPtr m);
- static inline
- #line 1393
- void DrandM$reXHello(void);
- static inline
- void DrandM$reXRequest(void);
- static inline
- #line 1425
- void DrandM$reXGrant(void);
- static inline
- #line 1454
- void DrandM$helloOver(void);
- static inline
- #line 1498
- void DrandM$drandRoundOver(void);
- static inline
- #line 1537
- result_t DrandM$reXTimer$fired(void);
- static inline
- #line 1560
- result_t DrandM$roundTimer$fired(void);
- static inline
- #line 1582
- result_t DrandM$drandRoundTimer$fired(void);
- static inline
- #line 1601
- result_t DrandM$SClock$syncDone(void);
- static inline result_t DrandM$SClock$fire(uint16_t mticks);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr AMStandard$ReceiveMsg$receive(
- # 56 "/home/testuser/tinyos-1.x/tos/system/AMStandard.nc"
- uint8_t arg_0x86aab68,
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/ReceiveMsg.nc"
- TOS_MsgPtr arg_0x856c0f0);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t AMStandard$ActivityTimer$start(char arg_0x85800e0, uint32_t arg_0x8580238);
- static
- # 58 "/home/testuser/tinyos-1.x/tos/interfaces/BareSendMsg.nc"
- result_t AMStandard$UARTSend$send(TOS_MsgPtr arg_0x86be870);
- static
- # 41 "/home/testuser/tinyos-1.x/tos/interfaces/PowerManagement.nc"
- uint8_t AMStandard$PowerManagement$adjustPower(void);
- static
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- result_t AMStandard$RadioControl$init(void);
- static
- result_t AMStandard$RadioControl$start(void);
- static
- #line 63
- result_t AMStandard$TimerControl$init(void);
- static
- result_t AMStandard$TimerControl$start(void);
- static
- #line 63
- result_t AMStandard$UARTControl$init(void);
- static
- result_t AMStandard$UARTControl$start(void);
- static
- # 65 "/home/testuser/tinyos-1.x/tos/system/AMStandard.nc"
- result_t AMStandard$sendDone(void);
- static
- # 58 "/home/testuser/tinyos-1.x/tos/interfaces/BareSendMsg.nc"
- result_t AMStandard$RadioSend$send(TOS_MsgPtr arg_0x86be870);
- static
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- result_t AMStandard$SendMsg$sendDone(
- # 55 "/home/testuser/tinyos-1.x/tos/system/AMStandard.nc"
- uint8_t arg_0x86aa5b0,
- # 49 "/home/testuser/tinyos-1.x/tos/interfaces/SendMsg.nc"
- TOS_MsgPtr arg_0x857b1d0, result_t arg_0x857b320);
- # 81 "/home/testuser/tinyos-1.x/tos/system/AMStandard.nc"
- bool AMStandard$state;
- TOS_MsgPtr AMStandard$buffer;
- uint16_t AMStandard$lastCount;
- uint16_t AMStandard$counter;
- static inline
- bool AMStandard$Control$init(void);
- static inline
- #line 103
- bool AMStandard$Control$start(void);
- static inline
- #line 132
- void AMStandard$dbgPacket(TOS_MsgPtr data);
- static
- result_t AMStandard$reportSendDone(TOS_MsgPtr msg, result_t success);
- static inline
- result_t AMStandard$ActivityTimer$fired(void);
- static inline
- result_t AMStandard$SendMsg$default$sendDone(uint8_t id, TOS_MsgPtr msg, result_t success);
- static inline
- result_t AMStandard$default$sendDone(void);
- static inline
- void AMStandard$sendTask(void);
- static
- #line 179
- result_t AMStandard$SendMsg$send(uint8_t id, uint16_t addr, uint8_t length, TOS_MsgPtr data);
- static inline
- #line 207
- result_t AMStandard$UARTSend$sendDone(TOS_MsgPtr msg, result_t success);
- static inline
- result_t AMStandard$RadioSend$sendDone(TOS_MsgPtr msg, result_t success);
- TOS_MsgPtr received(TOS_MsgPtr packet);
- static inline
- #line 242
- TOS_MsgPtr AMStandard$ReceiveMsg$default$receive(uint8_t id, TOS_MsgPtr msg);
- static inline
- TOS_MsgPtr AMStandard$UARTReceive$receive(TOS_MsgPtr packet);
- static inline
- TOS_MsgPtr AMStandard$RadioReceive$receive(TOS_MsgPtr packet);
- static
- # 59 "/home/testuser/tinyos-1.x/tos/interfaces/Timer.nc"
- result_t CC1000RadioIntM$SquelchTimer$start(char arg_0x85800e0, uint32_t arg_0x8580238);
- 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_0x86bed88, result_t arg_0x86beed8);
- 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_0x86fe5c0, uint8_t arg_0x86fe708);
- 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_0x85800e0, uint32_t arg_0x8580238);
- 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_0x856c0f0);
- 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_0x86fbd50);
- 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_0x85800e0, uint32_t arg_0x8580238);
- static
- result_t CC1000RadioIntM$WakeupTimer$stop(void);
- static
- # 36 "../../tos/platform/mica2/RadioCoordinator.nc"
- void CC1000RadioIntM$RadioReceiveCoordinator$byte(TOS_MsgPtr arg_0x86d4f68, uint8_t arg_0x86d50b8);
- static
- void CC1000RadioIntM$RadioReceiveCoordinator$blockTimer(void);
- static
- #line 31
- void CC1000RadioIntM$RadioReceiveCoordinator$startSymbol(uint8_t arg_0x86d4858, uint8_t arg_0x86d49a0, TOS_MsgPtr arg_0x86d4af0);
- 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_0x8544980);
- static
- # 36 "../../tos/platform/mica2/RadioCoordinator.nc"
- void CC1000RadioIntM$RadioSendCoordinator$byte(TOS_MsgPtr arg_0x86d4f68, uint8_t arg_0x86d50b8);
- static
- void CC1000RadioIntM$RadioSendCoordinator$blockTimer(void);
- static
- #line 31
- void CC1000RadioIntM$RadioSendCoordinator$startSymbol(uint8_t arg_0x86d4858, uint8_t arg_0x86d49a0, TOS_MsgPtr arg_0x86d4af0);
- static
- # 63 "../../tos/interfaces/SClock.nc"
- void CC1000RadioIntM$SClock$getTime(GTime *arg_0x8584228);
- static
- void CC1000RadioIntM$SClock$setTime(uint8_t arg_0x8584670, GTime *arg_0x85847d0);
- static
- #line 45
- result_t CC1000RadioIntM$SClock$SetRate(uint16_t arg_0x857f4a8, char arg_0x857f5e8);
- 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_0x86d6c88);
- static int16_t CC1000RadioIntM$MacBackoff$congestionBackoff(TOS_MsgPtr arg_0x86d70b0);
- # 60 "../../tos/platform/mica2/CC1000RadioIntM.nc"
- enum CC1000RadioIntM$__nesc_unnamed4274 {
- 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_unnamed4275 {
- 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_unnamed4276 {
- 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_unnamed4277 {
- CC1000RadioIntM$BMAC,
- CC1000RadioIntM$ZMAC
- };
- enum CC1000RadioIntM$__nesc_unnamed4278 {
- CC1000RadioIntM$MAX_VAL = 0xFFFF
- };
- enum CC1000RadioIntM$__nesc_unnamed4279 {
- CC1000RadioIntM$POSITIVE = 1,
- CC1000RadioIntM$NEGATIVE = 2,
- CC1000RadioIntM$ZERO = 3
- };
- 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_unnamed4280 {
- 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$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 inline
- #line 424
- void CC1000RadioIntM$adjustTime(void);
- static
- void CC1000RadioIntM$PacketRcvd(void);
- static inline
- #line 506
- void CC1000RadioIntM$PacketSent(void);
- 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
- #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_0x8873158);
- static
- #line 58
- result_t CC1000ControlM$HPLChipcon$write(uint8_t arg_0x8872ba0, uint8_t arg_0x8872ce8);
-
- # 83 "../../tos/platform/mica2/CC1000ControlM.nc"
- uint8_t CC1000ControlM$gCurrentParameters[31];
- enum CC1000ControlM$__nesc_unnamed4281 {
- 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 inline
- 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_0x88ab3d0, uint8_t arg_0x88ab518);
- static
- #line 54
- result_t ADCREFM$HPLADC$init(void);
- static
- #line 77
- result_t ADCREFM$HPLADC$samplePort(uint8_t arg_0x88aba00);
- 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_0x86d1290,
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.nc"
- uint16_t arg_0x86fa7d8);
- static
- #line 70
- result_t ADCREFM$ADC$dataReady(
- # 66 "../../tos/platform/mica2/ADCREFM.nc"
- uint8_t arg_0x86d0c08,
- # 70 "/home/testuser/tinyos-1.x/tos/interfaces/ADC.nc"
- uint16_t arg_0x86fa7d8);
- # 80 "../../tos/platform/mica2/ADCREFM.nc"
- enum ADCREFM$__nesc_unnamed4282 {
- 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_0x88c8548);
- # 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_0x88f08c8);
- static
- #line 153
- uint8_t TimerM$Clock$readCounter(void);
- static
- #line 96
- result_t TimerM$Clock$setRate(char arg_0x8913d88, char arg_0x8913ec8);
- 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_0x88d4158);
- 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_unnamed4283 {
- 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);
-
- # 51 "../../tos/platform/mica2/HPLPowerManagementM.nc"
- int8_t HPLPowerManagementM$disableCount = 1;
- uint8_t HPLPowerManagementM$powerLevel;
- enum HPLPowerManagementM$__nesc_unnamed4284 {
- 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_0x8713520);
-
- # 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_0x8585230);
- # 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_0x856c0f0);
- static
- # 55 "/home/testuser/tinyos-1.x/tos/interfaces/ByteComm.nc"
- result_t FramerM$ByteComm$txByte(uint8_t arg_0x897bdd8);
- 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_0x86bed88, result_t arg_0x86beed8);
- static
- # 75 "/home/testuser/tinyos-1.x/tos/interfaces/TokenReceiveMsg.nc"
- TOS_MsgPtr FramerM$TokenReceiveMsg$receive(TOS_MsgPtr arg_0x897f970, uint8_t arg_0x897fab8);
- # 82 "/home/testuser/tinyos-1.x/tos/system/FramerM.nc"
- enum FramerM$__nesc_unnamed4285 {
- 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_unnamed4286 {
- FramerM$RXSTATE_NOSYNC,
- FramerM$RXSTATE_PROTO,
- FramerM$RXSTATE_TOKEN,
- FramerM$RXSTATE_INFO,
- FramerM$RXSTATE_ESC
- };
- enum FramerM$__nesc_unnamed4287 {
- 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_unnamed4288 {
- 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_0x856c0f0);
- static
- # 88 "/home/testuser/tinyos-1.x/tos/interfaces/TokenReceiveMsg.nc"
- result_t FramerAckM$TokenReceiveMsg$ReflectToken(uint8_t arg_0x897a0e8);
- # 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_0x89be300);
- 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_0x8978ad8);
- static
- #line 66
- result_t UARTM$ByteComm$rxByteReady(uint8_t arg_0x8978308, bool arg_0x8978450, uint16_t arg_0x89785a8);
- # 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_0x89be800);
- 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);
- # 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_0x8515e08){
- #line 78
- unsigned char result;
- #line 78
- #line 78
- result = PotM$Pot$init(arg_0x8515e08);
- #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;
- }
- static inline
- # 14 "../../tos/interfaces/SODebug.h"
- void DrandM$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;
- }
- # 63 "../../tos/interfaces/SClock.nc"
- inline static void DrandM$SClock$getTime(GTime *arg_0x8584228){
- #line 63
- HPLSClock$SClock$getTime(arg_0x8584228);
- #line 63
- }
- #line 63
- static inline
- # 517 "../../tos/system/DrandM.nc"
- result_t DrandM$StdControl$init(void)
- #line 517
- {
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 518
- {
- uint8_t i;
- for (i = 0; i < MAX_NBR; i++) {
- DrandM$nbrInfo[i].nodeID = 0xFF;
- DrandM$nbrInfo[i].slot = 0xFF;
- DrandM$nbrInfo[i].frame = 0xFF;
- DrandM$nbrInfo[i].bitMap = 0x0;
- DrandM$OneWayId[i] = DrandM$TwoWayId[i] = 0xFF;
- }
- DrandM$myInfo.slot = 0xFF;
- DrandM$myInfo.nodeID = TOS_LOCAL_ADDRESS;
- DrandM$myInfo.frame = 0xFF;
- DrandM$myInfo.bitMap = 0xFF;
- DrandM$globalState = HELLO_STATE;
- DrandM$setMySlot = DrandM$gotAllFrames = FALSE;
- DrandM$lastReqID = 0xFF;
- DrandM$requestFireCount = DrandM$grantFireCount = DrandM$reportFireCount = DrandM$frameFireCount = 0;
- DrandM$OTT = 100;
- DrandM$ROUND_TIME = 1500;
- DrandM$REQUEST_TIME = 1000;
- DrandM$GRANT_TIME = 1000;
- DrandM$sendBusy = FALSE;
- DrandM$drandFinishedFirstTime = DrandM$reportFinishedFirstTime = TRUE;
- DrandM$sentRelease = FALSE;
- DrandM$firstGrant = TRUE;
- DrandM$SClock$getTime(&DrandM$locTime);
- DrandM$shiftReg = 119 * 119 * (DrandM$locTime.sticks + TOS_LOCAL_ADDRESS + 1);
- DrandM$mask = 137 * 29 * (DrandM$locTime.sticks + TOS_LOCAL_ADDRESS + 1);
- DrandM$reqCount = DrandM$graCount = DrandM$rejCount = DrandM$relCount = DrandM$twoCount = DrandM$reqXCount = DrandM$graXCount = 0, DrandM$roundNum = 0;
- DrandM$reqX = DrandM$graX = FALSE;
- DrandM$init_debug();
- }
- #line 557
- __nesc_atomic_end(__nesc_atomic); }
- return SUCCESS;
- }
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- inline static result_t TestBedTopologyM$SubControl$init(void){
- #line 63
- unsigned char result;
- #line 63
- #line 63
- result = DrandM$StdControl$init();
- #line 63
- #line 63
- return result;
- #line 63
- }
- #line 63
- static inline
- # 15 "TestBedTopologyM.nc"
- result_t TestBedTopologyM$StdControl$init(void)
- #line 15
- {
- TestBedTopologyM$SubControl$init();
- return SUCCESS;
- }
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- 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
- static inline
- # 59 "/home/testuser/tinyos-1.x/tos/system/RandomLFSR.nc"
- result_t RandomLFSR$Random$init(void)
- #line 59
- {
- {
- }
- #line 60
- ;
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 61
- {
- RandomLFSR$shiftReg = 119 * 119 * (TOS_LOCAL_ADDRESS + 1);
- RandomLFSR$initSeed = RandomLFSR$shiftReg;
- RandomLFSR$mask = 137 * 29 * (TOS_LOCAL_ADDRESS + 1);
- }
- #line 65
- __nesc_atomic_end(__nesc_atomic); }
- return SUCCESS;
- }
- # 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_0x88ab3d0, uint8_t arg_0x88ab518){
- #line 70
- unsigned char result;
- #line 70
- #line 70
- result = HPLADCM$ADC$bindPort(arg_0x88ab3d0, arg_0x88ab518);
- #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_0x86fe5c0, uint8_t arg_0x86fe708){
- #line 116
- unsigned char result;
- #line 116
- #line 116
- result = ADCREFM$ADCControl$bindPort(arg_0x86fe5c0, arg_0x86fe708);
- #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_0x8872ba0, uint8_t arg_0x8872ce8){
- #line 58
- unsigned char result;
- #line 58
- #line 58
- result = HPLCC1000M$HPLCC1000$write(arg_0x8872ba0, arg_0x8872ce8);
- #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_0x8544980){
- #line 170
- unsigned char result;
- #line 170
- #line 170
- result = CC1000ControlM$CC1000Control$SelectLock(arg_0x8544980);
- #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_0x8873158){
- #line 65
- unsigned char result;
- #line 65
- #line 65
- result = HPLCC1000M$HPLCC1000$read(arg_0x8873158);
- #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)) | (
- 3 << 1)) | (1 << 0);
- CC1000ControlM$gCurrentParameters[0x11] = ((5 << 4) | (1 << 2)) | (
- 1 << 0);
- CC1000ControlM$cc1000SetModem();
- CC1000ControlM$gCurrentParameters[0x13] = 1 << 0;
- CC1000ControlM$HPLChipcon$write(0x13, CC1000ControlM$gCurrentParameters[0x13]);
- CC1000ControlM$gCurrentParameters[0x1e] = TRUE;
- CC1000ControlM$CC1000Control$TunePreset(0x00);
- return SUCCESS;
- }
- # 63 "/home/testuser/tinyos-1.x/tos/interfaces/StdControl.nc"
- inline static result_t CC1000RadioIntM$CC1000StdControl$init(void){
- #line 63
- unsigned char result;
- #line 63
- #line 63
- result = CC1000ControlM$StdControl$init();
- #line 63
- #line 63
- return result;
- #line 63
- }
- #line 63
- # 143 "../../tos/platform/mica2/hardware.h"
- static __inline void TOSH_MAKE_MOSI_INPUT(void)
- #line 143
- {
- #line 143
- * (volatile uint8_t *)(0x17 + 0x20) &= ~(1 << 2);
- }
- static __inline void TOSH_MAKE_SPI_SCK_INPUT(void)
- #line 146
- {
- #line 146
- * (volatile uint8_t *)(0x17 + 0x20) &= ~(1 << 1);
- }
- static inline
- # 90 "../../tos/platform/mica2/HPLSpiM.nc"
- result_t HPLSpiM$SpiByteFifo$initSlave(void)
- #line 90
- {
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 91
- {
- TOSH_MAKE_SPI_SCK_INPUT();
- TOSH_MAKE_MISO_INPUT();
- TOSH_MAKE_MOSI_INPUT();
- * (volatile uint8_t *)(0x0D + 0x20) &= ~(1 << 3);
- * (volatile uint8_t *)(0x0D + 0x20) &= ~(1 << 2);
- * (volatile uint8_t *)(0x0D + 0x20) |= 1 << 7;
- * (volatile uint8_t *)(0x0D + 0x20) |= 1 << 6;
- }
- #line 99
- __nesc_atomic_end(__nesc_atomic); }
- return SUCCESS;
- }
- # 38 "../../tos/platform/mica2/SpiByteFifo.nc"
- inline static result_t CC1000RadioIntM$SpiByteFifo$initSlave(void){
- #line 38
- unsigned char result;
- #line 38
- #line 38
- result = HPLSpiM$SpiByteFifo$initSlave();
- #line 38
- #line 38
- return result;
- #line 38
- }
- #line 38
- static inline
- # 648 "../../tos/platform/mica2/CC1000RadioIntM.nc"
- result_t CC1000RadioIntM$StdControl$init(void)
- #line 648
- {
- char i;
- ecnMsgType *ecnMsgPtr = (ecnMsgType *)CC1000RadioIntM$ecnMsgHdr.data;
- #line 651
- { __nesc_atomic_t __nesc_atomic = __nesc_atomic_start();
- #line 651
- {
- CC1000RadioIntM$RadioState = CC1000RadioIntM$DISABLED_STATE;
- CC1000RadioIntM$RadioTxState = CC1000RadioIntM$TXSTATE_PREAMBLE;
- CC1000RadioIntM$rxbufptr = &CC1000RadioIntM$RxBuf;
- CC1000RadioIntM$rxbufptr->length = 0;
- CC1000RadioIntM$rxlength = MSG_DATA_SIZE - 2;
- CC1000RadioIntM$RxBitOffset = 0;
- CC1000RadioIntM$iSquelchCount = 0;
- CC1000RadioIntM$PreambleCount = 0;
- CC1000RadioIntM$RSSISampleFreq = 0;
- CC1000RadioIntM$RxShiftBuf.W = 0;
- CC1000RadioIntM$iRSSIcount = 0;
- CC1000RadioIntM$bTxPending = FALSE;
- CC1000RadioIntM$bTxBusy = FALSE;
- CC1000RadioIntM$bRSSIValid = FALSE;
- CC1000RadioIntM$bAckEnable = FALSE;
- CC1000RadioIntM$bCCAEnable = TRUE;
- CC1000RadioIntM$CC1K_PulseLevel = 300;
- CC1000RadioIntM$sMacDelay = -1;
- CC1000RadioIntM$usRSSIVal = -1;
- CC1000RadioIntM$usSquelchIndex = 0;
- CC1000RadioIntM$pulse_check_count = 0;
- CC1000RadioIntM$lplpower = 0;
- CC1000RadioIntM$RSSIInitState = CC1000RadioIntM$NULL_STATE;
- CC1000RadioIntM$usSquelchVal = 0x120;
- CC1000RadioIntM$currentMAC = CC1000RadioIntM$BMAC;
- CC1000RadioIntM$congBackOffs = 0;
- CC1000RadioIntM$packetsSent = 0;
- CC1000RadioIntM$pktsLastSync = 0;
- CC1000RadioIntM$avgLoss = 0.0;
- CC1000RadioIntM$curHCLlist = 0;
- CC1000RadioIntM$globalFrameLength = 32;
- CC1000RadioIntM$localFrameLength = 32;
- CC1000RadioIntM$slotSize = 50;
- CC1000RadioIntM$localFrameSize = CC1000RadioIntM$localFrameLength * CC1000RadioIntM$slotSize;
- CC1000RadioIntM$globalFrameSize = CC1000RadioIntM$globalFrameLength * CC1000RadioIntM$slotSize;
- CC1000RadioIntM$ackOrig = CC1000RadioIntM$bAckEnable;
- CC1000RadioIntM$ecnPending = FALSE;
- CC1000RadioIntM$ecnforward = FALSE;
- CC1000RadioIntM$enableHCL = FALSE;
- CC1000RadioIntM$pureHCL = FALSE;
- CC1000RadioIntM$HCLselect = 0;
- CC1000RadioIntM$needTimeSync = FALSE;
- CC1000RadioIntM$slots_since_ecnsend = 0;
- CC1000RadioIntM$slots_since_ecnrecv = 0;
- CC1000RadioIntM$slots_since_ecncheck = 0;
- CC1000RadioIntM$ecnMsgHdr.type = 222;
- CC1000RadioIntM$ecnMsgHdr.addr = TOS_BCAST_ADDR;
- CC1000RadioIntM$ecnMsgHdr.length = sizeof(ecnMsgType );
- CC1000RadioIntM$ecnMsgHdr.group = 125;
- CC1000RadioIntM$ecnMsgHdr.crc = 0;