Go to the documentation of this file.00001 #ifndef _ARCH_ARM_AT91_TWI_H_
00002 #define _ARCH_ARM_AT91_TWI_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
00057
00060 #define TWI_CR_OFF 0x00000000
00061 #define TWI_CR (TWI_BASE + TWI_CR_OFF)
00062 #define TWI_START 0x00000001
00063 #define TWI_STOP 0x00000002
00064 #define TWI_MSEN 0x00000004
00065 #define TWI_MSDIS 0x00000008
00066 #define TWI_SVEN 0x00000010
00067 #define TWI_SVDIS 0x00000020
00068 #define TWI_SWRST 0x00000080
00070
00071
00073 #define TWI_MMR_OFF 0x00000004
00074 #define TWI_MMR (TWI_BASE + TWI_MMR_OFF)
00075 #define TWI_IADRSZ 0x00000300
00076 #define TWI_IADRSZ_NONE 0x00000000
00077 #define TWI_IADRSZ_1BYTE 0x00000100
00078 #define TWI_IADRSZ_2BYTE 0x00000200
00079 #define TWI_IADRSZ_3BYTE 0x00000300
00080 #define TWI_MREAD 0x00001000
00081 #define TWI_DADR 0x007F0000
00082 #define TWI_DADR_LSB 16
00084
00085
00087 #define TWI_SMR_OFF 0x00000008
00088 #define TWI_SMR (TWI_BASE + TWI_SMR_OFF)
00089 #define TWI_SADR 0x007F0000
00090 #define TWI_SADR_LSB 16
00092
00093
00095 #define TWI_IADRR_OFF 0x0000000C
00096 #define TWI_IADRR (TWI_BASE + TWI_IADRR_OFF)
00097 #define TWI_IADR 0x00FFFFFF
00098 #define TWI_IADR_LSB 0
00100
00101
00103 #define TWI_CWGR_OFF 0x00000010
00104 #define TWI_CWGR (TWI_BASE + TWI_CWGR_OFF)
00105 #define TWI_CLDIV 0x000000FF
00106 #define TWI_CLDIV_LSB 0
00107 #define TWI_CHDIV 0x0000FF00
00108 #define TWI_CHDIV_LSB 8
00109 #define TWI_CKDIV 0x00070000
00110 #define TWI_CKDIV_LSB 16
00112
00113
00115 #define TWI_SR_OFF 0x00000020
00116 #define TWI_SR (TWI_BASE + TWI_SR_OFF)
00118 #define TWI_IER_OFF 0x00000024
00119 #define TWI_IER (TWI_BASE + TWI_IER_OFF)
00121 #define TWI_IDR_OFF 0x00000028
00122 #define TWI_IDR (TWI_BASE + TWI_IDR_OFF)
00124 #define TWI_IMR_OFF 0x0000002C
00125 #define TWI_IMR (TWI_BASE + TWI_IMR_OFF)
00127 #define TWI_TXCOMP 0x00000001
00128 #define TWI_RXRDY 0x00000002
00129 #define TWI_TXRDY 0x00000004
00130 #define TWI_SVREAD 0x00000008
00131 #define TWI_SVACC 0x00000010
00132 #define TWI_GACC 0x00000020
00133 #define TWI_OVRE 0x00000040
00134 #define TWI_NACK 0x00000100
00135 #define TWI_ARBLST 0x00000200
00136 #define TWI_SCLWS 0x00000400
00137 #define TWI_EOSACC 0x00000800
00139
00140
00142 #define TWI_RHR_OFF 0x00000030
00143 #define TWI_RHR (TWI_BASE + TWI_RHR_OFF)
00145
00146
00148 #define TWI_THR_OFF 0x00000034
00149 #define TWI_THR (TWI_BASE + TWI_THR_OFF)
00151
00152
00154 #endif