Some uN_t had crept back in cc2530dk and sensinode.

Changed to uintN_t plus a bit of code formatting
This commit is contained in:
George Oikonomou 2012-03-29 11:07:04 +01:00
parent 9475737f4b
commit 4f1e251603
9 changed files with 21 additions and 32 deletions

View file

@ -40,13 +40,8 @@
#define CC_CONF_FUNCTION_POINTER_KEYWORD __reentrant
/* Generic types. */
typedef unsigned char u8_t; /* 8 bit type */
typedef unsigned short u16_t; /* 16 bit type */
typedef unsigned long u32_t; /* 32 bit type */
typedef signed long s32_t; /* 32 bit type */
typedef unsigned short uip_stats_t;
/* Time type. */
typedef unsigned short clock_time_t;
#define MAX_TICKS (~((clock_time_t)0) / 2)

View file

@ -40,10 +40,6 @@
#define CC_CONF_FUNCTION_POINTER_KEYWORD __reentrant
/* Generic types. */
typedef unsigned char u8_t; /* 8 bit type */
typedef unsigned short u16_t; /* 16 bit type */
typedef unsigned long u32_t; /* 32 bit type */
typedef signed long s32_t; /* 32 bit type */
typedef unsigned short uip_stats_t;
/* Compiler configurations */

View file

@ -46,8 +46,8 @@
#define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
static struct etimer ping6_periodic_timer;
static u8_t count = 0;
static u16_t addr[8];
static uint8_t count = 0;
static uint16_t addr[8];
static uip_ipaddr_t dest_addr;
PROCESS(ping6_process, "PING6 process");
@ -74,8 +74,8 @@ ping6handler()
uip_len = UIP_ICMPH_LEN + UIP_ICMP6_ECHO_REQUEST_LEN + UIP_IPH_LEN + PING6_DATALEN;
UIP_IP_BUF->len[0] = (u8_t)((uip_len - 40) >> 8);
UIP_IP_BUF->len[1] = (u8_t)((uip_len - 40) & 0x00FF);
UIP_IP_BUF->len[0] = (uint8_t)((uip_len - 40) >> 8);
UIP_IP_BUF->len[1] = (uint8_t)((uip_len - 40) & 0x00FF);
UIP_ICMP_BUF->icmpchksum = 0;
UIP_ICMP_BUF->icmpchksum = ~uip_icmp6chksum();

View file

@ -19,7 +19,7 @@ PROCESS_THREAD(clock_test_process, ev, data)
static struct etimer et;
static clock_time_t count, start_count, end_count, diff;
static unsigned long sec;
static u8_t i;
static uint8_t i;
PROCESS_BEGIN();
@ -41,8 +41,8 @@ PROCESS_THREAD(clock_test_process, ev, data)
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
etimer_reset(&et);
count = clock_time();
printf("%u ticks\n", count);
count = clock_time();
printf("%u ticks\n", count);
leds_toggle(LEDS_RED);
i++;
@ -55,8 +55,8 @@ PROCESS_THREAD(clock_test_process, ev, data)
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
etimer_reset(&et);
sec = clock_seconds();
printf("%u seconds\n", (u16_t) sec);
sec = clock_seconds();
printf("%u seconds\n", (uint16_t) sec);
leds_toggle(LEDS_GREEN);
i++;

View file

@ -10,13 +10,13 @@
#define EVENT_POST_H_
struct event_struct {
short s_val;
int i_val;
long l_val;
long long ll_val;
u8_t u8_val;
u16_t u16_val;
u32_t u32_val;
short s_val;
int i_val;
long l_val;
long long ll_val;
uint8_t u8_val;
uint16_t u16_val;
uint32_t u32_val;
};
#endif /* EVENT_POST_H_ */

View file

@ -111,7 +111,7 @@ PROCESS_THREAD(clock_test_process, ev, data)
etimer_reset(&et);
sec = clock_seconds();
printf("%u seconds\n", (u16_t) sec);
printf("%u seconds\n", (uint16_t) sec);
leds_toggle(LEDS_GREEN);
i++;

View file

@ -48,8 +48,8 @@
#define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
static struct etimer ping6_periodic_timer;
static u8_t count = 0;
static u16_t addr[8];
static uint8_t count = 0;
static uint16_t addr[8];
static uip_ipaddr_t dest_addr;
PROCESS(ping6_process, "PING6 process");
@ -76,8 +76,8 @@ ping6handler()
uip_len = UIP_ICMPH_LEN + UIP_ICMP6_ECHO_REQUEST_LEN + UIP_IPH_LEN + PING6_DATALEN;
UIP_IP_BUF->len[0] = (u8_t)((uip_len - 40) >> 8);
UIP_IP_BUF->len[1] = (u8_t)((uip_len - 40) & 0x00FF);
UIP_IP_BUF->len[0] = (uint8_t)((uip_len - 40) >> 8);
UIP_IP_BUF->len[1] = (uint8_t)((uip_len - 40) & 0x00FF);
UIP_ICMP_BUF->icmpchksum = 0;
UIP_ICMP_BUF->icmpchksum = ~uip_icmp6chksum();

View file

@ -71,7 +71,6 @@ extern uip_ds6_netif_t uip_ds6_if;
extern uip_ds6_route_t uip_ds6_routing_table[UIP_DS6_ROUTE_NB];
extern uip_ds6_nbr_t uip_ds6_nbr_cache[UIP_DS6_NBR_NB];
extern uip_ds6_defrt_t uip_ds6_defrt_list[UIP_DS6_DEFRT_NB];
extern u16_t uip_len;
/*---------------------------------------------------------------------------*/
static uint8_t
process_request()

View file

@ -71,7 +71,6 @@ extern uip_ds6_netif_t uip_ds6_if;
extern uip_ds6_route_t uip_ds6_routing_table[UIP_DS6_ROUTE_NB];
extern uip_ds6_nbr_t uip_ds6_nbr_cache[UIP_DS6_NBR_NB];
extern uip_ds6_defrt_t uip_ds6_defrt_list[UIP_DS6_DEFRT_NB];
extern u16_t uip_len;
/*---------------------------------------------------------------------------*/
static uint8_t
process_request()