Code style fixes: cc2530dk examples

This commit is contained in:
George Oikonomou 2012-12-16 15:27:01 +00:00
parent 351a4d39b9
commit 594ba9a0ed
10 changed files with 38 additions and 35 deletions

View file

@ -47,4 +47,3 @@ netstack_init(void)
NETSTACK_RADIO.init(); NETSTACK_RADIO.init();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View file

@ -48,7 +48,8 @@ AUTOSTART_PROCESSES(&clock_test_process);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if TEST_RTIMER #if TEST_RTIMER
void void
rt_callback(struct rtimer *t, void *ptr) { rt_callback(struct rtimer *t, void *ptr)
{
rt_now = RTIMER_NOW(); rt_now = RTIMER_NOW();
ct = clock_time(); ct = clock_time();
printf("Task called at %u (clock = %u)\n", rt_now, ct); printf("Task called at %u (clock = %u)\n", rt_now, ct);

View file

@ -72,7 +72,8 @@ ping6handler()
count, PING6_DATALEN); count, PING6_DATALEN);
uip_len = UIP_ICMPH_LEN + UIP_ICMP6_ECHO_REQUEST_LEN + UIP_IPH_LEN + PING6_DATALEN; uip_len = UIP_ICMPH_LEN + UIP_ICMP6_ECHO_REQUEST_LEN + UIP_IPH_LEN
+ PING6_DATALEN;
UIP_IP_BUF->len[0] = (uint8_t)((uip_len - 40) >> 8); UIP_IP_BUF->len[0] = (uint8_t)((uip_len - 40) >> 8);
UIP_IP_BUF->len[1] = (uint8_t)((uip_len - 40) & 0x00FF); UIP_IP_BUF->len[1] = (uint8_t)((uip_len - 40) & 0x00FF);

View file

@ -92,9 +92,10 @@ static void
print_stats() print_stats()
{ {
PRINTF("tl=%lu, ts=%lu, bs=%lu, bc=%lu\n", PRINTF("tl=%lu, ts=%lu, bs=%lu, bc=%lu\n",
rimestats.toolong, rimestats.tooshort, rimestats.badsynch, rimestats.badcrc); rimestats.toolong, rimestats.tooshort, rimestats.badsynch,
PRINTF("llrx=%lu, lltx=%lu, rx=%lu, tx=%lu\n", rimestats.badcrc);
rimestats.llrx, rimestats.lltx, rimestats.rx, rimestats.tx); PRINTF("llrx=%lu, lltx=%lu, rx=%lu, tx=%lu\n", rimestats.llrx,
rimestats.lltx, rimestats.rx, rimestats.tx);
} }
#endif #endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -131,7 +132,8 @@ create_dag()
print_local_addresses(); print_local_addresses();
dag = rpl_set_root(RPL_DEFAULT_INSTANCE, &uip_ds6_get_global(ADDR_PREFERRED)->ipaddr); dag = rpl_set_root(RPL_DEFAULT_INSTANCE,
&uip_ds6_get_global(ADDR_PREFERRED)->ipaddr);
if(dag != NULL) { if(dag != NULL) {
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0); uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &ipaddr, 64); rpl_set_prefix(dag, &ipaddr, 64);