From 337a1869092779be0afca381dba674d3de4d7c9b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 21 Feb 2018 12:40:18 +0100 Subject: Add a simple task console driver Close #3320. --- cpukit/include/rtems/confdefs.h | 22 +++++++++++++++++++--- cpukit/include/rtems/console.h | 13 ++++++++++--- 2 files changed, 29 insertions(+), 6 deletions(-) (limited to 'cpukit/include/rtems') diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index be937ab6c0..04b9708aca 100755 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -1529,9 +1529,13 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #define NULL_DRIVER_TABLE_ENTRY \ { NULL, NULL, NULL, NULL, NULL, NULL } -#if defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ - defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) -#error "CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER and CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER are mutually exclusive" +#if (defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ + defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER)) || \ + (defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ + defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)) || \ + (defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) && \ + defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)) +#error "CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER, CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER, and CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER are mutually exclusive" #endif #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER @@ -1550,6 +1554,18 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #endif #endif +#ifdef CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER + #include + + #ifdef CONFIGURE_INIT + RTEMS_SYSINIT_ITEM( + _Console_simple_task_Initialize, + RTEMS_SYSINIT_DEVICE_DRIVERS, + RTEMS_SYSINIT_ORDER_SECOND + ); + #endif +#endif + #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #include #endif diff --git a/cpukit/include/rtems/console.h b/cpukit/include/rtems/console.h index f9a7de186c..522e6fef41 100644 --- a/cpukit/include/rtems/console.h +++ b/cpukit/include/rtems/console.h @@ -150,12 +150,19 @@ rtems_device_driver console_control( /** * @brief Initializes a simple console device. * - * This device writes via rtems_putc() and reads via getchark(). The Termios - * framework is not used. There is no support to change device settings, e.g. - * baud, stop bits, parity, etc. + * See CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER documentation in the + * "RTEMS Classic API Guide". */ void _Console_simple_Initialize( void ); +/** + * @brief Initializes a simple task console device. + * + * See CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER documentation in + * the "RTEMS Classic API Guide". + */ +void _Console_simple_task_Initialize( void ); + #ifdef __cplusplus } #endif -- cgit v1.2.3