libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the I²C module More...
Defined Constants and Types for the I²C module
LGPL License Terms libopencm3 License
#define I2C0 I2C0_BASE |
Definition at line 236 of file i2c_common.h.
#define I2C0_CLKDIV I2C_CLKDIV(I2C0) |
Definition at line 241 of file i2c_common.h.
Definition at line 238 of file i2c_common.h.
Definition at line 237 of file i2c_common.h.
Definition at line 250 of file i2c_common.h.
Definition at line 247 of file i2c_common.h.
Definition at line 249 of file i2c_common.h.
Definition at line 248 of file i2c_common.h.
Definition at line 251 of file i2c_common.h.
#define I2C0_RXDATA I2C_RXDATA(I2C0) |
Definition at line 244 of file i2c_common.h.
#define I2C0_RXDATAP I2C_RXDATAP(I2C0) |
Definition at line 245 of file i2c_common.h.
Definition at line 242 of file i2c_common.h.
#define I2C0_SADDRMASK I2C_SADDRMASK(I2C0) |
Definition at line 243 of file i2c_common.h.
Definition at line 239 of file i2c_common.h.
#define I2C0_STATUS I2C_STATUS(I2C0) |
Definition at line 240 of file i2c_common.h.
#define I2C0_TXDATA I2C_TXDATA(I2C0) |
Definition at line 246 of file i2c_common.h.
#define I2C1 I2C1_BASE |
Definition at line 254 of file i2c_common.h.
#define I2C1_CLKDIV I2C_CLKDIV(I2C1) |
Definition at line 259 of file i2c_common.h.
Definition at line 256 of file i2c_common.h.
Definition at line 255 of file i2c_common.h.
Definition at line 268 of file i2c_common.h.
Definition at line 265 of file i2c_common.h.
Definition at line 267 of file i2c_common.h.
Definition at line 266 of file i2c_common.h.
Definition at line 269 of file i2c_common.h.
#define I2C1_RXDATA I2C_RXDATA(I2C1) |
Definition at line 262 of file i2c_common.h.
#define I2C1_RXDATAP I2C_RXDATAP(I2C1) |
Definition at line 263 of file i2c_common.h.
Definition at line 260 of file i2c_common.h.
#define I2C1_SADDRMASK I2C_SADDRMASK(I2C1) |
Definition at line 261 of file i2c_common.h.
Definition at line 257 of file i2c_common.h.
#define I2C1_STATUS I2C_STATUS(I2C1) |
Definition at line 258 of file i2c_common.h.
#define I2C1_TXDATA I2C_TXDATA(I2C1) |
Definition at line 264 of file i2c_common.h.
#define I2C_CLKDIV | ( | base | ) | MMIO32((base) + 0x010) |
Definition at line 33 of file i2c_common.h.
#define I2C_CLKDIV_DIV | ( | v | ) | (((v) << I2C_CLKDIV_DIV_SHIFT) & I2C_CLKDIV_DIV_MASK) |
Definition at line 127 of file i2c_common.h.
#define I2C_CLKDIV_DIV_MASK (0xFF << I2C_CLKDIV_DIV_SHIFT) |
Definition at line 126 of file i2c_common.h.
#define I2C_CLKDIV_DIV_SHIFT (0) |
Definition at line 125 of file i2c_common.h.
#define I2C_CMD | ( | base | ) | MMIO32((base) + 0x004) |
Definition at line 30 of file i2c_common.h.
#define I2C_CMD_ABORT (1 << 5) |
Definition at line 87 of file i2c_common.h.
#define I2C_CMD_ACK (1 << 2) |
Definition at line 90 of file i2c_common.h.
#define I2C_CMD_CLEARPC (1 << 7) |
Definition at line 85 of file i2c_common.h.
#define I2C_CMD_CLEARTX (1 << 6) |
Definition at line 86 of file i2c_common.h.
#define I2C_CMD_CONT (1 << 4) |
Definition at line 88 of file i2c_common.h.
#define I2C_CMD_NACK (1 << 3) |
Definition at line 89 of file i2c_common.h.
#define I2C_CMD_START (1 << 0) |
Definition at line 92 of file i2c_common.h.
#define I2C_CMD_STOP (1 << 1) |
Definition at line 91 of file i2c_common.h.
#define I2C_CTRL | ( | base | ) | MMIO32((base) + 0x000) |
Definition at line 29 of file i2c_common.h.
#define I2C_CTRL_ARBDIS (1 << 5) |
Definition at line 77 of file i2c_common.h.
#define I2C_CTRL_AUTOACK (1 << 2) |
Definition at line 80 of file i2c_common.h.
#define I2C_CTRL_AUTOSE (1 << 3) |
Definition at line 79 of file i2c_common.h.
#define I2C_CTRL_AUTOSN (1 << 4) |
Definition at line 78 of file i2c_common.h.
#define I2C_CTRL_BTO | ( | v | ) | (((v) << I2C_CTRL_BTO_SHIFT) & I2C_CTRL_BTO_MASK) |
Definition at line 61 of file i2c_common.h.
#define I2C_CTRL_BTO_160PCC 3 |
Definition at line 66 of file i2c_common.h.
#define I2C_CTRL_BTO_40PCC 1 |
Definition at line 64 of file i2c_common.h.
#define I2C_CTRL_BTO_80PCC 2 |
Definition at line 65 of file i2c_common.h.
#define I2C_CTRL_BTO_MASK (0x3 << I2C_CTRL_BTO_SHIFT) |
Definition at line 60 of file i2c_common.h.
#define I2C_CTRL_BTO_OFF 0 |
Definition at line 63 of file i2c_common.h.
#define I2C_CTRL_BTO_SHIFT (12) |
Definition at line 59 of file i2c_common.h.
#define I2C_CTRL_CLHR | ( | v | ) | (((v) << I2C_CTRL_CLHR_SHIFT) & I2C_CTRL_CLHR_MASK) |
Definition at line 70 of file i2c_common.h.
#define I2C_CTRL_CLHR_ASYMMETRIC 1 |
Definition at line 73 of file i2c_common.h.
#define I2C_CTRL_CLHR_FAST 2 |
Definition at line 74 of file i2c_common.h.
#define I2C_CTRL_CLHR_MASK (0x3 << I2C_CTRL_CLHR_SHIFT) |
Definition at line 69 of file i2c_common.h.
#define I2C_CTRL_CLHR_SHIFT (12) |
Definition at line 68 of file i2c_common.h.
#define I2C_CTRL_CLHR_STANDARD 0 |
Definition at line 72 of file i2c_common.h.
#define I2C_CTRL_CLTO | ( | v | ) | (((v) << I2C_CTRL_CLTO_SHIFT) & I2C_CTRL_CLTO_MASK) |
Definition at line 48 of file i2c_common.h.
#define I2C_CTRL_CLTO_1024PPC 5 |
Definition at line 55 of file i2c_common.h.
#define I2C_CTRL_CLTO_160PCC 3 |
Definition at line 53 of file i2c_common.h.
#define I2C_CTRL_CLTO_320PPC 4 |
Definition at line 54 of file i2c_common.h.
#define I2C_CTRL_CLTO_40PCC 1 |
Definition at line 51 of file i2c_common.h.
#define I2C_CTRL_CLTO_80PCC 2 |
Definition at line 52 of file i2c_common.h.
#define I2C_CTRL_CLTO_MASK (0x7 << I2C_CTRL_CLTO_SHIFT) |
Definition at line 47 of file i2c_common.h.
#define I2C_CTRL_CLTO_OFF 0 |
Definition at line 50 of file i2c_common.h.
#define I2C_CTRL_CLTO_SHIFT (16) |
Definition at line 46 of file i2c_common.h.
#define I2C_CTRL_EN (1 << 0) |
Definition at line 82 of file i2c_common.h.
#define I2C_CTRL_GCAMEN (1 << 6) |
Definition at line 76 of file i2c_common.h.
#define I2C_CTRL_GIBITO (1 << 15) |
Definition at line 57 of file i2c_common.h.
#define I2C_CTRL_SLAVE (1 << 1) |
Definition at line 81 of file i2c_common.h.
#define I2C_IEN | ( | base | ) | MMIO32((base) + 0x034) |
Definition at line 42 of file i2c_common.h.
#define I2C_IEN_ACK (1 << 6) |
Definition at line 210 of file i2c_common.h.
#define I2C_IEN_ADDR (1 << 2) |
Definition at line 214 of file i2c_common.h.
#define I2C_IEN_ARBLOST (1 << 9) |
Definition at line 207 of file i2c_common.h.
#define I2C_IEN_BITO (1 << 14) |
Definition at line 202 of file i2c_common.h.
#define I2C_IEN_BUSERR (1 << 10) |
Definition at line 206 of file i2c_common.h.
#define I2C_IEN_BUSHOLD (1 << 11) |
Definition at line 205 of file i2c_common.h.
#define I2C_IEN_CLTO (1 << 15) |
Definition at line 201 of file i2c_common.h.
#define I2C_IEN_MSTOP (1 << 8) |
Definition at line 208 of file i2c_common.h.
#define I2C_IEN_NACK (1 << 7) |
Definition at line 209 of file i2c_common.h.
#define I2C_IEN_RSTART (1 << 1) |
Definition at line 215 of file i2c_common.h.
#define I2C_IEN_RXDATAV (1 << 5) |
Definition at line 211 of file i2c_common.h.
#define I2C_IEN_RXUF (1 << 13) |
Definition at line 203 of file i2c_common.h.
#define I2C_IEN_SSTOP (1 << 16) |
Definition at line 200 of file i2c_common.h.
#define I2C_IEN_START (1 << 0) |
Definition at line 216 of file i2c_common.h.
#define I2C_IEN_TXBL (1 << 4) |
Definition at line 212 of file i2c_common.h.
#define I2C_IEN_TXC (1 << 3) |
Definition at line 213 of file i2c_common.h.
#define I2C_IEN_TXOF (1 << 12) |
Definition at line 204 of file i2c_common.h.
#define I2C_IF | ( | base | ) | MMIO32((base) + 0x028) |
Definition at line 39 of file i2c_common.h.
#define I2C_IF_ACK (1 << 6) |
Definition at line 153 of file i2c_common.h.
#define I2C_IF_ADDR (1 << 2) |
Definition at line 157 of file i2c_common.h.
#define I2C_IF_ARBLOST (1 << 9) |
Definition at line 150 of file i2c_common.h.
#define I2C_IF_BITO (1 << 14) |
Definition at line 145 of file i2c_common.h.
#define I2C_IF_BUSERR (1 << 10) |
Definition at line 149 of file i2c_common.h.
#define I2C_IF_BUSHOLD (1 << 11) |
Definition at line 148 of file i2c_common.h.
#define I2C_IF_CLTO (1 << 15) |
Definition at line 144 of file i2c_common.h.
#define I2C_IF_MSTOP (1 << 8) |
Definition at line 151 of file i2c_common.h.
#define I2C_IF_NACK (1 << 7) |
Definition at line 152 of file i2c_common.h.
#define I2C_IF_RSTART (1 << 1) |
Definition at line 158 of file i2c_common.h.
#define I2C_IF_RXDATAV (1 << 5) |
Definition at line 154 of file i2c_common.h.
#define I2C_IF_RXUF (1 << 13) |
Definition at line 146 of file i2c_common.h.
#define I2C_IF_SSTOP (1 << 16) |
Definition at line 143 of file i2c_common.h.
#define I2C_IF_START (1 << 0) |
Definition at line 159 of file i2c_common.h.
#define I2C_IF_TXBL (1 << 4) |
Definition at line 155 of file i2c_common.h.
#define I2C_IF_TXC (1 << 3) |
Definition at line 156 of file i2c_common.h.
#define I2C_IF_TXOF (1 << 12) |
Definition at line 147 of file i2c_common.h.
#define I2C_IFC | ( | base | ) | MMIO32((base) + 0x030) |
Definition at line 41 of file i2c_common.h.
#define I2C_IFC_ACK (1 << 6) |
Definition at line 191 of file i2c_common.h.
#define I2C_IFC_ADDR (1 << 2) |
Definition at line 195 of file i2c_common.h.
#define I2C_IFC_ARBLOST (1 << 9) |
Definition at line 188 of file i2c_common.h.
#define I2C_IFC_BITO (1 << 14) |
Definition at line 183 of file i2c_common.h.
#define I2C_IFC_BUSERR (1 << 10) |
Definition at line 187 of file i2c_common.h.
#define I2C_IFC_BUSHOLD (1 << 11) |
Definition at line 186 of file i2c_common.h.
#define I2C_IFC_CLTO (1 << 15) |
Definition at line 182 of file i2c_common.h.
#define I2C_IFC_MSTOP (1 << 8) |
Definition at line 189 of file i2c_common.h.
#define I2C_IFC_NACK (1 << 7) |
Definition at line 190 of file i2c_common.h.
#define I2C_IFC_RSTART (1 << 1) |
Definition at line 196 of file i2c_common.h.
#define I2C_IFC_RXDATAV (1 << 5) |
Definition at line 192 of file i2c_common.h.
#define I2C_IFC_RXUF (1 << 13) |
Definition at line 184 of file i2c_common.h.
#define I2C_IFC_SSTOP (1 << 16) |
Definition at line 181 of file i2c_common.h.
#define I2C_IFC_START (1 << 0) |
Definition at line 197 of file i2c_common.h.
#define I2C_IFC_TXBL (1 << 4) |
Definition at line 193 of file i2c_common.h.
#define I2C_IFC_TXC (1 << 3) |
Definition at line 194 of file i2c_common.h.
#define I2C_IFC_TXOF (1 << 12) |
Definition at line 185 of file i2c_common.h.
#define I2C_IFS | ( | base | ) | MMIO32((base) + 0x02C) |
Definition at line 40 of file i2c_common.h.
#define I2C_IFS_ACK (1 << 6) |
Definition at line 172 of file i2c_common.h.
#define I2C_IFS_ADDR (1 << 2) |
Definition at line 176 of file i2c_common.h.
#define I2C_IFS_ARBLOST (1 << 9) |
Definition at line 169 of file i2c_common.h.
#define I2C_IFS_BITO (1 << 14) |
Definition at line 164 of file i2c_common.h.
#define I2C_IFS_BUSERR (1 << 10) |
Definition at line 168 of file i2c_common.h.
#define I2C_IFS_BUSHOLD (1 << 11) |
Definition at line 167 of file i2c_common.h.
#define I2C_IFS_CLTO (1 << 15) |
Definition at line 163 of file i2c_common.h.
#define I2C_IFS_MSTOP (1 << 8) |
Definition at line 170 of file i2c_common.h.
#define I2C_IFS_NACK (1 << 7) |
Definition at line 171 of file i2c_common.h.
#define I2C_IFS_RSTART (1 << 1) |
Definition at line 177 of file i2c_common.h.
#define I2C_IFS_RXDATAV (1 << 5) |
Definition at line 173 of file i2c_common.h.
#define I2C_IFS_RXUF (1 << 13) |
Definition at line 165 of file i2c_common.h.
#define I2C_IFS_SSTOP (1 << 16) |
Definition at line 162 of file i2c_common.h.
#define I2C_IFS_START (1 << 0) |
Definition at line 178 of file i2c_common.h.
#define I2C_IFS_TXBL (1 << 4) |
Definition at line 174 of file i2c_common.h.
#define I2C_IFS_TXC (1 << 3) |
Definition at line 175 of file i2c_common.h.
#define I2C_IFS_TXOF (1 << 12) |
Definition at line 166 of file i2c_common.h.
#define I2C_ROUTE | ( | base | ) | MMIO32((base) + 0x038) |
Definition at line 43 of file i2c_common.h.
#define I2C_ROUTE_LOCATION | ( | v | ) | (((v) << I2C_ROUTE_LOCATION_SHIFT) & I2C_ROUTE_LOCATION_MASK) |
Definition at line 221 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC0 0 |
Definition at line 224 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC1 1 |
Definition at line 225 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC2 2 |
Definition at line 226 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC3 3 |
Definition at line 227 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC4 4 |
Definition at line 228 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC5 5 |
Definition at line 229 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOC6 6 |
Definition at line 230 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_LOCx | ( | x | ) | I2C_ROUTE_LOCATION(x) |
Definition at line 223 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_MASK (0x7 << I2C_ROUTE_LOCATION_SHIFT) |
Definition at line 220 of file i2c_common.h.
#define I2C_ROUTE_LOCATION_SHIFT (8) |
Definition at line 219 of file i2c_common.h.
#define I2C_ROUTE_SCLPEN (1 << 1) |
Definition at line 232 of file i2c_common.h.
#define I2C_ROUTE_SDAPEN (1 << 0) |
Definition at line 233 of file i2c_common.h.
#define I2C_RXDATA | ( | base | ) | MMIO32((base) + 0x01C) |
Definition at line 36 of file i2c_common.h.
#define I2C_RXDATAP | ( | base | ) | MMIO32((base) + 0x020) |
Definition at line 37 of file i2c_common.h.
#define I2C_SADDR | ( | base | ) | MMIO32((base) + 0x014) |
Definition at line 34 of file i2c_common.h.
#define I2C_SADDR_ADDR | ( | v | ) | (((v) << I2C_SADDR_ADDR_SHIFT) & I2C_SADDR_ADDR_MASK) |
Definition at line 133 of file i2c_common.h.
#define I2C_SADDR_ADDR_MASK (0xFF << I2C_SADDR_ADDR_SHIFT) |
Definition at line 132 of file i2c_common.h.
#define I2C_SADDR_ADDR_SHIFT (0) |
Definition at line 131 of file i2c_common.h.
#define I2C_SADDRMASK | ( | base | ) | MMIO32((base) + 0x018) |
Definition at line 35 of file i2c_common.h.
#define I2C_SADDRMASK_MASK | ( | v | ) | (((v) << I2C_SADDRMASK_MASK_SHIFT) & I2C_SADDRMASK_MASK_MASK) |
Definition at line 139 of file i2c_common.h.
#define I2C_SADDRMASK_MASK_MASK (0xFF << I2C_SADDRMASK_MASK_SHIFT) |
Definition at line 138 of file i2c_common.h.
#define I2C_SADDRMASK_MASK_SHIFT (0) |
Definition at line 137 of file i2c_common.h.
#define I2C_STATE | ( | base | ) | MMIO32((base) + 0x008) |
Definition at line 31 of file i2c_common.h.
#define I2C_STATE_BUSHOLD (1 << 4) |
Definition at line 107 of file i2c_common.h.
#define I2C_STATE_BUSY (1 << 0) |
Definition at line 111 of file i2c_common.h.
#define I2C_STATE_MASTER (1 << 1) |
Definition at line 110 of file i2c_common.h.
#define I2C_STATE_NACKED (1 << 3) |
Definition at line 108 of file i2c_common.h.
#define I2C_STATE_STATE | ( | v | ) | (((v) << I2C_STATE_STATE_SHIFT) & I2C_STATE_STATE_MASK) |
Definition at line 97 of file i2c_common.h.
#define I2C_STATE_STATE_ADDR 3 |
Definition at line 102 of file i2c_common.h.
#define I2C_STATE_STATE_ADDRACK 4 |
Definition at line 103 of file i2c_common.h.
#define I2C_STATE_STATE_DATA 5 |
Definition at line 104 of file i2c_common.h.
#define I2C_STATE_STATE_DATAACK 6 |
Definition at line 105 of file i2c_common.h.
#define I2C_STATE_STATE_IDLE 0 |
Definition at line 99 of file i2c_common.h.
#define I2C_STATE_STATE_MASK (0x7 << I2C_STATE_STATE_SHIFT) |
Definition at line 96 of file i2c_common.h.
#define I2C_STATE_STATE_SHIFT (5) |
Definition at line 95 of file i2c_common.h.
#define I2C_STATE_STATE_START 2 |
Definition at line 101 of file i2c_common.h.
#define I2C_STATE_STATE_WAIT 1 |
Definition at line 100 of file i2c_common.h.
#define I2C_STATE_TRANSMITTER (1 << 2) |
Definition at line 109 of file i2c_common.h.
#define I2C_STATUS | ( | base | ) | MMIO32((base) + 0x00C) |
Definition at line 32 of file i2c_common.h.
#define I2C_STATUS_PABORT (1 << 5) |
Definition at line 117 of file i2c_common.h.
#define I2C_STATUS_PACK (1 << 2) |
Definition at line 120 of file i2c_common.h.
#define I2C_STATUS_PCONT (1 << 4) |
Definition at line 118 of file i2c_common.h.
#define I2C_STATUS_PNACK (1 << 3) |
Definition at line 119 of file i2c_common.h.
#define I2C_STATUS_PSTART (1 << 0) |
Definition at line 122 of file i2c_common.h.
#define I2C_STATUS_PSTOP (1 << 1) |
Definition at line 121 of file i2c_common.h.
#define I2C_STATUS_RXDATAV (1 << 8) |
Definition at line 114 of file i2c_common.h.
#define I2C_STATUS_TXBL (1 << 7) |
Definition at line 115 of file i2c_common.h.
#define I2C_STATUS_TXC (1 << 6) |
Definition at line 116 of file i2c_common.h.
#define I2C_TXDATA | ( | base | ) | MMIO32((base) + 0x024) |
Definition at line 38 of file i2c_common.h.