diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-07-15 14:04:31 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-07-15 14:04:31 +0000 |
commit | 30a3f76b296c69483e9ba4b3af4807fe3948ecdb (patch) | |
tree | 9c121ae6305c3f699db7be3e948765564cc5e719 /c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c | |
parent | Added scv64 subdirectory. (diff) | |
download | rtems-30a3f76b296c69483e9ba4b3af4807fe3948ecdb.tar.bz2 |
Switched from polling to interrupts and in the process added a conditional
compilation section which used CONSOLE_USE_INTERRUPTS to switch all
ports between interrupt and polled mode.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c b/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c index 2604af75be..bddf03aef8 100644 --- a/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c +++ b/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c @@ -130,10 +130,23 @@ mc68681_baud_t #define MC68681_PORT_CONFIG \ (MC68681_DATA_BAUD_RATE_SET_1|MC68681_XBRG_ENABLED) +/* + * Based on BSP configuration information decide whether to do polling IO + * or interrupt driven IO. + */ + +#if (CONSOLE_USE_INTERRUPTS) +#define MC68681_FUNCTIONS &mc68681_fns +#define Z85C30_FUNCTIONS &z85c30_fns +#else +#define MC68681_FUNCTIONS &mc68681_fns_polled +#define Z85C30_FUNCTIONS &z85c30_fns_polled +#endif + console_tbl Console_Port_Tbl[] = { { "/dev/com0", /* sDeviceName */ - &mc68681_fns_polled, /* pDeviceFns */ + MC68681_FUNCTIONS, /* pDeviceFns */ NULL, /* deviceProbe */ NULL, /* pDeviceFlow */ 16, /* ulMargin */ @@ -151,7 +164,7 @@ console_tbl Console_Port_Tbl[] = { }, { "/dev/com1", /* sDeviceName */ - &mc68681_fns_polled, /* pDeviceFns */ + MC68681_FUNCTIONS, /* pDeviceFns */ NULL, /* deviceProbe */ NULL, /* pDeviceFlow */ 16, /* ulMargin */ @@ -169,7 +182,7 @@ console_tbl Console_Port_Tbl[] = { }, { "/dev/com3", /* sDeviceName */ - &z85c30_fns_polled, /* pDeviceFns */ + Z85C30_FUNCTIONS, /* pDeviceFns */ NULL, /* deviceProbe */ NULL, /* pDeviceFlow */ 16, /* ulMargin */ @@ -187,7 +200,7 @@ console_tbl Console_Port_Tbl[] = { }, { "/dev/com4", /* sDeviceName */ - &z85c30_fns_polled, /* pDeviceFns */ + Z85C30_FUNCTIONS, /* pDeviceFns */ NULL, /* deviceProbe */ NULL, /* pDeviceFlow */ 16, /* ulMargin */ |