source: rtems/c/src/lib/libcpu/sh/sh7045/include/io_types.h @ c8f3e82

Last change on this file since c8f3e82 was 8b91282, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 21, 1999 at 2:27:52 PM

Patch rtems-rc-19991203-5.diff from Ralf Corsepius <corsepiu@…>
which cleans up and merges some Hitachi SH-2 modifications from
John Mills <jmills@…>.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/************************************************************************
2 *
3 *  Data types and constants for Hitachi SH704X on-chip peripherals
4 *
5 *  Author: John M.Mills (jmills@tga.com)
6 *
7 *  COPYRIGHT (c) 1999, TGA Technologies, Norcross, GA, USA
8 *
9 *  This program is distributed in the hope that it will be useful,
10 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 *  This file may be distributed as part of the RTEMS software item.
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.OARcorp.com/rtems/license.html.
18 *
19 *      John M. Mills (jmills@tga.com)
20 *      TGA Technologies, Inc.
21 *      100 Pinnacle Way, Suite 140
22 *      Norcross, GA 30071 U.S.A.
23 *
24 *      This modified file may be copied and distributed in accordance
25 *      the above-referenced license. It is provided for critique and
26 *      developmental purposes without any warranty nor representation
27 *      by the authors or by TGA Technologies.
28 *
29 *  $Id$
30 *
31 *
32 ************************************************************************/
33 
34#ifndef _sh_io_types_h
35#define _sh_io_types_h
36 
37#include <rtems/score/iosh7045.h>
38#include <termios.h>
39
40typedef enum {SCI0, SCI1} portNo;
41typedef enum {eight, seven} dataBits;
42typedef enum {one, two} stopBits;
43typedef enum {even, odd} parity;
44
45typedef struct {
46  portNo   line;
47  int      speed_ix;
48  dataBits dBits;
49  int      parEn;       
50  parity   par;
51  int      mulPro;
52  stopBits sBits;
53} sci_setup_t;
54
55typedef union{
56        unsigned char Reg;         /* By Register */
57        struct {                   /* By  Field */
58                 unsigned char Sync  :1; /* Async/Sync */
59                 unsigned char DBts  :1; /* Char.Length */
60                 unsigned char ParEn :1; /* Parity En.*/
61                 unsigned char Odd   :1; /* Even/Odd */
62                 unsigned char SBts  :1; /* No.Stop Bits */
63                 unsigned char MulP  :1; /* Multi-Proc. */
64                 unsigned char Dvsr  :2; /* Clock Sel. */
65        } Fld;
66} sci_smr_t;
67
68typedef union {
69        unsigned char Reg;          /*  By Register */
70        struct {                    /*  By Field */
71                 unsigned char TIE :1;    /*  Tx.Int.En. */
72                 unsigned char RIE :1;    /*  Rx.Int.En. */
73                 unsigned char TE  :1;    /*  Tx.En. */
74                 unsigned char RE  :1;    /*  Rx.En. */
75                 unsigned char MPIE:1;    /*  Mult.Pro.Int.En. */
76                 unsigned char TEIE:1;    /*  Tx.End Int.En. */
77                 unsigned char CkSrc :2;   /*  Clock Src. */
78        } Fld;
79} sci_scr_t;
80
81typedef struct {
82  unsigned char n ;
83  unsigned char N ;
84} sci_bitrate_t;
85
86#endif /* _sh_io_types_h */
87
Note: See TracBrowser for help on using the repository browser.