Changeset e34fe38 in rtems


Ignore:
Timestamp:
Oct 17, 2016, 12:15:34 PM (3 years ago)
Author:
Alexander Krutwig <alexander.krutwig@…>
Branches:
master
Children:
9edc7301
Parents:
c3764ce
git-author:
Alexander Krutwig <alexander.krutwig@…> (10/17/16 12:15:34)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/16/16 08:04:58)
Message:

termios: Add TERMIOS_IRQ_SERVER_DRIVEN

Add a new interrupt server driven Termios mode (TERMIOS_IRQ_DRIVEN).
This mode is identical to the interrupt driven mode except that a mutex
is used for device level locking. The intended use case for this mode
are device drivers that use the interrupt server, e.g. SPI or I2C
connected devices.

Update #2839.

Location:
cpukit/libcsupport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/rtems/termiostypes.h

    rc3764ce re34fe38  
    5858  TERMIOS_POLLED,
    5959  TERMIOS_IRQ_DRIVEN,
    60   TERMIOS_TASK_DRIVEN
     60  TERMIOS_TASK_DRIVEN,
     61  TERMIOS_IRQ_SERVER_DRIVEN
    6162} rtems_termios_device_mode;
    6263
     
    7576    rtems_interrupt_lock interrupt;
    7677
    77     /* Used for TERMIOS_TASK_DRIVEN */
     78    /* Used for TERMIOS_IRQ_SERVER_DRIVEN or TERMIOS_TASK_DRIVEN */
    7879    rtems_id mutex;
    7980  } lock;
     
    162163   * @brief Polled read.
    163164   *
    164    * In case mode is TERMIOS_IRQ_DRIVEN or TERMIOS_TASK_DRIVEN, then data is
    165    * received via rtems_termios_enqueue_raw_characters().
     165   * In case mode is TERMIOS_IRQ_DRIVEN, TERMIOS_IRQ_SERVER_DRIVEN or
     166   * TERMIOS_TASK_DRIVEN, then data is received via
     167   * rtems_termios_enqueue_raw_characters().
    166168   *
    167169   * @param[in] context The Termios device context.
  • cpukit/libcsupport/src/termios.c

    rc3764ce re34fe38  
    276276needDeviceMutex (rtems_termios_tty *tty)
    277277{
    278   return tty->handler.mode == TERMIOS_TASK_DRIVEN;
     278  return tty->handler.mode == TERMIOS_IRQ_SERVER_DRIVEN
     279    || tty->handler.mode == TERMIOS_TASK_DRIVEN;
    279280}
    280281
Note: See TracChangeset for help on using the changeset viewer.