APBUART_CONS: fix build warning

This commit is contained in:
Daniel Hellstrom
2015-02-06 09:59:13 +01:00
parent d77b16d75b
commit 7a03ac2962
5 changed files with 27 additions and 4 deletions

View File

@@ -77,6 +77,7 @@ EXTRA_DIST += shared/include/grspw_router.h
EXTRA_DIST += shared/uart/cons.c
EXTRA_DIST += shared/uart/apbuart_cons.c
EXTRA_DIST += shared/include/cons.h
EXTRA_DIST += shared/include/apbuart_cons.h
EXTRA_DIST += shared/uart/apbuart.c
EXTRA_DIST += shared/include/apbuart.h

View File

@@ -84,6 +84,7 @@ libbsp_a_SOURCES += console/console.c
libbsp_a_SOURCES += ../../sparc/shared/uart/cons.c
libbsp_a_SOURCES += ../../sparc/shared/uart/apbuart_cons.c
include_HEADERS += ../../sparc/shared/include/cons.h
include_HEADERS += ../../sparc/shared/include/apbuart_cons.h
# debugio
libbsp_a_SOURCES += console/printk_support.c

View File

@@ -117,6 +117,10 @@ $(PROJECT_INCLUDE)/cons.h: ../../sparc/shared/include/cons.h $(PROJECT_INCLUDE)/
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/cons.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/cons.h
$(PROJECT_INCLUDE)/apbuart_cons.h: ../../sparc/shared/include/apbuart_cons.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/apbuart_cons.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/apbuart_cons.h
$(PROJECT_INCLUDE)/genirq.h: ../../sparc/shared/include/genirq.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/genirq.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/genirq.h

View File

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

View File

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