forked from Imagelibrary/rtems
libchip/serial: Make NS16550 handler public
This allows derived drivers to use these functions.
This commit is contained in:
@@ -92,6 +92,7 @@ libi2cio_a_SOURCES = i2c/i2c-ds1621.h \
|
||||
# serial
|
||||
include_libchip_HEADERS += serial/mc68681.h serial/ns16550.h serial/z85c30.h \
|
||||
serial/serial.h serial/sersupp.h
|
||||
include_libchip_HEADERS += serial/ns16550_p.h
|
||||
|
||||
noinst_LIBRARIES += libserialio.a
|
||||
libserialio_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
@@ -99,7 +100,7 @@ libserialio_a_SOURCES = serial/mc68681.c serial/mc68681_baud.c \
|
||||
serial/mc68681_reg.c serial/mc68681_reg2.c serial/mc68681_reg4.c \
|
||||
serial/mc68681_reg8.c serial/ns16550.c serial/z85c30.c \
|
||||
serial/z85c30_reg.c serial/serprobe.c serial/mc68681_p.h \
|
||||
serial/ns16550_p.h serial/z85c30_p.h
|
||||
serial/z85c30_p.h
|
||||
|
||||
EXTRA_DIST += serial/README.mc68681 serial/README.ns16550 \
|
||||
serial/README.xr88681 serial/README.z85c30 serial/STATUS
|
||||
|
||||
@@ -166,6 +166,10 @@ $(PROJECT_INCLUDE)/libchip/sersupp.h: serial/sersupp.h $(PROJECT_INCLUDE)/libchi
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/sersupp.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/sersupp.h
|
||||
|
||||
$(PROJECT_INCLUDE)/libchip/ns16550_p.h: serial/ns16550_p.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/ns16550_p.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/ns16550_p.h
|
||||
|
||||
if HAS_MP
|
||||
$(PROJECT_INCLUDE)/shm_driver.h: shmdr/shm_driver.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/shm_driver.h
|
||||
|
||||
@@ -134,7 +134,7 @@ static uint32_t NS16550_GetBaudDivisor(const console_tbl *c, uint32_t baud)
|
||||
* ns16550_init
|
||||
*/
|
||||
|
||||
NS16550_STATIC void ns16550_init(int minor)
|
||||
void ns16550_init(int minor)
|
||||
{
|
||||
uintptr_t pNS16550;
|
||||
uint8_t ucDataByte;
|
||||
@@ -205,7 +205,7 @@ NS16550_STATIC void ns16550_init(int minor)
|
||||
* ns16550_open
|
||||
*/
|
||||
|
||||
NS16550_STATIC int ns16550_open(
|
||||
int ns16550_open(
|
||||
int major,
|
||||
int minor,
|
||||
void *arg
|
||||
@@ -238,7 +238,7 @@ NS16550_STATIC int ns16550_open(
|
||||
* ns16550_close
|
||||
*/
|
||||
|
||||
NS16550_STATIC int ns16550_close(
|
||||
int ns16550_close(
|
||||
int major,
|
||||
int minor,
|
||||
void * arg
|
||||
@@ -306,7 +306,7 @@ void ns16550_outch_polled(console_tbl *c, char out)
|
||||
set( port, NS16550_INTERRUPT_ENABLE, interrupt_mask);
|
||||
}
|
||||
|
||||
NS16550_STATIC void ns16550_write_polled(int minor, char out)
|
||||
void ns16550_write_polled(int minor, char out)
|
||||
{
|
||||
console_tbl *c = Console_Port_Tbl [minor];
|
||||
|
||||
@@ -433,7 +433,7 @@ NS16550_STATIC int ns16550_negate_DTR(int minor)
|
||||
* port settings.
|
||||
*/
|
||||
|
||||
NS16550_STATIC int ns16550_set_attributes(
|
||||
int ns16550_set_attributes(
|
||||
int minor,
|
||||
const struct termios *t
|
||||
)
|
||||
@@ -578,7 +578,7 @@ NS16550_STATIC void ns16550_process( int minor)
|
||||
*
|
||||
* Returns always zero.
|
||||
*/
|
||||
NS16550_STATIC ssize_t ns16550_write_support_int(
|
||||
ssize_t ns16550_write_support_int(
|
||||
int minor,
|
||||
const char *buf,
|
||||
size_t len
|
||||
@@ -625,7 +625,7 @@ NS16550_STATIC void ns16550_enable_interrupts(
|
||||
}
|
||||
|
||||
#if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
|
||||
NS16550_STATIC rtems_isr ns16550_isr(void *arg)
|
||||
void ns16550_isr(void *arg)
|
||||
{
|
||||
int minor = (int) arg;
|
||||
|
||||
@@ -736,7 +736,7 @@ NS16550_STATIC void ns16550_cleanup_interrupts(int minor)
|
||||
*
|
||||
*/
|
||||
|
||||
NS16550_STATIC ssize_t ns16550_write_support_polled(
|
||||
ssize_t ns16550_write_support_polled(
|
||||
int minor,
|
||||
const char *buf,
|
||||
size_t len
|
||||
@@ -789,7 +789,7 @@ int ns16550_inch_polled(
|
||||
*
|
||||
* Console Termios polling input entry point.
|
||||
*/
|
||||
NS16550_STATIC int ns16550_inbyte_nonblocking_polled(int minor)
|
||||
int ns16550_inbyte_nonblocking_polled(int minor)
|
||||
{
|
||||
console_tbl *c = Console_Port_Tbl [minor];
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#ifndef _NS16550_H_
|
||||
#define _NS16550_H_
|
||||
|
||||
#include <libchip/serial.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#ifndef _NS16550_P_H_
|
||||
#define _NS16550_P_H_
|
||||
|
||||
#include <libchip/serial.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -138,21 +140,21 @@ typedef struct {
|
||||
* Driver functions
|
||||
*/
|
||||
|
||||
NS16550_STATIC void ns16550_init(int minor);
|
||||
void ns16550_init(int minor);
|
||||
|
||||
NS16550_STATIC int ns16550_open(
|
||||
int ns16550_open(
|
||||
int major,
|
||||
int minor,
|
||||
void * arg
|
||||
);
|
||||
|
||||
NS16550_STATIC int ns16550_close(
|
||||
int ns16550_close(
|
||||
int major,
|
||||
int minor,
|
||||
void * arg
|
||||
);
|
||||
|
||||
NS16550_STATIC void ns16550_write_polled(
|
||||
void ns16550_write_polled(
|
||||
int minor,
|
||||
char cChar
|
||||
);
|
||||
@@ -177,19 +179,19 @@ NS16550_STATIC void ns16550_initialize_interrupts(int minor);
|
||||
|
||||
NS16550_STATIC void ns16550_cleanup_interrupts(int minor);
|
||||
|
||||
NS16550_STATIC ssize_t ns16550_write_support_int(
|
||||
ssize_t ns16550_write_support_int(
|
||||
int minor,
|
||||
const char *buf,
|
||||
size_t len
|
||||
);
|
||||
|
||||
NS16550_STATIC ssize_t ns16550_write_support_polled(
|
||||
ssize_t ns16550_write_support_polled(
|
||||
int minor,
|
||||
const char *buf,
|
||||
size_t len
|
||||
);
|
||||
|
||||
NS16550_STATIC int ns16550_inbyte_nonblocking_polled(
|
||||
int ns16550_inbyte_nonblocking_polled(
|
||||
int minor
|
||||
);
|
||||
|
||||
@@ -198,11 +200,13 @@ NS16550_STATIC void ns16550_enable_interrupts(
|
||||
int mask
|
||||
);
|
||||
|
||||
NS16550_STATIC int ns16550_set_attributes(
|
||||
int ns16550_set_attributes(
|
||||
int minor,
|
||||
const struct termios *t
|
||||
);
|
||||
|
||||
void ns16550_isr(void *arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user