Code style fixes: cc2530dk examples
This commit is contained in:
parent
351a4d39b9
commit
594ba9a0ed
10 changed files with 38 additions and 35 deletions
|
@ -47,4 +47,3 @@ netstack_init(void)
|
|||
NETSTACK_RADIO.init();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ AUTOSTART_PROCESSES(&clock_test_process);
|
|||
/*---------------------------------------------------------------------------*/
|
||||
#if TEST_RTIMER
|
||||
void
|
||||
rt_callback(struct rtimer *t, void *ptr) {
|
||||
rt_callback(struct rtimer *t, void *ptr)
|
||||
{
|
||||
rt_now = RTIMER_NOW();
|
||||
ct = clock_time();
|
||||
printf("Task called at %u (clock = %u)\n", rt_now, ct);
|
||||
|
|
|
@ -72,7 +72,8 @@ ping6handler()
|
|||
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[1] = (uint8_t)((uip_len - 40) & 0x00FF);
|
||||
|
||||
|
|
|
@ -92,9 +92,10 @@ static void
|
|||
print_stats()
|
||||
{
|
||||
PRINTF("tl=%lu, ts=%lu, bs=%lu, bc=%lu\n",
|
||||
rimestats.toolong, rimestats.tooshort, rimestats.badsynch, rimestats.badcrc);
|
||||
PRINTF("llrx=%lu, lltx=%lu, rx=%lu, tx=%lu\n",
|
||||
rimestats.llrx, rimestats.lltx, rimestats.rx, rimestats.tx);
|
||||
rimestats.toolong, rimestats.tooshort, rimestats.badsynch,
|
||||
rimestats.badcrc);
|
||||
PRINTF("llrx=%lu, lltx=%lu, rx=%lu, tx=%lu\n", rimestats.llrx,
|
||||
rimestats.lltx, rimestats.rx, rimestats.tx);
|
||||
}
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -131,7 +132,8 @@ create_dag()
|
|||
|
||||
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) {
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
rpl_set_prefix(dag, &ipaddr, 64);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue