OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_LM3S102_Rowley/] [hw_include/] [hw_comp.h] - Blame information for rev 581

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 581 jeremybenn
//*****************************************************************************
2
//
3
// hw_comp.h - Macros used when accessing the comparator hardware.
4
//
5
// Copyright (c) 2005,2006 Luminary Micro, Inc.  All rights reserved.
6
//
7
// Software License Agreement
8
//
9
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
10
// exclusively on LMI's Stellaris Family of microcontroller products.
11
//
12
// The software is owned by LMI and/or its suppliers, and is protected under
13
// applicable copyright laws.  All rights are reserved.  Any use in violation
14
// of the foregoing restrictions may subject the user to criminal sanctions
15
// under applicable laws, as well as to civil liability for the breach of the
16
// terms and conditions of this license.
17
//
18
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
22
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23
//
24
// This is part of revision 523 of the Stellaris Driver Library.
25
//
26
//*****************************************************************************
27
 
28
#ifndef __HW_COMP_H__
29
#define __HW_COMP_H__
30
 
31
//*****************************************************************************
32
//
33
// The following define the offsets of the comparator registers.
34
//
35
//*****************************************************************************
36
#define COMP_O_MIS              0x00000000  // Interrupt status register
37
#define COMP_O_RIS              0x00000004  // Raw interrupt status register
38
#define COMP_O_INTEN            0x00000008  // Interrupt enable register
39
#define COMP_O_REFCTL           0x00000010  // Reference voltage control reg.
40
#define COMP_O_ACSTAT0          0x00000020  // Comp0 status register
41
#define COMP_O_ACCTL0           0x00000024  // Comp0 control register
42
#define COMP_O_ACSTAT1          0x00000040  // Comp1 status register
43
#define COMP_O_ACCTL1           0x00000044  // Comp1 control register
44
 
45
//*****************************************************************************
46
//
47
// The following define the bit fields in the COMP_MIS, COMP_RIS, and
48
// COMP_INTEN registers.
49
//
50
//*****************************************************************************
51
#define COMP_INT_1              0x00000002  // Comp1 interrupt
52
#define COMP_INT_0              0x00000001  // Comp0 interrupt
53
 
54
//*****************************************************************************
55
//
56
// The following define the bit fields in the COMP_REFCTL register.
57
//
58
//*****************************************************************************
59
#define COMP_REFCTL_EN          0x00000200  // Reference voltage enable
60
#define COMP_REFCTL_RNG         0x00000100  // Reference voltage range
61
#define COMP_REFCTL_VREF_MASK   0x0000000F  // Reference voltage select mask
62
#define COMP_REFCTL_VREF_SHIFT  0
63
 
64
//*****************************************************************************
65
//
66
// The following define the bit fields in the COMP_ACSTAT0 and COMP_ACSTAT1
67
// registers.
68
//
69
//*****************************************************************************
70
#define COMP_ACSTAT_OVAL        0x00000002  // Comparator output value
71
 
72
//*****************************************************************************
73
//
74
// The following define the bit fields in the COMP_ACCTL0 and COMP_ACCTL1
75
// registers.
76
//
77
//*****************************************************************************
78
#define COMP_ACCTL_TMASK        0x00000800  // Trigger enable
79
#define COMP_ACCTL_ASRCP_MASK   0x00000600  // Vin+ source select mask
80
#define COMP_ACCTL_ASRCP_PIN    0x00000000  // Dedicated Comp+ pin
81
#define COMP_ACCTL_ASRCP_PIN0   0x00000200  // Comp0+ pin
82
#define COMP_ACCTL_ASRCP_REF    0x00000400  // Internal voltage reference
83
#define COMP_ACCTL_ASRCP_RES    0x00000600  // Reserved
84
#define COMP_ACCTL_OEN          0x00000100  // Comparator output enable
85
#define COMP_ACCTL_TSVAL        0x00000080  // Trigger polarity select
86
#define COMP_ACCTL_TSEN_MASK    0x00000060  // Trigger sense mask
87
#define COMP_ACCTL_TSEN_LEVEL   0x00000000  // Trigger is level sense
88
#define COMP_ACCTL_TSEN_FALL    0x00000020  // Trigger is falling edge
89
#define COMP_ACCTL_TSEN_RISE    0x00000040  // Trigger is rising edge
90
#define COMP_ACCTL_TSEN_BOTH    0x00000060  // Trigger is both edges
91
#define COMP_ACCTL_ISLVAL       0x00000010  // Interrupt polarity select
92
#define COMP_ACCTL_ISEN_MASK    0x0000000C  // Interrupt sense mask
93
#define COMP_ACCTL_ISEN_LEVEL   0x00000000  // Interrupt is level sense
94
#define COMP_ACCTL_ISEN_FALL    0x00000004  // Interrupt is falling edge
95
#define COMP_ACCTL_ISEN_RISE    0x00000008  // Interrupt is rising edge
96
#define COMP_ACCTL_ISEN_BOTH    0x0000000C  // Interrupt is both edges
97
#define COMP_ACCTL_CINV         0x00000002  // Comparator output invert
98
 
99
//*****************************************************************************
100
//
101
// The following define the reset values for the comparator registers.
102
//
103
//*****************************************************************************
104
#define COMP_RV_MIS             0x00000000  // Interrupt status register
105
#define COMP_RV_RIS             0x00000000  // Raw interrupt status register
106
#define COMP_RV_INTEN           0x00000000  // Interrupt enable register
107
#define COMP_RV_REFCTL          0x00000000  // Reference voltage control reg.
108
#define COMP_RV_ACSTAT0         0x00000000  // Comp0 status register
109
#define COMP_RV_ACCTL0          0x00000000  // Comp0 control register
110
#define COMP_RV_ACSTAT1         0x00000000  // Comp1 status register
111
#define COMP_RV_ACCTL1          0x00000000  // Comp1 control register
112
 
113
#endif // __HW_COMP_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.