diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2015-02-06 09:59:13 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-17 01:10:22 +0200 |
commit | 7a03ac296299fea1759432ba4a283bc608d4d449 (patch) | |
tree | a1f4b6824a0c41f391958bae9c1a17ea903ad624 /c/src/lib/libbsp/sparc/shared | |
parent | GR-RASTA-SPW-ROUTER: fix build warnings (diff) | |
download | rtems-7a03ac296299fea1759432ba4a283bc608d4d449.tar.bz2 |
APBUART_CONS: fix build warning
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared')
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/include/apbuart_cons.h | 16 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c | 9 |
2 files changed, 21 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/include/apbuart_cons.h b/c/src/lib/libbsp/sparc/shared/include/apbuart_cons.h new file mode 100644 index 0000000000..7aed0a4576 --- /dev/null +++ b/c/src/lib/libbsp/sparc/shared/include/apbuart_cons.h @@ -0,0 +1,16 @@ +/* APBUART Console driver interface + * + * COPYRIGHT (c) 2015. + * Cobham Gaisler. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#ifndef __APBUART_CONS_H__ +#define __APBUART_CONS_H__ + +void apbuart_cons_register_drv (void); + +#endif diff --git a/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c b/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c index e0fa64e178..8bee2e9f21 100644 --- a/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c +++ b/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c @@ -32,6 +32,7 @@ #include <grlib.h> #include <cons.h> #include <rtems/termiostypes.h> +#include <apbuart_cons.h> /*#define DEBUG 1 */ @@ -450,7 +451,7 @@ struct apbuart_baud { unsigned int num; unsigned int baud; }; -struct apbuart_baud apbuart_baud_table[] = { +static struct apbuart_baud apbuart_baud_table[] = { {B50, 50}, {B75, 75}, {B110, 110}, @@ -473,7 +474,7 @@ struct apbuart_baud apbuart_baud_table[] = { }; #define BAUD_NUM (sizeof(apbuart_baud_table)/sizeof(struct apbuart_baud)) -int apbuart_baud_num2baud(unsigned int num) +static int apbuart_baud_num2baud(unsigned int num) { int i; @@ -483,7 +484,7 @@ int apbuart_baud_num2baud(unsigned int num) return -1; } -struct apbuart_baud *apbuart_baud_find_closest(unsigned int baud) +static struct apbuart_baud *apbuart_baud_find_closest(unsigned int baud) { int i, diff; @@ -511,7 +512,7 @@ int apbuart_get_baud(struct apbuart_priv *uart) return core_clk_hz / ((scaler + 1) * 8); } -struct apbuart_baud *apbuart_get_baud_closest(struct apbuart_priv *uart) +static struct apbuart_baud *apbuart_get_baud_closest(struct apbuart_priv *uart) { return apbuart_baud_find_closest(apbuart_get_baud(uart)); } |