Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LudwigKnuepfer authored and authmillenon committed Jul 22, 2013
1 parent f7cf0fd commit 1a3c7ca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 6 additions & 1 deletion cpu/native/cc110x_ng/cc1100-sim.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion cpu/native/cc110x_ng/cc110x_ng_cpu.c
Expand Up @@ -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();
}
}
Expand Down
2 changes: 1 addition & 1 deletion cpu/native/include/tap.h
Expand Up @@ -3,7 +3,7 @@

#include <net/ethernet.h>

#define BUFFER_LENGTH 2048
#define BUFFER_LENGTH 255

/**
* create and/or open tap device "name"
Expand Down
6 changes: 4 additions & 2 deletions cpu/native/tap.c
Expand Up @@ -20,6 +20,8 @@
#include <linux/if_ether.h>
#endif

#include "debug.h"

#include "cpu-conf.h"
#include "tap.h"
#include "cc1100sim.h"
Expand All @@ -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) {;
Expand Down

0 comments on commit 1a3c7ca

Please sign in to comment.