source: rtems/c/src/lib/libcpu/sh/sh7045/include/sh7_sci.h @ 59e73f37

4.104.114.84.95
Last change on this file since 59e73f37 was 4a238002, checked in by Joel Sherrill <joel.sherrill@…>, on 11/18/99 at 21:22:58

Patch from "John M. Mills" <jmills@…> with subsequent cleanup from
Ralf Corsepius <corsepiu@…> that adds initial Hitachi SH-2
support to RTEMS. Ralf's comments are:

Changes:
------

  1. SH-Port:
  • Many files renamed.
  • CONSOLE_DEVNAME and MHZ defines removed from libcpu.
  • console.c moved to libbsp/sh/shared, build in libbsp/sh/<BSP>/console applying VPATH.
  • CONSOLE_DEVNAME made BSP-specific, replacement is defined in bsp.h
  • MHZ define replaced with HZ (extendent resolution) in custom/*.cfg
  • -DHZ=HZ used in bspstart.c, only
  • Makefile variable HZ used in bsp-dependent directories only.
  1. SH1-Port
  • clock-driver rewritten to provide better resolution for odd CPU frequencies. This driver is only partially tested on hardware, ie. sightly experimental, but I don't expect severe problems with it.
  • Polling SCI-driver added. This driver is experimental and completly untested yet. Therefore it is not yet used for the console (/dev/console is still pointing to /dev/null, cf. gensh1/bsp.h).
  • minor changes to the timer driver
  • SH1 specific delay()/CPU_delay() now is implemented as a function
  1. SH2-Port
  • Merged
  • IMO, the code is still in its infancy. Therefore I have interspersed comments (FIXME) it for items which I think John should look after.
  • sci and console drivers partially rewritten and extended (John, I hope you don't mind).
  • Copyright notices are not yet adapted
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*
2 * Bit values for the serial control registers of the Hitachi SH704X
3 *
4 * From Hitachi tutorials
5 *
6 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
7 *           Bernd Becker (becker@faw.uni-ulm.de)
8 *
9 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
10 *
11 *  This program is distributed in the hope that it will be useful,
12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 *
15 *
16 *  COPYRIGHT (c) 1998.
17 *  On-Line Applications Research Corporation (OAR).
18 *  Copyright assigned to U.S. Government, 1994.
19 *
20 *  The license and distribution terms for this file may be
21 *  found in the file LICENSE in this distribution or at
22 *  http://www.OARcorp.com/rtems/license.html.
23 *
24 *  $Id$
25 */
26
27#ifndef _sh7_sci_h
28#define _sh7_sci_h
29
30#include <rtems/score/iosh7045.h>
31
32/*
33 * Serial mode register bits
34 */
35
36#define SCI_SYNC_MODE               0x80
37#define SCI_SEVEN_BIT_DATA          0x40
38#define SCI_PARITY_ON               0x20
39#define SCI_ODD_PARITY              0x10
40#define SCI_STOP_BITS_2             0x08
41#define SCI_ENABLE_MULTIP           0x04
42#define SCI_PHI_64                  0x03
43#define SCI_PHI_16                  0x02
44#define SCI_PHI_4                   0x01
45#define SCI_PHI_0                   0x00
46
47/*
48 * Serial register offsets, relative to SCI0_SMR or SCI1_SMR
49 */
50
51#define SCI_SMR                 0x00
52#define SCI_BRR                 0x01
53#define SCI_SCR                 0x02
54#define SCI_TDR                 0x03
55#define SCI_SSR                 0x04
56#define SCI_RDR                 0x05
57
58/*
59 * Serial control register bits
60 */
61#define SCI_TIE                 0x80    /* Transmit interrupt enable */
62#define SCI_RIE                 0x40    /* Receive interrupt enable */
63#define SCI_TE                  0x20    /* Transmit enable */
64#define SCI_RE                  0x10    /* Receive enable */
65#define SCI_MPIE                0x08    /* Multiprocessor interrupt enable */
66#define SCI_TEIE                0x04    /* Transmit end interrupt enable */
67#define SCI_CKE1                0x02    /* Clock enable 1 */
68#define SCI_CKE0                0x01    /* Clock enable 0 */
69
70/*
71 * Serial status register bits
72 */
73#define SCI_TDRE                0x80    /* Transmit data register empty */
74#define SCI_RDRF                0x40    /* Receive data register full */
75#define SCI_ORER                0x20    /* Overrun error */
76#define SCI_FER                 0x10    /* Framing error */
77#define SCI_PER                 0x08    /* Parity error */
78#define SCI_TEND                0x04    /* Transmit end */
79#define SCI_MPB                 0x02    /* Multiprocessor bit */
80#define SCI_MPBT                0x01    /* Multiprocessor bit transfer */
81
82/*
83 * INTC Priority Settings
84 */
85
86#define SCI0_IPMSK      0x00F0
87#define SCI0_LOWIP      0x0010
88#define SCI1_IPMSK      0x000F
89#define SCI1_LOWIP      0x0001
90
91#endif /* _sh7_sci_h */
Note: See TracBrowser for help on using the repository browser.