summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/or32/orp/console/console.h
blob: 6e8efb24f8d8f60da540421e1313bec95263c448 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* console.h -- console header file for the Bender board using the
 *              Or1k architecture.
 *
 *  Copyright (C) 2001 Chris Ziomkowski, chris@asics.ws
 *
 *  This file is distributed as part of the RTEMS package from
 *  OAR Corporation, and follows the licensing and distribution
 *  terms as stated for RTEMS.
 *
 *  COPYRIGHT (c) 1989-1999.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 */

#ifndef _CONSOLE_H
#define _CONSOLE_H

typedef enum {
  TERM_LOCAL_ECHO,
  TERM_BIT_RATE,
} ConsoleIOCTLCommand;

typedef struct {
  ConsoleIOCTLCommand command;
  void*                data;
} ConsoleIOCTLRequest;

typedef struct {
  unsigned char RBR;
  unsigned char IER;
  unsigned char IIR;
  unsigned char LCR;
  unsigned char MCR;
  unsigned char LSR;
  unsigned char MSR;
  unsigned char SCR;
} UART_16450_Read;

typedef struct {
  unsigned char THR;
  unsigned char IER;
  unsigned char IIR;
  unsigned char LCR;
  unsigned char MCR;
  unsigned char LSR;
  unsigned char MSR;
  unsigned char SCR;
} UART_16450_Write;

typedef struct {
  unsigned char DLM;
  unsigned char DLL;
  unsigned char IIR;
  unsigned char LCR;
  unsigned char MCR;
  unsigned char LSR;
  unsigned char MSR;
  unsigned char SCR;
} UART_16450_Latch;

typedef union {
  UART_16450_Read   read;
  UART_16450_Write  write;
  UART_16450_Latch  latch;
} UART_16450;

#endif