Go to the documentation of this file.00001 #ifndef _ARCH_CM3_NXP_MACH_LPC_CAN_H_
00002 #define _ARCH_CM3_NXP_MACH_LPC_CAN_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00049
00050
00053 #define CAN_AFMR_OFF 0x00000000
00054 #define CAN_AFMR (LPC_CANAF_BASE + CAN_AFMR_OFF)
00055
00059 #define CAN_SFF_SA_OFF 0x00000004
00060 #define CAN_SFF_SA (LPC_CANAF_BASE + CAN_SFF_SA_OFF)
00061
00065 #define CAN_SFF_GRP_SA_OFF 0x00000008
00066 #define CAN_SFF_GRP_SA (LPC_CANAF_BASE + CAN_SFF_GRP_SA_OFF)
00067
00071 #define CAN_EFF_SA_OFF 0x0000000C
00072 #define CAN_EFF_SA (LPC_CANAF_BASE + CAN_EFF_SA_OFF)
00073
00077 #define CAN_EFF_GRP_SA_OFF 0x00000010
00078 #define CAN_EFF_GRP_SA (LPC_CANAF_BASE + CAN_EFF_GRP_SA_OFF)
00079
00083 #define CAN_ENDOFTABLE_OFF 0x00000014
00084 #define CAN_ENDOFTABLE (LPC_CANAF_BASE + CAN_ENDOFTABLE_OFF)
00085
00089 #define CAN_LUTERRAD_OFF 0x00000018
00090 #define CAN_LUTERRAD (LPC_CANAF_BASE + CAN_LUTERRAD_OFF)
00091
00095 #define CAN_LUTERR_OFF 0x0000001C
00096 #define CAN_LUTERR (LPC_CANAF_BASE + CAN_LUTERR_OFF)
00097
00101 #define CAN_TXSR_OFF 0x00000000
00102 #define CAN_TXSR (LPC_CANCR_BASE + CAN_TXSR_OFF)
00103
00107 #define CAN_RXSR_OFF 0x00000004
00108 #define CAN_RXSR (LPC_CANCR_BASE + CAN_RXSR_OFF)
00109
00113 #define CAN_MSR_OFF 0x00000008
00114 #define CAN_MSR (LPC_CANCR_BASE + CAN_MSR_OFF)
00115
00119 #define CAN_MOD_OFF 0x00000000
00120
00124 #define CAN_CMR_OFF 0x00000004
00125
00129 #define CAN_GSR_OFF 0x00000008
00130
00134 #define CAN_ICR_OFF 0x0000000C
00135
00139 #define CAN_IER_OFF 0x00000010
00140
00144 #define CAN_BTR_OFF 0x00000014
00145
00149 #define CAN_EWL_OFF 0x00000018
00150
00154 #define CAN_SR_OFF 0x0000001C
00155
00159 #define CAN_RFS_OFF 0x00000020
00160
00164 #define CAN_RID_OFF 0x00000024
00165
00169 #define CAN_RDA_OFF 0x00000028
00170
00174 #define CAN_RDB_OFF 0x0000002C
00175
00179 #define CAN_TFI_OFF(x) (x * 16 + 0x00000020)
00180
00184 #define CAN_TID_OFF(x) (x * 16 + 0x00000024)
00185
00189 #define CAN_TDA_OFF(x) (x * 16 + 0x00000028)
00190
00194 #define CAN_TDB_OFF(x) (x * 16 + 0x0000002C)
00195
00199 #ifdef LPC_CAN1_BASE
00200 #define CAN1_MOD (LPC_CAN1_BASE + CAN_MOD_OFF)
00201 #define CAN1_CMR (LPC_CAN1_BASE + CAN_CMR_OFF)
00202 #define CAN1_GSR (LPC_CAN1_BASE + CAN_GSR_OFF)
00203 #define CAN1_ICR (LPC_CAN1_BASE + CAN_ICR_OFF)
00204 #define CAN1_IER (LPC_CAN1_BASE + CAN_IER_OFF)
00205 #define CAN1_BTR (LPC_CAN1_BASE + CAN_BTR_OFF)
00206 #define CAN1_EWL (LPC_CAN1_BASE + CAN_EWL_OFF)
00207 #define CAN1_SR (LPC_CAN1_BASE + CAN_SR_OFF)
00208 #define CAN1_RFS (LPC_CAN1_BASE + CAN_RFS_OFF)
00209 #define CAN1_RID (LPC_CAN1_BASE + CAN_RID_OFF)
00210 #define CAN1_RDA (LPC_CAN1_BASE + CAN_RDA_OFF)
00211 #define CAN1_RDB (LPC_CAN1_BASE + CAN_RDB_OFF)
00212 #define CAN1_TFI(x) (LPC_CAN1_BASE + CAN_TFI_OFF(x))
00213 #define CAN1_TID(x) (LPC_CAN1_BASE + CAN_TID_OFF(x))
00214 #define CAN1_TDA(x) (LPC_CAN1_BASE + CAN_TDA_OFF(x))
00215 #define CAN1_TDB(x) (LPC_CAN1_BASE + CAN_TDB_OFF(x))
00216 #endif
00217
00221 #ifdef LPC_CAN2_BASE
00222 #define CAN2_MOD (LPC_CAN2_BASE + CAN_MOD_OFF)
00223 #define CAN2_CMR (LPC_CAN2_BASE + CAN_CMR_OFF)
00224 #define CAN2_GSR (LPC_CAN2_BASE + CAN_GSR_OFF)
00225 #define CAN2_ICR (LPC_CAN2_BASE + CAN_ICR_OFF)
00226 #define CAN2_IER (LPC_CAN2_BASE + CAN_IER_OFF)
00227 #define CAN2_BTR (LPC_CAN2_BASE + CAN_BTR_OFF)
00228 #define CAN2_EWL (LPC_CAN2_BASE + CAN_EWL_OFF)
00229 #define CAN2_SR (LPC_CAN2_BASE + CAN_SR_OFF)
00230 #define CAN2_RFS (LPC_CAN2_BASE + CAN_RFS_OFF)
00231 #define CAN2_RID (LPC_CAN2_BASE + CAN_RID_OFF)
00232 #define CAN2_RDA (LPC_CAN2_BASE + CAN_RDA_OFF)
00233 #define CAN2_RDB (LPC_CAN2_BASE + CAN_RDB_OFF)
00234 #define CAN2_TFI(x) (LPC_CAN2_BASE + CAN_TFI_OFF(x))
00235 #define CAN2_TID(x) (LPC_CAN2_BASE + CAN_TID_OFF(x))
00236 #define CAN2_TDA(x) (LPC_CAN2_BASE + CAN_TDA_OFF(x))
00237 #define CAN2_TDB(x) (LPC_CAN2_BASE + CAN_TDB_OFF(x))
00238 #endif
00239
00243 #endif