diff options
author | Nick Withers <nick.withers@anu.edu.au> | 2014-11-27 17:39:36 +1100 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2014-12-23 22:40:32 -0500 |
commit | 2d5c48691453a05ffb3a264f75e71490166f819a (patch) | |
tree | 349fff13e895c9c30ca9d0ec5b51270681beba0b /c/src/lib/libbsp/powerpc/shared/console | |
parent | pc386: scan all functions of multi-function PCI devices (diff) | |
download | rtems-2d5c48691453a05ffb3a264f75e71490166f819a.tar.bz2 |
Use fixed-width C99 types for PowerPC in_be16() and co.
Also use the const qualifier on the address pointer's target in in_*()
Closes #2128
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/console')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/console/console.inl | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/console/uart.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/console/console.inl b/c/src/lib/libbsp/powerpc/shared/console/console.inl index 1e300ef01a..177444e870 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/console.inl +++ b/c/src/lib/libbsp/powerpc/shared/console/console.inl @@ -6,17 +6,18 @@ */ #include <bsp.h> +#include <stdint.h> #define INL_IN_DECL(name,base) \ static inline unsigned char name(int off) \ { \ - return in_8((unsigned char*)(((unsigned long)base) + off)); \ + return in_8((uint8_t*)(((unsigned long)base) + off)); \ } #define INL_OUT_DECL(name,base) \ static inline void name(int off, unsigned int val) \ { \ - out_8((unsigned char*)(((unsigned long)base) + off), val); \ + out_8((uint8_t*)(((unsigned long)base) + off), val); \ } #ifdef BSP_UART_IOBASE_COM1 diff --git a/c/src/lib/libbsp/powerpc/shared/console/uart.c b/c/src/lib/libbsp/powerpc/shared/console/uart.c index 917fd5bf7c..cd8657cfda 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/uart.c +++ b/c/src/lib/libbsp/powerpc/shared/console/uart.c @@ -5,6 +5,7 @@ * an endorsement by T.sqware of the product in which it is included. */ +#include <stdint.h> #include <stdio.h> #include <bsp.h> #include <bsp/irq.h> @@ -72,13 +73,13 @@ static struct uart_data uart_data[2] = { static inline unsigned char uread(int uart, unsigned int reg) { - return in_8((unsigned char*)(uart_data[uart].ioBase + reg)); + return in_8((uint8_t*)(uart_data[uart].ioBase + reg)); } static inline void uwrite(int uart, int reg, unsigned int val) { - out_8((unsigned char*)(uart_data[uart].ioBase + reg), val); + out_8((uint8_t*)(uart_data[uart].ioBase + reg), val); } |