Moved set and get Register and Data type defininitions to serial.h.

Cleaned up spacing.
This commit is contained in:
Joel Sherrill
1998-06-22 11:07:51 +00:00
parent 58b1e95f18
commit 4cd4c5a092
8 changed files with 10 additions and 40 deletions

View File

@@ -69,20 +69,13 @@ console_fns ns16550_fns_polled =
extern void set_vector( rtems_isr_entry, rtems_vector_number, int ); extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
/*
* Types for get and set register routines
*/
typedef unsigned8 (*getRegister_f)(unsigned32 port, unsigned8 register);
typedef void (*setRegister_f)(
unsigned32 port, unsigned8 reg, unsigned8 value);
/* /*
* Console Device Driver Entry Points * Console Device Driver Entry Points
*/ */
static boolean ns16550_probe(int minor) static boolean ns16550_probe(int minor)
{ {
/* /*
* If the configuration dependant probe has located the device then * If the configuration dependent probe has located the device then
* assume it is there * assume it is there
*/ */
return(TRUE); return(TRUE);

View File

@@ -24,12 +24,14 @@ extern "C" {
/* /*
* Driver function table * Driver function table
*/ */
extern console_fns ns16550_fns; extern console_fns ns16550_fns;
extern console_fns ns16550_fns_polled; extern console_fns ns16550_fns_polled;
/* /*
* Flow control function tables * Flow control function tables
*/ */
extern console_flow ns16550_flow_RTSCTS; extern console_flow ns16550_flow_RTSCTS;
extern console_flow ns16550_flow_DTRCTS; extern console_flow ns16550_flow_DTRCTS;

View File

@@ -37,7 +37,6 @@ typedef volatile struct _SP_READ_REGISTERS {
unsigned char ScratchPad; unsigned char ScratchPad;
} SP_READ_REGISTERS, *PSP_READ_REGISTERS; } SP_READ_REGISTERS, *PSP_READ_REGISTERS;
#define NS16550_RECEIVE_BUFFER 0 #define NS16550_RECEIVE_BUFFER 0
#define NS16550_INTERRUPT_ENABLE 1 #define NS16550_INTERRUPT_ENABLE 1
#define NS16550_INTERRUPT_ID 2 #define NS16550_INTERRUPT_ID 2

View File

@@ -84,15 +84,6 @@ console_fns z85c30_fns_polled =
extern void set_vector( rtems_isr_entry, rtems_vector_number, int ); extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
/*
* Types for get and set register routines
*/
typedef unsigned8 (*getRegister_f)(unsigned32 port, unsigned8 register);
typedef void (*setRegister_f)(
unsigned32 port, unsigned8 reg, unsigned8 value);
typedef unsigned8 (*getData_f)(unsigned32 port);
typedef void (*setData_f)(unsigned32 port, unsigned8 value);
/* /*
@@ -299,7 +290,7 @@ static void z85c30_write_polled(
static boolean z85c30_probe(int minor) static boolean z85c30_probe(int minor)
{ {
/* /*
* If the configuration dependant probe has located the device then * If the configuration dependent probe has located the device then
* assume it is there * assume it is there
*/ */
@@ -507,7 +498,7 @@ static void z85c30_process(
setReg = Console_Port_Tbl[minor].setRegister; setReg = Console_Port_Tbl[minor].setRegister;
getReg = Console_Port_Tbl[minor].getRegister; getReg = Console_Port_Tbl[minor].getRegister;
getData = Console_Port_Tbl[minor].getData; getData = Console_Port_Tbl[minor].getData;
getData = Console_Port_Tbl[minor].getData; setData = Console_Port_Tbl[minor].setData;
/* /*
* Deal with any received characters * Deal with any received characters

View File

@@ -69,20 +69,13 @@ console_fns ns16550_fns_polled =
extern void set_vector( rtems_isr_entry, rtems_vector_number, int ); extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
/*
* Types for get and set register routines
*/
typedef unsigned8 (*getRegister_f)(unsigned32 port, unsigned8 register);
typedef void (*setRegister_f)(
unsigned32 port, unsigned8 reg, unsigned8 value);
/* /*
* Console Device Driver Entry Points * Console Device Driver Entry Points
*/ */
static boolean ns16550_probe(int minor) static boolean ns16550_probe(int minor)
{ {
/* /*
* If the configuration dependant probe has located the device then * If the configuration dependent probe has located the device then
* assume it is there * assume it is there
*/ */
return(TRUE); return(TRUE);

View File

@@ -24,12 +24,14 @@ extern "C" {
/* /*
* Driver function table * Driver function table
*/ */
extern console_fns ns16550_fns; extern console_fns ns16550_fns;
extern console_fns ns16550_fns_polled; extern console_fns ns16550_fns_polled;
/* /*
* Flow control function tables * Flow control function tables
*/ */
extern console_flow ns16550_flow_RTSCTS; extern console_flow ns16550_flow_RTSCTS;
extern console_flow ns16550_flow_DTRCTS; extern console_flow ns16550_flow_DTRCTS;

View File

@@ -37,7 +37,6 @@ typedef volatile struct _SP_READ_REGISTERS {
unsigned char ScratchPad; unsigned char ScratchPad;
} SP_READ_REGISTERS, *PSP_READ_REGISTERS; } SP_READ_REGISTERS, *PSP_READ_REGISTERS;
#define NS16550_RECEIVE_BUFFER 0 #define NS16550_RECEIVE_BUFFER 0
#define NS16550_INTERRUPT_ENABLE 1 #define NS16550_INTERRUPT_ENABLE 1
#define NS16550_INTERRUPT_ID 2 #define NS16550_INTERRUPT_ID 2

View File

@@ -84,15 +84,6 @@ console_fns z85c30_fns_polled =
extern void set_vector( rtems_isr_entry, rtems_vector_number, int ); extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
/*
* Types for get and set register routines
*/
typedef unsigned8 (*getRegister_f)(unsigned32 port, unsigned8 register);
typedef void (*setRegister_f)(
unsigned32 port, unsigned8 reg, unsigned8 value);
typedef unsigned8 (*getData_f)(unsigned32 port);
typedef void (*setData_f)(unsigned32 port, unsigned8 value);
/* /*
@@ -299,7 +290,7 @@ static void z85c30_write_polled(
static boolean z85c30_probe(int minor) static boolean z85c30_probe(int minor)
{ {
/* /*
* If the configuration dependant probe has located the device then * If the configuration dependent probe has located the device then
* assume it is there * assume it is there
*/ */
@@ -507,7 +498,7 @@ static void z85c30_process(
setReg = Console_Port_Tbl[minor].setRegister; setReg = Console_Port_Tbl[minor].setRegister;
getReg = Console_Port_Tbl[minor].getRegister; getReg = Console_Port_Tbl[minor].getRegister;
getData = Console_Port_Tbl[minor].getData; getData = Console_Port_Tbl[minor].getData;
getData = Console_Port_Tbl[minor].getData; setData = Console_Port_Tbl[minor].setData;
/* /*
* Deal with any received characters * Deal with any received characters