diff --git a/cpu/lpc2387/include/cpu.h b/cpu/lpc2387/include/cpu.h index f197da35bb..fc8f179c4f 100644 --- a/cpu/lpc2387/include/cpu.h +++ b/cpu/lpc2387/include/cpu.h @@ -50,7 +50,7 @@ static inline void cpu_print_last_instruction(void) { register uint32_t *lr_ptr; __asm__ __volatile__("mov %0, lr" : "=r"(lr_ptr)); - printf("%p\n", lr_ptr); + printf("%p\n", (void*) lr_ptr); } #ifdef __cplusplus diff --git a/cpu/lpc2387/periph/gpio.c b/cpu/lpc2387/periph/gpio.c index 6576fae7ce..028f4769f6 100644 --- a/cpu/lpc2387/periph/gpio.c +++ b/cpu/lpc2387/periph/gpio.c @@ -69,6 +69,7 @@ static int _isr_map_entry(gpio_t pin) { int gpio_init(gpio_t pin, gpio_dir_t dir, gpio_pp_t pullup) { + (void) dir; unsigned _pin = pin & 31; unsigned port = pin >> 5; @@ -88,7 +89,9 @@ int gpio_init(gpio_t pin, gpio_dir_t dir, gpio_pp_t pullup) return 0; } -int gpio_init_mux(unsigned pin, unsigned mux) { +int gpio_init_mux(unsigned pin, unsigned mux) +{ + (void) mux; unsigned _pin = pin & 31; PINSEL[pin>>4] &= ~(0x1 << (_pin*2)); return 0; diff --git a/cpu/lpc2387/periph/rtc.c b/cpu/lpc2387/periph/rtc.c index 7eca711b31..d239676818 100644 --- a/cpu/lpc2387/periph/rtc.c +++ b/cpu/lpc2387/periph/rtc.c @@ -97,6 +97,7 @@ int rtc_get_time(struct tm *localt) int rtc_set_alarm(struct tm *localt, rtc_alarm_cb_t cb, void *arg) { + (void) arg; if (localt != NULL) { RTC_ALSEC = localt->tm_sec; RTC_ALMIN = localt->tm_min; diff --git a/cpu/lpc2387/periph/spi.c b/cpu/lpc2387/periph/spi.c index d7dae92eff..4967a2a65a 100644 --- a/cpu/lpc2387/periph/spi.c +++ b/cpu/lpc2387/periph/spi.c @@ -50,6 +50,7 @@ static mutex_t locks[] = { int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed) { + (void ) conf; if (dev) { return -1; } @@ -170,6 +171,7 @@ int spi_release(spi_t dev) int spi_transfer_byte(spi_t dev, char out, char *in) { + (void) dev; while (!SPI_TX_EMPTY); SSP0DR = out; while (SPI_BUSY); @@ -186,10 +188,13 @@ int spi_transfer_byte(spi_t dev, char out, char *in) void spi_poweron(spi_t dev) { + (void) dev; } void spi_poweroff(spi_t dev) { + (void) dev; + (void) dev; } int spi_conf_pins(spi_t dev) diff --git a/cpu/lpc2387/periph/timer.c b/cpu/lpc2387/periph/timer.c index cdf469cd89..c8cf22c33b 100644 --- a/cpu/lpc2387/periph/timer.c +++ b/cpu/lpc2387/periph/timer.c @@ -140,7 +140,7 @@ int timer_set(tim_t tim, int channel, unsigned int timeout) int timer_set_absolute(tim_t tim, int channel, unsigned int value) { - if (tim >= TIMER_NUMOF || channel >= TIMER_CHAN_NUMOF) { + if (((unsigned) tim >= TIMER_NUMOF) || ((unsigned) channel >= TIMER_CHAN_NUMOF)) { return -1; } @@ -152,7 +152,7 @@ int timer_set_absolute(tim_t tim, int channel, unsigned int value) int timer_clear(tim_t tim, int channel) { - if (tim >= TIMER_NUMOF || channel >= TIMER_CHAN_NUMOF) { + if (((unsigned) tim >= TIMER_NUMOF) || ((unsigned) channel >= TIMER_CHAN_NUMOF)) { return -1; } get_dev(tim)->MCR &= ~(1 << (channel * 3)); @@ -176,17 +176,19 @@ void timer_stop(tim_t tim) void timer_irq_enable(tim_t tim) { + (void) tim; /* TODO */ } void timer_irq_disable(tim_t tim) { + (void) tim; /* TODO */ } static inline void isr_handler(lpc23xx_timer_t *dev, int tim_num) { - for (int i = 0; i < TIMER_CHAN_NUMOF; i++) { + for (unsigned i = 0; i < TIMER_CHAN_NUMOF; i++) { if (dev->IR & (1 << i)) { dev->IR |= (1 << i); dev->MCR &= ~(1 << (i * 3)); diff --git a/cpu/lpc2387/periph/uart.c b/cpu/lpc2387/periph/uart.c index 7c95598dfe..a0637816a5 100644 --- a/cpu/lpc2387/periph/uart.c +++ b/cpu/lpc2387/periph/uart.c @@ -37,6 +37,7 @@ void UART0_IRQHandler(void) __attribute__((interrupt("IRQ"))); int uart_init(uart_t dev, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg) { + (void) baudrate; /* for now, we only support one UART device and only the RX interrupt */ if (dev != 0) { return -1; @@ -71,6 +72,7 @@ int uart_init(uart_t dev, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg) void uart_write(uart_t uart, const uint8_t *data, size_t len) { + (void) uart; for (size_t i = 0; i < len; i++) { while (!(U0LSR & BIT5)); U0THR = data[i];