Skip to content

Commit

Permalink
Merge pull request #4791 from gebart/pr/small-cleanups
Browse files Browse the repository at this point in the history
misc: small cleanups
  • Loading branch information
Joakim Nohlgård committed Feb 12, 2016
2 parents 8da37a4 + 686cad8 commit d414f30
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 55 deletions.
30 changes: 0 additions & 30 deletions cpu/lm4f120/periph/uart.c
Expand Up @@ -32,36 +32,6 @@
*/
static uart_isr_ctx_t config[UART_NUMOF];

/**
* The list of UART peripherals.
*/
static const unsigned long g_ulUARTPeriph[3] =
{
SYSCTL_PERIPH_UART0,
SYSCTL_PERIPH_UART1,
SYSCTL_PERIPH_UART2
};

/**
* The list of all possible base address of the console UART
*/
static const unsigned long g_ulUARTBase[3] =
{
UART0_BASE,
UART1_BASE,
UART2_BASE
};

/**
* The list of possible interrupts for the console UART.
*/
static const unsigned long g_ulUARTInt[3] =
{
INT_UART0,
INT_UART1,
INT_UART2
};

static int init_base(uart_t uart, uint32_t baudrate);

/**
Expand Down
2 changes: 2 additions & 0 deletions drivers/kw2xrf/kw2xrf.c
Expand Up @@ -72,6 +72,7 @@ static const uint8_t pow_lt[44] = {
28, 29, 30, 31
};

/* TODO: Implement this
static const int level_lt[29] = {
-35, -34, -32, -31,
-29, -28, -26, -25,
Expand All @@ -82,6 +83,7 @@ static const int level_lt[29] = {
1, 2, 4, 5,
7
};
*/

static gpio_t kw2xrf_gpio_int;

Expand Down
4 changes: 0 additions & 4 deletions drivers/srf08/srf08.c
Expand Up @@ -134,10 +134,6 @@ int srf08_get_distances(srf08_t *dev, uint16_t *range_array, int num_echos, srf0
return -3;
}

if (range_bytes == 0) {
break;
}

else {
uint16_t distance = (range_bytes[0] << 8) | range_bytes[1];
range_array[(register_location - 2) / 2] = distance;
Expand Down
5 changes: 0 additions & 5 deletions sys/net/gnrc/application_layer/zep/gnrc_zep.c
Expand Up @@ -197,11 +197,6 @@ static inline uint16_t *_get_uint16_ptr(void *ptr)
return ptr;
}

static inline uint64_t *_get_uint64_ptr(void *ptr)
{
return ptr;
}

static int _send(gnrc_netdev_t *netdev, gnrc_pktsnip_t *pkt)
{
gnrc_zep_t *dev = (gnrc_zep_t *)netdev;
Expand Down
8 changes: 4 additions & 4 deletions tests/driver_mpu9150/main.c
Expand Up @@ -83,19 +83,19 @@ int main(void)
while (1) {
/* Get accel data in milli g */
mpu9150_read_accel(&dev, &measurement);
printf("Accel data [milli g] - X: %d Y: %d Z: %d\n",
printf("Accel data [milli g] - X: %"PRId16" Y: %"PRId16" Z: %"PRId16"\n",
measurement.x_axis, measurement.y_axis, measurement.z_axis);
/* Get gyro data in dps */
mpu9150_read_gyro(&dev, &measurement);
printf("Gyro data [dps] - X: %d Y: %d Z: %d\n",
printf("Gyro data [dps] - X: %"PRId16" Y: %"PRId16" Z: %"PRId16"\n",
measurement.x_axis, measurement.y_axis, measurement.z_axis);
/* Get compass data in mikro Tesla */
mpu9150_read_compass(&dev, &measurement);
printf("Compass data [mikro T] - X: %d Y: %d Z: %d\n",
printf("Compass data [mikro T] - X: %"PRId16" Y: %"PRId16" Z: %"PRId16"\n",
measurement.x_axis, measurement.y_axis, measurement.z_axis);
/* Get temperature in milli degrees celsius */
mpu9150_read_temperature(&dev, &temperature);
printf("Temperature [milli deg] : %ld\n", temperature);
printf("Temperature [milli deg] : %"PRId32"\n", temperature);
printf("\n+-------------------------------------+\n");

xtimer_usleep(SLEEP);
Expand Down
4 changes: 2 additions & 2 deletions tests/driver_pir/main.c
Expand Up @@ -28,8 +28,8 @@
#include "xtimer.h"
#include "pir.h"

char pir_handler_stack[THREAD_STACKSIZE_MAIN];
pir_t dev;
static char pir_handler_stack[THREAD_STACKSIZE_MAIN];
static pir_t dev;

void* pir_handler(void *arg)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/irq/main.c
Expand Up @@ -23,8 +23,8 @@
#include "xtimer.h"
#include "thread.h"

char busy_stack[THREAD_STACKSIZE_MAIN];
volatile int busy, i, k;
static char busy_stack[THREAD_STACKSIZE_MAIN];
static volatile int busy, i, k;

void *busy_thread(void *arg)
{
Expand Down
8 changes: 4 additions & 4 deletions tests/unittests/tests-cbor/tests-cbor.c
Expand Up @@ -96,12 +96,12 @@ static void my_cbor_print(const cbor_stream_t *stream)
#endif

static unsigned char stream_data[1024];
cbor_stream_t stream = {stream_data, sizeof(stream_data), 0};
static cbor_stream_t stream = {stream_data, sizeof(stream_data), 0};

cbor_stream_t empty_stream = {NULL, 0, 0}; /* stream that is not large enough */
static cbor_stream_t empty_stream = {NULL, 0, 0}; /* stream that is not large enough */

unsigned char invalid_stream_data[] = {0x40}; /* empty string encoded in CBOR */
cbor_stream_t invalid_stream = {invalid_stream_data, sizeof(invalid_stream_data),
static unsigned char invalid_stream_data[] = {0x40}; /* empty string encoded in CBOR */
static cbor_stream_t invalid_stream = {invalid_stream_data, sizeof(invalid_stream_data),
sizeof(invalid_stream_data)
};

Expand Down
8 changes: 4 additions & 4 deletions tests/xtimer_shift_on_compare/main.c
Expand Up @@ -25,10 +25,10 @@
#define ITERATIONS 128
#define MAXSHIFT 8

unsigned min[MAXSHIFT];
unsigned max[MAXSHIFT];
unsigned avg[MAXSHIFT];
unsigned total[MAXSHIFT];
static unsigned min[MAXSHIFT];
static unsigned max[MAXSHIFT];
static unsigned avg[MAXSHIFT];
static unsigned total[MAXSHIFT];

int main(void)
{
Expand Down

0 comments on commit d414f30

Please sign in to comment.