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

📄 app.c

📁 tinyos2.0版本驱动
💻 C
📖 第 1 页 / 共 5 页
字号:
  ATM128_SPI_CLK_DIVIDE_64 = 2,   ATM128_SPI_CLK_DIVIDE_128 = 3};#line 49#line 40typedef struct __nesc_unnamed4323 {  uint8_t spie : 1;  uint8_t spe : 1;  uint8_t dord : 1;  uint8_t mstr : 1;  uint8_t cpol : 1;  uint8_t cpha : 1;  uint8_t spr : 2;} Atm128SPIControl_s;#line 50typedef union __nesc_unnamed4324 {  uint8_t flat;  Atm128SPIControl_s bits;} Atm128SPIControl_t;typedef Atm128SPIControl_t Atm128_SPCR_t;#line 58typedef struct __nesc_unnamed4325 {  uint8_t spif : 1;  uint8_t wcol : 1;  uint8_t rsvd : 5;  uint8_t spi2x : 1;} Atm128SPIStatus_s;#line 65typedef union __nesc_unnamed4326 {  uint8_t flat;  Atm128SPIStatus_s bits;} Atm128SPIStatus_t;typedef Atm128SPIStatus_t Atm128_SPSR_t;typedef uint8_t Atm128_SPDR_t;# 60 "/opt/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngine.h"enum __nesc_unnamed4327 {  FORWARD_PACKET_TIME = 32};enum __nesc_unnamed4328 {  SENDDONE_FAIL_OFFSET = 512,   SENDDONE_NOACK_OFFSET = FORWARD_PACKET_TIME << 2,   SENDDONE_OK_OFFSET = FORWARD_PACKET_TIME << 2,   LOOPY_OFFSET = FORWARD_PACKET_TIME << 4,   SENDDONE_FAIL_WINDOW = SENDDONE_FAIL_OFFSET - 1,   LOOPY_WINDOW = LOOPY_OFFSET - 1,   SENDDONE_NOACK_WINDOW = SENDDONE_NOACK_OFFSET - 1,   SENDDONE_OK_WINDOW = SENDDONE_OK_OFFSET - 1,   CONGESTED_WAIT_OFFSET = FORWARD_PACKET_TIME << 2,   CONGESTED_WAIT_WINDOW = CONGESTED_WAIT_OFFSET - 1};enum __nesc_unnamed4329 {  MAX_RETRIES = 30};#line 103#line 97typedef nx_struct __nesc_unnamed4330 {  nx_uint8_t control;  nx_am_addr_t origin;  nx_uint8_t seqno;  nx_uint8_t collectid;  nx_uint16_t gradient;} __attribute__((packed)) network_header_t;#line 116#line 112typedef struct __nesc_unnamed4331 {  message_t *msg;  uint8_t client;  uint8_t retries;} fe_queue_entry_t;# 7 "/opt/tinyos-2.x/tos/lib/net/ctp/CtpDebugMsg.h"enum __nesc_unnamed4332 {  NET_C_DEBUG_STARTED = 0xDE,   NET_C_FE_MSG_POOL_EMPTY = 0x10,   NET_C_FE_SEND_QUEUE_FULL = 0x11,   NET_C_FE_NO_ROUTE = 0x12,   NET_C_FE_SUBSEND_OFF = 0x13,   NET_C_FE_SUBSEND_BUSY = 0x14,   NET_C_FE_BAD_SENDDONE = 0x15,   NET_C_FE_QENTRY_POOL_EMPTY = 0x16,   NET_C_FE_SUBSEND_SIZE = 0x17,   NET_C_FE_LOOP_DETECTED = 0x18,   NET_C_FE_SEND_BUSY = 0x19,   NET_C_FE_SENDQUEUE_EMPTY = 0x50,   NET_C_FE_PUT_MSGPOOL_ERR = 0x51,   NET_C_FE_PUT_QEPOOL_ERR = 0x52,   NET_C_FE_GET_MSGPOOL_ERR = 0x53,   NET_C_FE_GET_QEPOOL_ERR = 0x54,   NET_C_FE_QUEUE_SIZE = 0x55,   NET_C_FE_SENT_MSG = 0x20,   NET_C_FE_RCV_MSG = 0x21,   NET_C_FE_FWD_MSG = 0x22,   NET_C_FE_DST_MSG = 0x23,   NET_C_FE_SENDDONE_FAIL = 0x24,   NET_C_FE_SENDDONE_WAITACK = 0x25,   NET_C_FE_SENDDONE_FAIL_ACK_SEND = 0x26,   NET_C_FE_SENDDONE_FAIL_ACK_FWD = 0x27,   NET_C_FE_DUPLICATE_CACHE = 0x28,   NET_C_FE_DUPLICATE_QUEUE = 0x29,   NET_C_FE_DUPLICATE_CACHE_AT_SEND = 0x2A,   NET_C_FE_CONGESTION_SENDWAIT = 0x2B,   NET_C_FE_CONGESTION_BEGIN = 0x2C,   NET_C_FE_CONGESTION_END = 0x2D,   NET_C_FE_CONGESTED = 0x2E,   NET_C_TREE_NO_ROUTE = 0x30,   NET_C_TREE_NEW_PARENT = 0x31,   NET_C_TREE_ROUTE_INFO = 0x32,   NET_C_TREE_SENT_BEACON = 0x33,   NET_C_TREE_RCV_BEACON = 0x34,   NET_C_DBG_1 = 0x40,   NET_C_DBG_2 = 0x41,   NET_C_DBG_3 = 0x42};#line 79#line 58typedef nx_struct CollectionDebugMsg {  nx_uint8_t type;  nx_union __nesc_unnamed4333 {    nx_uint16_t arg;    nx_struct __nesc_unnamed4334 {      nx_uint16_t msg_uid;      nx_am_addr_t origin;      nx_am_addr_t other_node;    } __attribute__((packed)) msg;    nx_struct __nesc_unnamed4335 {      nx_am_addr_t parent;      nx_uint8_t hopcount;      nx_uint16_t metric;    } __attribute__((packed)) route_info;    nx_struct __nesc_unnamed4336 {      nx_uint16_t a;      nx_uint16_t b;      nx_uint16_t c;    } __attribute__((packed)) dbg;  } __attribute__((packed)) data;  nx_uint16_t seqno;} __attribute__((packed)) CollectionDebugMsg;# 38 "/opt/tinyos-2.x/tos/lib/net/4bitle/LinkEstimator.h"enum __nesc_unnamed4337 {  NUM_ENTRIES_FLAG = 15};#line 54#line 51typedef nx_struct linkest_header {  nx_uint8_t flags;  nx_uint8_t seq;} __attribute__((packed)) linkest_header_t;#line 59typedef nx_struct neighbor_stat_entry {  nx_am_addr_t ll_addr;  nx_uint8_t inquality;} __attribute__((packed)) neighbor_stat_entry_t;#line 65typedef nx_struct linkest_footer {  neighbor_stat_entry_t neighborList[1];} __attribute__((packed)) linkest_footer_t;enum __nesc_unnamed4338 {  VALID_ENTRY = 0x1,   MATURE_ENTRY = 0x2,   INIT_ENTRY = 0x4,   PINNED_ENTRY = 0x8};#line 114#line 86typedef struct neighbor_table_entry {  am_addr_t ll_addr;  uint8_t lastseq;  uint8_t rcvcnt;  uint8_t failcnt;  uint8_t flags;  uint8_t inage;  uint8_t inquality;  uint16_t eetx;  uint8_t data_success;  uint8_t data_total;} neighbor_table_entry_t;# 4 "/opt/tinyos-2.x/tos/lib/net/ctp/TreeRouting.h"enum __nesc_unnamed4339 {  AM_TREE_ROUTING_CONTROL = 0xCE,   BEACON_INTERVAL = 8192,   INVALID_ADDR = 0xFFFF,   ETX_THRESHOLD = 50,   PARENT_SWITCH_THRESHOLD = 15,   MAX_METRIC = 0xFFFF};#line 14typedef struct __nesc_unnamed4340 {  am_addr_t parent;  uint16_t etx;  bool haveHeard;  bool congested;} route_info_t;#line 21typedef struct __nesc_unnamed4341 {  am_addr_t neighbor;  route_info_t info;} routing_table_entry;static __inline void routeInfoInit(route_info_t *ri);# 39 "/opt/tinyos-2.x/tos/chips/atm128/crc.h"uint16_t crcTable[256] __attribute((__progmem__))  = { 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 uint16_t crcByte(uint16_t oldCrc, uint8_t byte) __attribute((noinline)) ;# 32 "/opt/tinyos-2.x/tos/chips/atm128/Atm128Uart.h"typedef uint8_t Atm128_UDR0_t;typedef uint8_t Atm128_UDR1_t;#line 48#line 36typedef union __nesc_unnamed4342 {  struct Atm128_UCSRA_t {    uint8_t mpcm : 1;    uint8_t u2x : 1;    uint8_t upe : 1;    uint8_t dor : 1;    uint8_t fe : 1;    uint8_t udre : 1;    uint8_t txc : 1;    uint8_t rxc : 1;  } bits;  uint8_t flat;} Atm128UartStatus_t;typedef Atm128UartStatus_t Atm128_UCSR0A_t;typedef Atm128UartStatus_t Atm128_UCSR1A_t;#line 66#line 54typedef union __nesc_unnamed4343 {  struct Atm128_UCSRB_t {    uint8_t txb8 : 1;    uint8_t rxb8 : 1;    uint8_t ucsz2 : 1;    uint8_t txen : 1;    uint8_t rxen : 1;    uint8_t udrie : 1;    uint8_t txcie : 1;    uint8_t rxcie : 1;  } bits;  uint8_t flat;} Atm128UartControl_t;typedef Atm128UartControl_t Atm128_UCSR0B_t;typedef Atm128UartControl_t Atm128_UCSR1B_t;enum __nesc_unnamed4344 {  ATM128_UART_DATA_SIZE_5_BITS = 0,   ATM128_UART_DATA_SIZE_6_BITS = 1,   ATM128_UART_DATA_SIZE_7_BITS = 2,   ATM128_UART_DATA_SIZE_8_BITS = 3};#line 89#line 79typedef union __nesc_unnamed4345 {  uint8_t flat;  struct Atm128_UCSRC_t {    uint8_t ucpol : 1;    uint8_t ucsz : 2;    uint8_t usbs : 1;    uint8_t upm : 2;    uint8_t umsel : 1;    uint8_t rsvd : 1;  } bits;} Atm128UartMode_t;typedef Atm128UartMode_t Atm128_UCSR0C_t;typedef Atm128UartMode_t Atm128_UCSR1C_t;enum __nesc_unnamed4346 {  ATM128_19200_BAUD_4MHZ = 12,   ATM128_38400_BAUD_4MHZ = 6,   ATM128_57600_BAUD_4MHZ = 3,   ATM128_19200_BAUD_4MHZ_2X = 25,   ATM128_38400_BAUD_4MHZ_2X = 12,   ATM128_57600_BAUD_4MHZ_2X = 8,   ATM128_19200_BAUD_7MHZ = 23,   ATM128_38400_BAUD_7MHZ = 11,   ATM128_57600_BAUD_7MHZ = 7,   ATM128_19200_BAUD_7MHZ_2X = 47,   ATM128_38400_BAUD_7MHZ_2X = 23,   ATM128_57600_BAUD_7MHZ_2X = 15,   ATM128_19200_BAUD_8MHZ = 25,   ATM128_38400_BAUD_8MHZ = 12,   ATM128_57600_BAUD_8MHZ = 8,   ATM128_19200_BAUD_8MHZ_2X = 51,   ATM128_38400_BAUD_8MHZ_2X = 34,   ATM128_57600_BAUD_8MHZ_2X = 11};typedef uint8_t Atm128_UBRR0L_t;typedef uint8_t Atm128_UBRR0H_t;typedef uint8_t Atm128_UBRR1L_t;typedef uint8_t Atm128_UBRR1H_t;typedef message_t MultihopOscilloscopeC$UARTMessagePool$t;typedef uint16_t MultihopOscilloscopeC$Read$val_t;typedef message_t *MultihopOscilloscopeC$UARTQueue$t;typedef TMilli MultihopOscilloscopeC$Timer$precision_tag;enum HilTimerMilliC$__nesc_unnamed4347 {  HilTimerMilliC$TIMER_COUNT = 6U};typedef TMilli /*AlarmCounterMilliP.Atm128AlarmAsyncC*/Atm128AlarmAsyncC$0$precision;typedef /*AlarmCounterMilliP.Atm128AlarmAsyncC*/Atm128AlarmAsyncC$0$precision /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$precision;typedef /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$precision /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$Alarm$precision_tag;typedef uint32_t /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$Alarm$size_type;typedef /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$precision /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$Counter$precision_tag;typedef uint32_t /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$Counter$size_type;typedef uint8_t /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$Compare$size_type;typedef uint8_t /*AlarmCounterMilliP.Atm128AlarmAsyncC.Atm1281AlarmAsyncP*/Atm1281AlarmAsyncP$0$Timer$timer_size;typedef uint8_t HplAtm1281Timer2AsyncP$Compare$size_type;typedef uint8_t HplAtm1281Timer2AsyncP$Timer$timer_size;typedef TMilli /*HilTimerMilliC.AlarmToTimerC*/AlarmToTimerC$0$precision_tag;typedef /*HilTimerMilliC.AlarmToTimerC*/AlarmToTimerC$0$precision_tag /*HilTimerMilliC.AlarmToTimerC*/AlarmToTimerC$0$Alarm$precision_tag;typedef uint32_t /*HilTimerMilliC.AlarmToTimerC*/AlarmToTimerC$0$Alarm$size_type;typedef /*HilTimerMilliC.AlarmToTimerC*/AlarmToTimerC$0$precision_tag /*HilTimerMilliC.AlarmToTimerC*/AlarmToTimerC$0$Timer$precision_tag;typedef TMilli /*HilTimerMilliC.VirtualizeTimerC*/VirtualizeTimerC$0$precision_tag;typedef /*HilTimerMilliC.VirtualizeTimerC*/VirtualizeTimerC$0$precision_tag /*HilTimerMilliC.VirtualizeTimerC*/VirtualizeTimerC$0$TimerFrom$precision_tag;typedef /*HilTimerMilliC.VirtualizeTimerC*/VirtualizeTimerC$0$precision_tag /*HilTimerMilliC.VirtualizeTimerC*/VirtualizeTimerC$0$Timer$precision_tag;typedef TMilli /*HilTimerMilliC.CounterToLocalTimeC*/CounterToLocalTimeC$0$precision_tag;typedef /*HilTimerMilliC.CounterToLocalTimeC*/CounterToLocalTimeC$0$precision_tag /*HilTimerMilliC.CounterToLocalTimeC*/CounterToLocalTimeC$0$LocalTime$precision_tag;typedef /*HilTimerMilliC.CounterToLocalTimeC*/CounterToLocalTimeC$0$precision_tag /*HilTimerMilliC.CounterToLocalTimeC*/CounterToLocalTimeC$0$Counter$precision_tag;typedef uint32_t /*HilTimerMilliC.CounterToLocalTimeC*/CounterToLocalTimeC$0$Counter$size_type;typedef uint16_t AdcP$Read$val_t;typedef uint16_t AdcP$ReadNow$val_t;typedef uint16_t /*WireAdcP.ArbitrateRead*/ArbitratedReadC$0$width_t;typedef /*WireAdcP.ArbitrateRead*/ArbitratedReadC$0$width_t /*WireAdcP.ArbitrateRead*/ArbitratedReadC$0$Read$val_t;typedef /*WireAdcP.ArbitrateRead*/ArbitratedReadC$0$width_t /*WireAdcP.ArbitrateRead*/ArbitratedReadC$0$Service$val_t;enum /*MultihopOscilloscopeAppC.Sensor.DemoChannel.AdcReadClientC*/AdcReadClientC$0$__nesc_unnamed4348 {  AdcReadClientC$0$ID = 0U, AdcReadClientC$0$HAL_ID = 0U};enum CtpP$__nesc_unnamed4349 {

⌨️ 快捷键说明

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