source: rtems/c/src/lib/libbsp/sparc/shared/include/apbuart_termios.h @ 7fd5e89

4.115
Last change on this file since 7fd5e89 was 7fd5e89, checked in by Sebastian Huber <sebastian.huber@…>, on 10/07/14 at 14:28:04

termios: Partially hide rtems_termios_tty

Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler. This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-1998.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  Modified for LEON3 BSP.
6 *  COPYRIGHT (c) 2004.
7 *  Gaisler Research.
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14#ifndef APBUART_TERMIOS_H
15#define APBUART_TERMIOS_H
16
17#include <rtems/termiostypes.h>
18#include <grlib.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24struct apbuart_context {
25  rtems_termios_device_context base;
26  struct apbuart_regs *regs;
27  unsigned int freq_hz;
28  rtems_vector_number irq;
29  volatile int sending;
30  char *buf;
31};
32
33const rtems_termios_device_handler apbuart_handler_interrupt;
34
35const rtems_termios_device_handler apbuart_handler_polled;
36
37/*
38 *  apbuart_outbyte_polled
39 *
40 *  This routine transmits a character using polling.
41 */
42void apbuart_outbyte_polled(
43  struct apbuart_regs *regs,
44  unsigned char ch,
45  int do_cr_on_newline,
46  int wait_sent
47);
48
49/*
50 *  apbuart_inbyte_nonblocking
51 *
52 *  This routine polls for a character.
53 */
54int apbuart_inbyte_nonblocking(struct apbuart_regs *regs);
55
56#ifdef __cplusplus
57}
58#endif /* __cplusplus */
59
60#endif /* APBUART_TERMIOS_H */
Note: See TracBrowser for help on using the repository browser.