diff --git a/cpu/native/cc110x_ng/cc1100-sim.c b/cpu/native/cc110x_ng/cc1100-sim.c index 69ee04798910..aec3ef7ca48c 100644 --- a/cpu/native/cc110x_ng/cc1100-sim.c +++ b/cpu/native/cc110x_ng/cc1100-sim.c @@ -57,11 +57,13 @@ #define MASK_CHIP_RDYn 0x80 #define MASK_FIFO_BYTES_AVAILABLE 0x0F +#if 0 +static uint8_t internal_state; /* according to table 17 */ static uint8_t _native_cc1100_spi; /* the pins */ /* one byte goes in, one byte goes out */ static uint8_t _native_cc1100_serial_io; +#endif -static uint8_t internal_state; /* according to table 17 */ uint8_t addr; /* as sent in header */ uint8_t _native_cc110x_state; @@ -350,6 +352,9 @@ uint8_t read_single(uint8_t c) uint8_t read_burst(uint8_t c) { DEBUG(" read_burst: "); + if (c != 0xFF) { + warnx("read_burst: unexpected value"); + } if (addr <= 0x2E) { DEBUG("read configuration_registers\n"); diff --git a/cpu/native/cc110x_ng/cc110x_ng_cpu.c b/cpu/native/cc110x_ng/cc110x_ng_cpu.c index 36be7675bc49..f376019b69ba 100644 --- a/cpu/native/cc110x_ng/cc110x_ng_cpu.c +++ b/cpu/native/cc110x_ng/cc110x_ng_cpu.c @@ -49,7 +49,7 @@ void _native_handle_cc110xng_input(void) memcpy(rx_fifo, buf+ETHER_HDR_LEN+1, nread); status_registers[CC1100_RXBYTES - 0x30] = nread; rx_fifo_idx = 0; - printf("_native_handle_cc110xng_input: got %d bytes payload\n", nread); + DEBUG("_native_handle_cc110xng_input: got %d bytes payload\n", nread); cc110x_gdo2_irq(); } } diff --git a/cpu/native/include/tap.h b/cpu/native/include/tap.h index ce172b93bd17..6671349e4140 100644 --- a/cpu/native/include/tap.h +++ b/cpu/native/include/tap.h @@ -3,7 +3,7 @@ #include -#define BUFFER_LENGTH 2048 +#define BUFFER_LENGTH 255 /** * create and/or open tap device "name" diff --git a/cpu/native/tap.c b/cpu/native/tap.c index 0c70e6321a07..daf5fe3fca22 100644 --- a/cpu/native/tap.c +++ b/cpu/native/tap.c @@ -20,6 +20,8 @@ #include #endif +#include "debug.h" + #include "cpu-conf.h" #include "tap.h" #include "cc1100sim.h" @@ -39,9 +41,9 @@ int send_buf(void) to_send += 1; if ((ETHER_HDR_LEN + to_send) < ETHERMIN) { - printf("padding data! (%d ->", to_send); + DEBUG("padding data! (%d ->", to_send); to_send = ETHERMIN - ETHER_HDR_LEN; - printf("%d)\n", to_send); + DEBUG("%d)\n", to_send); } if ((nsent = write(_native_tap_fd, buf, to_send + ETHER_HDR_LEN)) == -1) {;