comparison packages/hal/sh/arch/current/include/sh3_scif.h @ 105:5a0cc6c243a9 ecos-sw-2000-06-30

Merge from eCos master repository on 2000-06-30-08:18:49-BST
author jlarmour
date Fri, 30 Jun 2000 16:27:35 +0000
parents
children
comparison
equal deleted inserted replaced
104:ad66e26a9e7c 105:5a0cc6c243a9
1 //=============================================================================
2 //
3 // sh3_scif.h
4 //
5 // Simple driver for the SH3 Serial Communication Interface with FIFO
6 //
7 //=============================================================================
8 //####COPYRIGHTBEGIN####
9 //
10 // -------------------------------------------
11 // The contents of this file are subject to the Red Hat eCos Public License
12 // Version 1.1 (the "License"); you may not use this file except in
13 // compliance with the License. You may obtain a copy of the License at
14 // http://www.redhat.com/
15 //
16 // Software distributed under the License is distributed on an "AS IS"
17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18 // License for the specific language governing rights and limitations under
19 // the License.
20 //
21 // The Original Code is eCos - Embedded Configurable Operating System,
22 // released September 30, 1998.
23 //
24 // The Initial Developer of the Original Code is Red Hat.
25 // Portions created by Red Hat are
26 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
27 // All Rights Reserved.
28 // -------------------------------------------
29 //
30 //####COPYRIGHTEND####
31 //=============================================================================
32 //#####DESCRIPTIONBEGIN####
33 //
34 // Author(s): jskov
35 // Contributors:jskov
36 // Date: 2000-03-30
37 // Description: Simple driver for the SH Serial Communication Interface
38 // The driver can be used for either the SCIF or the IRDA
39 // modules (the latter can act as the former).
40 // Clients of this file can configure the behavior with:
41 // CYGNUM_SCIF_PORTS: number of SCI ports
42 //
43 // Note: It should be possible to configure a channel to IRDA mode.
44 // Worry about that when some board needs it.
45 //
46 //####DESCRIPTIONEND####
47 //
48 //=============================================================================
49
50 #include <pkgconf/hal.h>
51
52 #ifdef CYGNUM_HAL_SH_SH3_SCIF_PORTS
53
54 //--------------------------------------------------------------------------
55 // SCIF register offsets
56 #define _REG_SCSMR 0x00
57 #define _REG_SCBRR 0x02
58 #define _REG_SCSCR 0x04
59 #define _REG_SCFTDR 0x06
60 #define _REG_SCSSR 0x08
61 #define _REG_SCFRDR 0x0a
62 #define _REG_SCFCR 0x0c
63 #define _REG_SCFDR 0x0e
64
65 //--------------------------------------------------------------------------
66
67 typedef struct {
68 cyg_uint8* base;
69 cyg_int32 msec_timeout;
70 int isr_vector;
71 } channel_data_t;
72
73 //--------------------------------------------------------------------------
74
75 #if !defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
76 // This one should only be used by old-stub compatibility code!
77 externC void cyg_hal_plf_scif_init_channel(const channel_data_t* chan);
78 #endif
79
80 externC cyg_uint8 cyg_hal_plf_scif_getc(void* __ch_data);
81 externC void cyg_hal_plf_scif_putc(void* __ch_data, cyg_uint8 c);
82 void cyg_hal_plf_scif_init(int scif_index, int comm_index,
83 int rcv_vect, cyg_uint8* base);
84
85
86 #endif // CYGNUM_HAL_SH_SH3_SCIF_PORTS
87 //-----------------------------------------------------------------------------
88 // end of sh3_scif.h