projekty/Source/example1/src/Directive.h

Go to the documentation of this file.
00001 /*
00002  * $Id: directive.h,v 1.00 2007/09/11 15:45:00 BorisK Exp $
00003  *
00004  * Copyright (C) 2005 ONTRACK s.r.o.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA    
00019  * 02111-1307, USA.
00020  *
00021  * [1] ARM-based Microcontroller LPC2119/2129/2194/2292/9994, "Preliminary User Manual", February 03, 2004, Philips
00022  * Written by Boris Kralik <kralikbo@yahoo.com>, 2007
00023  *
00024  */
00025 #ifndef DIRECTIVE_H
00026 #define DIRECTIVE_H
00027 
00028 //TIMER
00029 #define TMR_IMR0        0
00030 #define TMR_RMR0        1
00031 #define TMR_SMR0        2
00032 #define TMR_IMR1        3
00033 #define TMR_RMR1        4
00034 #define TMR_SMR1        5
00035 #define TMR_IMR2        6
00036 #define TMR_RMR2        7
00037 #define TMR_SMR2        8
00038 #define TMR_IMR3        9
00039 #define TMR_RMR3        10
00040 #define TMR_SMR3        11
00041 
00042 #define TIR_MR0I        0            // Interrupt flag for match channel 0
00043 #define TIR_MR1I        1            // Interrupt flag for match channel 1
00044 #define TIR_MR2I        2            // Interrupt flag for match channel 2
00045 #define TIR_MR3I        3            // Interrupt flag for match channel 3
00046 #define TIR_CR0I        4            // Interrupt flag for capture channel 0 event
00047 #define TIR_CR1I        5            // Interrupt flag for capture channel 1 event
00048 #define TIR_CR2I        6            // Interrupt flag for capture channel 2 event
00049 #define TIR_CR3I        7            // Interrupt flag for capture channel 3 event
00050 
00051 // Timer Match Control Register Bit Definitions
00052 #define TMCR_MR0_I      0
00053             // Enable Interrupt when MR0 matches TC
00054 #define TMCR_MR0_R      1
00055             // Enable Reset of TC upon MR0 match
00056 #define TMCR_MR0_S      2
00057             // Enable Stop of TC upon MR0 match
00058 #define TMCR_MR1_I      3
00059             // Enable Interrupt when MR1 matches TC
00060 #define TMCR_MR1_R      4
00061             // Enable Reset of TC upon MR1 match
00062 #define TMCR_MR1_S      5
00063             // Enable Stop of TC upon MR1 match
00064 #define TMCR_MR2_I      6
00065             // Enable Interrupt when MR2 matches TC
00066 #define TMCR_MR2_R      7
00067             // Enable Reset of TC upon MR2 match
00068 #define TMCR_MR2_S      8
00069             // Enable Stop of TC upon MR2 match
00070 #define TMCR_MR3_I      9
00071             // Enable Interrupt when MR3 matches TC
00072 #define TMCR_MR3_R      10
00073            // Enable Reset of TC upon MR3 match
00074 #define TMCR_MR3_S      11
00075            // Enable Stop of TC upon MR3 match
00076 #define TCR_CE          0
00077 #define TCR_CR          1
00078 
00079 //PCONP
00080 #define PCC_PCTIM0      1
00081 #define PCC_PCTIM1      2
00082 #define PCC_PCURT0      3
00083 #define PCC_PCURT1      4
00084 #define PCC_PWM0        5
00085 //   x
00086 #define PCC_I2C         7
00087 #define PCC_PCSPI0      8
00088 #define PCC_RTC         9
00089 #define PCC_PCSPI1      10
00090 //   x
00091 #define PCC_PCCAD       12
00092 #define PCC_CAN1        13
00093 #define PCC_CAN2        14
00094 #define PCC_CAN3        15
00095 #define PCC_CAN4        16
00096 
00097 //PLLSTAT
00098 #define PLLE    8
00099 #define PLLC    9
00100 #define PLOCK   10
00101 //CAN.TxSR
00102 #define TxSR_TS1        0       
00103 #define TxSR_TS2        1
00104 #define TxSR_TS3        2
00105 #define TxSR_TS4        3
00106 
00107 #define TxSR_TBS        0xF00
00108 #define TxSR_TBS1       8
00109 #define TxSR_TBS2       9
00110 #define TxSR_TBS3       10
00111 #define TxSR_TBS4       11
00112 
00113 #define TxSR_TCS        0xF0000
00114 #define TxSR_TCS1       16
00115 #define TxSR_TCS2       17
00116 #define TxSR_TCS3       18
00117 #define TxSR_TCS4       19
00118 
00119 //CAM.CMR
00120 #define CMR_TR          0
00121 #define CMR_AT          1
00122 #define CMR_RRB         2
00123 #define CMR_CDO         3
00124 #define CMR_SRR         4
00125 #define CMR_STB1        5
00126 #define CMR_STB2        6
00127 #define CMR_STB3        7
00128 //CAN.RFS
00129 #define BP      10
00130 #define RTR     30
00131 #define FF      31
00132 //CAN.ICR
00133 #define ICR_RI  0
00134 #define ICR_TI1 1
00135 #define ICR_EI  2
00136 #define ICR_DOI 3
00137 #define ICR_WUI 4
00138 #define ICR_EPI 5
00139 #define ICR_ALI 6
00140 #define ICR_BEI 7
00141 #define ICR_IDI 8
00142 #define ICR_TI2 9
00143 #define ICR_TI3 10
00144 #define ICR_ERRDIR      21
00145 //CAN.MOD
00146 #define RM      0
00147 #define LOM     1
00148 #define STM     2
00149 #define TPM     3
00150 #define SM      4
00151 #define RPM     5
00152 #define TM      7
00153 //CAN.RS
00154 #define RS_RSB  0
00155 #define RS_DOS  1
00156 #define RS_TBS1 2
00157 #define RS_TCS1 3
00158 #define RS_RS   4
00159 #define RS_TS1  5
00160 #define RS_ES   6
00161 #define RS_BS   7
00162 //CAN.SR
00163 #define SR_RBS  0
00164 #define SR_DOS  1
00165 #define SR_TBS1 2
00166 #define SR_TBS2 10
00167 #define SR_TBS3 18
00168 #define SR_TCS1 3
00169 #define SR_TCS2 11
00170 #define SR_TCS3 19
00171 #define SR_RS   4
00172 #define SR_TS1  5
00173 #define SR_TS2  13
00174 #define SR_TS3  21
00175 #define SR_ES   6
00176 #define SR_BS   7
00177         
00178 //CAN.GSR
00179 #define GSR_RBS 0
00180 #define GSR_DOS 1
00181 #define GSR_TBS 2
00182 #define GSR_TCS 3
00183 #define GSR_RS  4
00184 #define GSR_TS  5
00185 #define GSR_ES  6
00186 #define GSR_BS  7
00187 
00188 //CAN.TFI1
00189 #define TFI1_PRIO       0
00190 //#define       TFI1_DLC        (8 << 16)
00191 #define TFI1_RTR        30
00192 #define TFI1_FF         (1 << 31)
00193 
00194 //CAN.IER
00195 #define RIE     0
00196 #define TIE1    1
00197 #define EIE     2
00198 #define DOIE    3
00199 #define WUIE    4
00200 #define EPIE    5
00201 #define ALIE    6
00202 #define BEIE    7
00203 #define IDIE    8
00204 #define TIE2    9
00205 #define TIE3    10
00206 
00207 //Acctptance filter
00208 
00209 //CAN Disable bit in Acceptance filter
00210 #define CAN_DISABLE     12
00211 #define ACC_VPB_BASE    0xE0038000
00212 
00213 #define ACCFILTER_STD   (ACC_VPB_BASE   +       0x00000000)
00214 //StandardFilter places reservated for eight 32bit words
00215 #define ACCFILTER_GRP   (ACCFILTER_STD  +       0x00000000)
00216 //GroupFilter places reservated for three 32bit words
00217 #define ACCFILTER_IND   (ACCFILTER_GRP  +       0x00000000)
00218 //IndividualFilter places reservated for three 32bit words
00219 #define ACCFILTER_EFG   (ACCFILTER_IND  +       0x00000000)
00220 
00221 #define ACCFILTER_OFF   0
00222 #define ACCFILTER_BP    1
00223 #define ACCFILTER_EFCAN 2
00224 #define TPM     3
00225 
00226 
00227 
00228 
00229 #endif

Generated on Fri Sep 21 13:41:54 2007 for example1 by  doxygen 1.4.7