RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
sh
gensh2
include
sh
io_types.h
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.rtems.org/license/LICENSE.
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
*
30
************************************************************************/
31
32
#ifndef _sh_io_types_h
33
#define _sh_io_types_h
34
35
#include <rtems/score/iosh7045.h>
36
#include <termios.h>
37
38
typedef
enum
{SCI0, SCI1} portNo;
39
typedef
enum
{eight, seven} dataBits;
40
typedef
enum
{one, two} stopBits;
41
typedef
enum
{even, odd} parity;
42
43
typedef
struct
{
44
portNo line;
45
int
speed_ix;
46
dataBits dBits;
47
int
parEn;
48
parity par;
49
int
mulPro;
50
stopBits sBits;
51
}
sci_setup_t
;
52
53
typedef
union
{
54
unsigned
char
Reg;
/* By Register */
55
struct
{
/* By Field */
56
unsigned
char
Sync :1;
/* Async/Sync */
57
unsigned
char
DBts :1;
/* Char.Length */
58
unsigned
char
ParEn :1;
/* Parity En.*/
59
unsigned
char
Odd :1;
/* Even/Odd */
60
unsigned
char
SBts :1;
/* No.Stop Bits */
61
unsigned
char
MulP :1;
/* Multi-Proc. */
62
unsigned
char
Dvsr :2;
/* Clock Sel. */
63
} Fld;
64
}
sci_smr_t
;
65
66
typedef
union
{
67
unsigned
char
Reg;
/* By Register */
68
struct
{
/* By Field */
69
unsigned
char
TIE :1;
/* Tx.Int.En. */
70
unsigned
char
RIE :1;
/* Rx.Int.En. */
71
unsigned
char
TE :1;
/* Tx.En. */
72
unsigned
char
RE :1;
/* Rx.En. */
73
unsigned
char
MPIE:1;
/* Mult.Pro.Int.En. */
74
unsigned
char
TEIE:1;
/* Tx.End Int.En. */
75
unsigned
char
CkSrc :2;
/* Clock Src. */
76
} Fld;
77
}
sci_scr_t
;
78
79
typedef
struct
{
80
unsigned
char
n ;
81
unsigned
char
N ;
82
}
sci_bitrate_t
;
83
84
#endif
/* _sh_io_types_h */
sci_bitrate_t
Definition
io_types.h:79
sci_setup_t
Definition
io_types.h:43
sci_scr_t
Definition
io_types.h:66
sci_smr_t
Definition
io_types.h:53
Generated by
1.18.0