Merge branch 'fixes-06-14' of git://github.com/mehlis/RIOT into mehlis-fixes-06-14
This commit is contained in:
commit
ac10da4509
@ -28,7 +28,12 @@
|
|||||||
#define KERNEL_CONF_STACKSIZE_DEFAULT (16384)
|
#define KERNEL_CONF_STACKSIZE_DEFAULT (16384)
|
||||||
#define KERNEL_CONF_STACKSIZE_IDLE (16384)
|
#define KERNEL_CONF_STACKSIZE_IDLE (16384)
|
||||||
#define NATIVE_ISR_STACKSIZE (16384)
|
#define NATIVE_ISR_STACKSIZE (16384)
|
||||||
|
// undefine the TRANSCEIVER_STACK_SIZE (2048 or 512) defined in trnsceiver.h
|
||||||
|
#ifdef TRANSCEIVER_STACK_SIZE
|
||||||
|
#undef TRANSCEIVER_STACK_SIZE
|
||||||
|
#endif
|
||||||
#define TRANSCEIVER_STACK_SIZE (16384)
|
#define TRANSCEIVER_STACK_SIZE (16384)
|
||||||
|
|
||||||
#define MINIMUM_STACK_SIZE (16384)
|
#define MINIMUM_STACK_SIZE (16384)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ void print_sigmasks(void)
|
|||||||
if (sched_threads[i] != NULL) {
|
if (sched_threads[i] != NULL) {
|
||||||
printf("%s:\n", sched_threads[i]->name);
|
printf("%s:\n", sched_threads[i]->name);
|
||||||
//print_thread_sigmask(sched_threads[i]->sp);
|
//print_thread_sigmask(sched_threads[i]->sp);
|
||||||
p = sched_threads[i]->stack_start;
|
p = (ucontext_t*)(sched_threads[i]->stack_start);
|
||||||
print_thread_sigmask(p);
|
print_thread_sigmask(p);
|
||||||
puts("");
|
puts("");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ and the mailinglist (subscription via web site)
|
|||||||
* @note $Id: cc110x-defaultSettings.c 2058 2010-03-31 08:59:31Z hillebra $
|
* @note $Id: cc110x-defaultSettings.c 2058 2010-03-31 08:59:31Z hillebra $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cc110x-defaultSettings.h>
|
#include "cc110x-defaultSettings.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Usable, non overlapping channels and corresponding frequencies
|
* Usable, non overlapping channels and corresponding frequencies
|
||||||
|
|||||||
@ -44,13 +44,13 @@ and the mailinglist (subscription via web site)
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <cc110x_ng.h>
|
#include "cc110x_ng.h"
|
||||||
#include <cc110x-arch.h>
|
#include "cc110x-arch.h"
|
||||||
#include <cc110x-internal.h>
|
#include "cc110x-internal.h"
|
||||||
#include <cc110x_spi.h>
|
#include "cc110x_spi.h"
|
||||||
#include <cc110x-reg.h>
|
#include "cc110x-reg.h"
|
||||||
|
|
||||||
#include <irq.h>
|
#include "irq.h"
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
// CC1100 SPI access
|
// CC1100 SPI access
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
INCLUDES = -I../include -I$(RIOTBASE)/core/include/ -I$(RIOTBASE)/drivers/include
|
INCLUDES = -I../include -I$(RIOTBASE)/core/include/ -I$(RIOTBASE)/drivers/include
|
||||||
MODULE =auto_init
|
MODULE = auto_init
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|
||||||
|
|||||||
@ -28,4 +28,9 @@ int timex_cmp(const timex_t a, const timex_t b);
|
|||||||
*/
|
*/
|
||||||
void timex_normalize(timex_t *time);
|
void timex_normalize(timex_t *time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Prints a timex_t
|
||||||
|
*/
|
||||||
|
void timex_print(const timex_t t);
|
||||||
|
|
||||||
#endif /* __TIMEX_H */
|
#endif /* __TIMEX_H */
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
#ifndef __VTIMER_H
|
#ifndef __VTIMER_H
|
||||||
#define __VTIMER_H
|
#define __VTIMER_H
|
||||||
|
|
||||||
#include <queue.h>
|
#include "queue.h"
|
||||||
#include <timex.h>
|
#include "timex.h"
|
||||||
|
|
||||||
#define MSG_TIMER 12345
|
#define MSG_TIMER 12345
|
||||||
|
|
||||||
@ -91,4 +91,9 @@ int vtimer_set_wakeup(vtimer_t *t, timex_t interval, int pid);
|
|||||||
*/
|
*/
|
||||||
int vtimer_remove(vtimer_t *t);
|
int vtimer_remove(vtimer_t *t);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Prints a vtimer_t
|
||||||
|
*/
|
||||||
|
void vtimer_print(vtimer_t* t);
|
||||||
|
|
||||||
#endif /* __VTIMER_H */
|
#endif /* __VTIMER_H */
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "udp.h"
|
#include "udp.h"
|
||||||
#include "tcp.h"
|
#include "tcp.h"
|
||||||
@ -24,8 +25,8 @@ socket_internal_t sockets[MAX_SOCKETS];
|
|||||||
void printf_tcp_context(tcp_hc_context_t *current_tcp_context)
|
void printf_tcp_context(tcp_hc_context_t *current_tcp_context)
|
||||||
{
|
{
|
||||||
printf("Context: %u\n", current_tcp_context->context_id);
|
printf("Context: %u\n", current_tcp_context->context_id);
|
||||||
printf("Rcv Seq: %lu Rcv Ack: %lu, Rcv Wnd: %u\n", current_tcp_context->seq_rcv, current_tcp_context->ack_rcv, current_tcp_context->wnd_rcv);
|
printf("Rcv Seq: %" PRIu32 " Rcv Ack: %" PRIu32 ", Rcv Wnd: %u\n", current_tcp_context->seq_rcv, current_tcp_context->ack_rcv, current_tcp_context->wnd_rcv);
|
||||||
printf("Snd Seq: %lu Snd Ack: %lu, Snd Wnd: %u\n", current_tcp_context->seq_snd, current_tcp_context->ack_snd, current_tcp_context->wnd_snd);
|
printf("Snd Seq: %" PRIu32 " Snd Ack: %" PRIu32 ", Snd Wnd: %u\n", current_tcp_context->seq_snd, current_tcp_context->ack_snd, current_tcp_context->wnd_snd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_tcp_flags (tcp_hdr_t *tcp_header)
|
void print_tcp_flags (tcp_hdr_t *tcp_header)
|
||||||
@ -76,9 +77,9 @@ void print_tcp_cb(tcp_cb_t *cb)
|
|||||||
{
|
{
|
||||||
timex_t now;
|
timex_t now;
|
||||||
vtimer_now(&now);
|
vtimer_now(&now);
|
||||||
printf("Send_ISS: %lu\nSend_UNA: %lu\nSend_NXT: %lu\nSend_WND: %u\n", cb->send_iss, cb->send_una, cb->send_nxt, cb->send_wnd);
|
printf("Send_ISS: %" PRIu32 "\nSend_UNA: %" PRIu32 "\nSend_NXT: %" PRIu32 "\nSend_WND: %u\n", cb->send_iss, cb->send_una, cb->send_nxt, cb->send_wnd);
|
||||||
printf("Rcv_IRS: %lu\nRcv_NXT: %lu\nRcv_WND: %u\n", cb->rcv_irs, cb->rcv_nxt, cb->rcv_wnd);
|
printf("Rcv_IRS: %" PRIu32 "\nRcv_NXT: %" PRIu32 "\nRcv_WND: %u\n", cb->rcv_irs, cb->rcv_nxt, cb->rcv_wnd);
|
||||||
printf("Time difference: %lu, No_of_retries: %u, State: %u\n\n", timex_sub(now, cb->last_packet_time).microseconds, cb->no_of_retries, cb->state);
|
printf("Time difference: %" PRIu32 ", No_of_retries: %u, State: %u\n\n", timex_sub(now, cb->last_packet_time).microseconds, cb->no_of_retries, cb->state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_tcp_status(int in_or_out, ipv6_hdr_t *ipv6_header, tcp_hdr_t *tcp_header, socket_t *tcp_socket)
|
void print_tcp_status(int in_or_out, ipv6_hdr_t *ipv6_header, tcp_hdr_t *tcp_header, socket_t *tcp_socket)
|
||||||
@ -91,8 +92,8 @@ void print_tcp_status(int in_or_out, ipv6_hdr_t *ipv6_header, tcp_hdr_t *tcp_hea
|
|||||||
printf("TCP Length: %x\n", ipv6_header->length-TCP_HDR_LEN);
|
printf("TCP Length: %x\n", ipv6_header->length-TCP_HDR_LEN);
|
||||||
printf("Source Port: %x, Dest. Port: %x\n", NTOHS(tcp_header->src_port), NTOHS(tcp_header->dst_port));
|
printf("Source Port: %x, Dest. Port: %x\n", NTOHS(tcp_header->src_port), NTOHS(tcp_header->dst_port));
|
||||||
printf("Source Port: %u, Dest. Port: %u\n", NTOHS(tcp_header->src_port), NTOHS(tcp_header->dst_port));
|
printf("Source Port: %u, Dest. Port: %u\n", NTOHS(tcp_header->src_port), NTOHS(tcp_header->dst_port));
|
||||||
printf("ACK: %lx, SEQ: %lx, Window: %x\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window);
|
printf("ACK: %" PRIu32 ", SEQ: %" PRIu32 ", Window: %x\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window);
|
||||||
printf("ACK: %lu, SEQ: %lu, Window: %u\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window);
|
printf("ACK: %" PRIu32 ", SEQ: %" PRIu32 ", Window: %u\n", tcp_header->ack_nr, tcp_header->seq_nr, tcp_header->window);
|
||||||
print_tcp_flags(tcp_header);
|
print_tcp_flags(tcp_header);
|
||||||
print_tcp_cb(&tcp_socket->tcp_control);
|
print_tcp_cb(&tcp_socket->tcp_control);
|
||||||
#ifdef TCP_HC
|
#ifdef TCP_HC
|
||||||
@ -558,8 +559,7 @@ int connect(int socket, sockaddr6_t *addr, uint32_t addrlen)
|
|||||||
msg_from_server.type = UNDEFINED;
|
msg_from_server.type = UNDEFINED;
|
||||||
|
|
||||||
// Remember current time
|
// Remember current time
|
||||||
timex_t now;
|
vtimer_now(&now);
|
||||||
vtimer_now(&now)
|
|
||||||
current_tcp_socket->tcp_control.last_packet_time = now;
|
current_tcp_socket->tcp_control.last_packet_time = now;
|
||||||
current_tcp_socket->tcp_control.no_of_retries = 0;
|
current_tcp_socket->tcp_control.no_of_retries = 0;
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "vtimer.h"
|
#include "vtimer.h"
|
||||||
#include "tcp_timer.h"
|
#include "tcp_timer.h"
|
||||||
@ -23,12 +24,12 @@
|
|||||||
void printTCPHeader(tcp_hdr_t *tcp_header)
|
void printTCPHeader(tcp_hdr_t *tcp_header)
|
||||||
{
|
{
|
||||||
printf("\nBEGIN: TCP HEADER\n");
|
printf("\nBEGIN: TCP HEADER\n");
|
||||||
printf("ack_nr: %lu\n", tcp_header->ack_nr);
|
printf("ack_nr: %" PRIu32 "\n", tcp_header->ack_nr);
|
||||||
printf("checksum: %i\n", tcp_header->checksum);
|
printf("checksum: %i\n", tcp_header->checksum);
|
||||||
printf("dataOffset_reserved: %i\n", tcp_header->dataOffset_reserved);
|
printf("dataOffset_reserved: %i\n", tcp_header->dataOffset_reserved);
|
||||||
printf("dst_port: %i\n", tcp_header->dst_port);
|
printf("dst_port: %i\n", tcp_header->dst_port);
|
||||||
printf("reserved_flags: %i\n", tcp_header->reserved_flags);
|
printf("reserved_flags: %i\n", tcp_header->reserved_flags);
|
||||||
printf("seq_nr: %lu\n", tcp_header->seq_nr);
|
printf("seq_nr: %" PRIu32 "\n", tcp_header->seq_nr);
|
||||||
printf("src_port: %i\n", tcp_header->src_port);
|
printf("src_port: %i\n", tcp_header->src_port);
|
||||||
printf("urg_pointer: %i\n", tcp_header->urg_pointer);
|
printf("urg_pointer: %i\n", tcp_header->urg_pointer);
|
||||||
printf("window: %i\n", tcp_header->window);
|
printf("window: %i\n", tcp_header->window);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
MODULE:=$(shell basename $(CURDIR))
|
MODULE:=$(shell basename $(CURDIR))
|
||||||
INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net
|
INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net -I$(RIOTBASE)/cpu/arm_common/include/
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|||||||
@ -111,7 +111,7 @@ void trickle_interval_over(void){
|
|||||||
while(1){
|
while(1){
|
||||||
thread_sleep();
|
thread_sleep();
|
||||||
I = I*2;
|
I = I*2;
|
||||||
printf("TRICKLE new Interval %lu\n",I);
|
printf("TRICKLE new Interval %u\n",I);
|
||||||
if( I == 0 ){
|
if( I == 0 ){
|
||||||
puts("[WARNING] Interval was 0");
|
puts("[WARNING] Interval was 0");
|
||||||
if( Imax == 0){
|
if( Imax == 0){
|
||||||
|
|||||||
@ -462,7 +462,7 @@ void set_remaining_time(timex_t *t, uint32_t time){
|
|||||||
timex_t tmp = {time, 0};
|
timex_t tmp = {time, 0};
|
||||||
|
|
||||||
timex_t now;
|
timex_t now;
|
||||||
vtimer_now(&now)
|
vtimer_now(&now);
|
||||||
*t = timex_add(now, tmp);
|
*t = timex_add(now, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -191,7 +191,7 @@ void send_ieee802154_frame(ieee_802154_long_t *addr, uint8_t *payload,
|
|||||||
|
|
||||||
p.data = buf;
|
p.data = buf;
|
||||||
msg_send_receive(&mesg, &transceiver_rsp, transceiver_pid);
|
msg_send_receive(&mesg, &transceiver_rsp, transceiver_pid);
|
||||||
printf("%s, %u: %lu\n", __FILE__, __LINE__, transceiver_rsp.content.value);
|
printf("%s, %u: %u\n", __FILE__, __LINE__, transceiver_rsp.content.value);
|
||||||
|
|
||||||
hwtimer_wait(5000);
|
hwtimer_wait(5000);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,14 +2,14 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <vtimer.h>
|
|
||||||
#include <timex.h>
|
#include "vtimer.h"
|
||||||
#include <debug.h>
|
#include "timex.h"
|
||||||
#include <thread.h>
|
#include "debug.h"
|
||||||
#include <mutex.h>
|
#include "thread.h"
|
||||||
#include <hwtimer.h>
|
#include "mutex.h"
|
||||||
#include <rtc.h>
|
#include "hwtimer.h"
|
||||||
#include <lpc2387-rtc.h>
|
#include "rtc.h"
|
||||||
#include "msg.h"
|
#include "msg.h"
|
||||||
#include "sixlowmac.h"
|
#include "sixlowmac.h"
|
||||||
#include "sixlowpan.h"
|
#include "sixlowpan.h"
|
||||||
@ -300,7 +300,7 @@ lowpan_reas_buf_t *new_packet_buffer(uint16_t datagram_size, uint16_t datagram_t
|
|||||||
new_buf->packet_size = datagram_size;
|
new_buf->packet_size = datagram_size;
|
||||||
|
|
||||||
timex_t now;
|
timex_t now;
|
||||||
vtimer_now(&now)
|
vtimer_now(&now);
|
||||||
new_buf->timestamp = now.microseconds;
|
new_buf->timestamp = now.microseconds;
|
||||||
|
|
||||||
if ((current_buf == NULL) && (temp_buf == NULL))
|
if ((current_buf == NULL) && (temp_buf == NULL))
|
||||||
@ -532,7 +532,7 @@ void check_timeout(void)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
timex_t now;
|
timex_t now;
|
||||||
vtimer_now(&now)
|
vtimer_now(&now);
|
||||||
cur_time = now.microseconds;
|
cur_time = now.microseconds;
|
||||||
temp_buf = head;
|
temp_buf = head;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
INCLUDES = -I../include
|
INCLUDES = -I../include
|
||||||
MODULE =timex
|
MODULE = timex
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
#include <timex.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "timex.h"
|
||||||
|
|
||||||
timex_t timex_add(const timex_t a, const timex_t b) {
|
timex_t timex_add(const timex_t a, const timex_t b) {
|
||||||
timex_t result;
|
timex_t result;
|
||||||
@ -47,3 +49,6 @@ int timex_cmp(const timex_t a, const timex_t b) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void timex_print(const timex_t t) {
|
||||||
|
printf("Seconds: %u - Microseconds: %u\n", t.seconds, t.microseconds);
|
||||||
|
}
|
||||||
|
|||||||
@ -254,9 +254,8 @@ int vtimer_set_msg(vtimer_t *t, timex_t interval, unsigned int pid, void *ptr){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_DEBUG
|
void vtimer_print(vtimer_t* t) {
|
||||||
static void vtimer_print(vtimer_t* t) {
|
printf("Seconds: %u - Microseconds: %u\n \
|
||||||
printf("Seconds: %lu - Microseconds: %lu\n \
|
|
||||||
action: %p\n \
|
action: %p\n \
|
||||||
action: %p\n \
|
action: %p\n \
|
||||||
pid: %u\n",
|
pid: %u\n",
|
||||||
@ -265,4 +264,3 @@ static void vtimer_print(vtimer_t* t) {
|
|||||||
t->arg,
|
t->arg,
|
||||||
t->pid);
|
t->pid);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user