Changeset c2a4b8bf in rtems


Ignore:
Timestamp:
Jul 19, 2016, 7:42:26 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
a48c052
Parents:
8d785f7
Message:

bsps/powerpc: Fix shared console driver

The Termios modes are now an emum. Do not use them in #if expressions.

Close #2762.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/console/console.c

    r8d785f7 rc2a4b8bf  
    2323#include <stdlib.h>
    2424#include <assert.h>
    25 #include <stdlib.h>
     25#include <inttypes.h>
    2626
    2727#include <bsp.h>
     
    5151 * small changes)...
    5252 */
    53 #ifndef TERMIOS_OUTPUT_MODE
    54   #if 1
    55     #define TERMIOS_OUTPUT_MODE TERMIOS_IRQ_DRIVEN
    56   #else
    57     #define TERMIOS_OUTPUT_MODE TERMIOS_TASK_DRIVEN
    58   #endif
    59 #endif
    60 
    61 #if ! defined(USE_POLLED_IO) && (TERMIOS_OUTPUT_MODE == TERMIOS_POLLED)
    62   #define USE_POLLED_IO
     53#if defined(USE_POLLED_IO)
     54  #define TERMIOS_OUTPUT_MODE TERMIOS_POLLED
     55#elif defined(USE_TASK_DRIVEN_IO)
     56  #define TERMIOS_OUTPUT_MODE TERMIOS_TASK_DRIVEN
     57#else
     58  #define TERMIOS_OUTPUT_MODE TERMIOS_IRQ_DRIVEN
    6359#endif
    6460
     
    134130    status = rtems_io_register_name ((nm=ttyS[minor].name), major, minor);
    135131    if ( RTEMS_SUCCESSFUL==status && BSPConsolePort == minor) {
    136       printk("Registering /dev/console as minor %d (==%s)\n",
     132      printk("Registering /dev/console as minor %" PRIu32 " (==%s)\n",
    137133              minor,
    138134              ttyS[minor].name);
     
    213209     console_first_open,                /* firstOpen */
    214210     console_last_close,                /* lastClose */
    215 #if ( TERMIOS_OUTPUT_MODE == TERMIOS_TASK_DRIVEN )
     211#ifdef USE_TASK_DRIVEN_IO
    216212     BSP_uart_termios_read_com,         /* pollRead */
    217213#else
Note: See TracChangeset for help on using the changeset viewer.