Changeset 7b24946 in rtems


Ignore:
Timestamp:
Jul 19, 2016, 7:42:26 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11
Children:
25c5583f
Parents:
dc0f537b
git-author:
Sebastian Huber <sebastian.huber@…> (07/19/16 07:42:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/19/16 07:44:16)
Message:

bsps/powerpc: Fix shared console driver

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

Update #2762.

File:
1 edited

Legend:

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

    rdc0f537b r7b24946  
    2323#include <stdlib.h>
    2424#include <assert.h>
    25 #include <stdlib.h>
     25#include <inttypes.h>
    2626
    2727#include <bsp.h>
     
    5050 * small changes)...
    5151 */
    52 #ifndef TERMIOS_OUTPUT_MODE
    53   #if 1
    54     #define TERMIOS_OUTPUT_MODE TERMIOS_IRQ_DRIVEN
    55   #else
    56     #define TERMIOS_OUTPUT_MODE TERMIOS_TASK_DRIVEN
    57   #endif
    58 #endif
    59 
    60 #if ! defined(USE_POLLED_IO) && (TERMIOS_OUTPUT_MODE == TERMIOS_POLLED)
    61   #define USE_POLLED_IO
     52#if defined(USE_POLLED_IO)
     53  #define TERMIOS_OUTPUT_MODE TERMIOS_POLLED
     54#elif defined(USE_TASK_DRIVEN_IO)
     55  #define TERMIOS_OUTPUT_MODE TERMIOS_TASK_DRIVEN
     56#else
     57  #define TERMIOS_OUTPUT_MODE TERMIOS_IRQ_DRIVEN
    6258#endif
    6359
     
    133129    status = rtems_io_register_name ((nm=ttyS[minor].name), major, minor);
    134130    if ( RTEMS_SUCCESSFUL==status && BSPConsolePort == minor) {
    135       printk("Registering /dev/console as minor %d (==%s)\n",
     131      printk("Registering /dev/console as minor %" PRIu32 " (==%s)\n",
    136132              minor,
    137133              ttyS[minor].name);
     
    212208     console_first_open,                /* firstOpen */
    213209     console_last_close,                /* lastClose */
    214 #if ( TERMIOS_OUTPUT_MODE == TERMIOS_TASK_DRIVEN )
     210#ifdef USE_TASK_DRIVEN_IO
    215211     BSP_uart_termios_read_com,         /* pollRead */
    216212#else
Note: See TracChangeset for help on using the changeset viewer.