1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #4791 from gebart/pr/small-cleanups

misc: small cleanups
This commit is contained in:
Joakim Nohlgård 2016-02-12 09:14:06 +01:00
commit d414f30b22
9 changed files with 18 additions and 55 deletions

View File

@ -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);
/**

View File

@ -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,
@ -82,6 +83,7 @@ static const int level_lt[29] = {
1, 2, 4, 5,
7
};
*/
static gpio_t kw2xrf_gpio_int;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
};

View File

@ -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)
{