Defined Constants and Types for the NRF52xx I2C
More...
|
void | i2c_set_tx_buffer (uint32_t i2c, const uint8_t *buffer, uint8_t len) |
| Configure I2C transmit buffer properties. More...
|
|
void | i2c_set_rx_buffer (uint32_t i2c, uint8_t *buffer, uint8_t len) |
| Configure I2C receive buffer properties. More...
|
|
Defined Constants and Types for the NRF52xx I2C
- Version
- 1.0.0
- Date
- Nov 2021
LGPL License Terms libopencm3 License
- Author
- © 2016 Maxim Sloyko maxim.nosp@m.s@go.nosp@m.ogle..nosp@m.com
-
© 2021 Eduard Drusa <ventyl86 at netkosice dot sk>
◆ I2C_ADDRESS
#define I2C_ADDRESS |
( |
|
i2c | ) |
MMIO32((i2c) + 0x588) |
◆ I2C_ENABLE
#define I2C_ENABLE |
( |
|
i2c | ) |
MMIO32((i2c) + 0x500) |
◆ I2C_ERRORSRC
#define I2C_ERRORSRC |
( |
|
i2c | ) |
MMIO32((i2c) + 0x4c4) |
◆ I2C_ERRORSRC_ANACK
#define I2C_ERRORSRC_ANACK (1 << 1) |
◆ I2C_ERRORSRC_DNACK
#define I2C_ERRORSRC_DNACK (1 << 2) |
◆ I2C_ERRORSRC_OVERRUN
#define I2C_ERRORSRC_OVERRUN (1 << 0) |
◆ I2C_EVENT_BB
#define I2C_EVENT_BB |
( |
|
i2c | ) |
MMIO32((i2c) + 0x138) |
◆ I2C_EVENT_ERROR
#define I2C_EVENT_ERROR |
( |
|
i2c | ) |
MMIO32((i2c) + 0x124) |
◆ I2C_EVENT_LASTRX
#define I2C_EVENT_LASTRX |
( |
|
i2c | ) |
MMIO32((i2c) + 0x15C) |
◆ I2C_EVENT_LASTTX
#define I2C_EVENT_LASTTX |
( |
|
i2c | ) |
MMIO32((i2c) + 0x160) |
◆ I2C_EVENT_RXDREADY
#define I2C_EVENT_RXDREADY |
( |
|
i2c | ) |
MMIO32((i2c) + 0x108) |
◆ I2C_EVENT_RXSTARTED
#define I2C_EVENT_RXSTARTED |
( |
|
i2c | ) |
MMIO32((i2c) + 0x14C) |
◆ I2C_EVENT_STOPPED
#define I2C_EVENT_STOPPED |
( |
|
i2c | ) |
MMIO32((i2c) + 0x104) |
◆ I2C_EVENT_SUSPENDED
#define I2C_EVENT_SUSPENDED |
( |
|
i2c | ) |
MMIO32((i2c) + 0x148) |
◆ I2C_EVENT_TXDSENT
#define I2C_EVENT_TXDSENT |
( |
|
i2c | ) |
MMIO32((i2c) + 0x11c) |
◆ I2C_EVENT_TXSTARTED
#define I2C_EVENT_TXSTARTED |
( |
|
i2c | ) |
MMIO32((i2c) + 0x150) |
◆ I2C_FREQUENCY
#define I2C_FREQUENCY |
( |
|
i2c | ) |
MMIO32((i2c) + 0x524) |
◆ I2C_INTEN
#define I2C_INTEN |
( |
|
i2c | ) |
MMIO32((i2c) + 0x300) |
◆ I2C_INTENCLR
#define I2C_INTENCLR |
( |
|
i2c | ) |
MMIO32((i2c) + 0x308) |
◆ I2C_INTENSET
#define I2C_INTENSET |
( |
|
i2c | ) |
MMIO32((i2c) + 0x304) |
◆ I2C_PSEL_OFF
#define I2C_PSEL_OFF (0xffffffff) |
◆ I2C_PSELSCL
#define I2C_PSELSCL |
( |
|
i2c | ) |
MMIO32((i2c) + 0x508) |
◆ I2C_PSELSDA
#define I2C_PSELSDA |
( |
|
i2c | ) |
MMIO32((i2c) + 0x50c) |
◆ I2C_RXD
#define I2C_RXD |
( |
|
i2c | ) |
MMIO32((i2c) + 0x518) |
◆ I2C_RXDAMOUNT
#define I2C_RXDAMOUNT |
( |
|
i2c | ) |
MMIO32((i2c) + 0x53C) |
◆ I2C_RXDLIST
#define I2C_RXDLIST |
( |
|
i2c | ) |
MMIO32((i2c) + 0x540) |
◆ I2C_RXDMAXCNT
#define I2C_RXDMAXCNT |
( |
|
i2c | ) |
MMIO32((i2c) + 0x538) |
◆ I2C_RXDPTR
#define I2C_RXDPTR |
( |
|
i2c | ) |
MMIO32((i2c) + 0x534) |
◆ I2C_SHORTS
#define I2C_SHORTS |
( |
|
i2c | ) |
MMIO32((i2c) + 0x200) |
◆ I2C_TASK_RESUME
#define I2C_TASK_RESUME |
( |
|
i2c | ) |
MMIO32((i2c) + 0x020) |
◆ I2C_TASK_STARTRX
#define I2C_TASK_STARTRX |
( |
|
i2c | ) |
MMIO32((i2c) + 0x000) |
◆ I2C_TASK_STARTTX
#define I2C_TASK_STARTTX |
( |
|
i2c | ) |
MMIO32((i2c) + 0x008) |
◆ I2C_TASK_STOP
#define I2C_TASK_STOP |
( |
|
i2c | ) |
MMIO32((i2c) + 0x014) |
◆ I2C_TASK_SUSPEND
#define I2C_TASK_SUSPEND |
( |
|
i2c | ) |
MMIO32((i2c) + 0x01c) |
◆ I2C_TXD
#define I2C_TXD |
( |
|
i2c | ) |
MMIO32((i2c) + 0x51c) |
◆ I2C_TXDAMOUNT
#define I2C_TXDAMOUNT |
( |
|
i2c | ) |
MMIO32((i2c) + 0x54C) |
◆ I2C_TXDLIST
#define I2C_TXDLIST |
( |
|
i2c | ) |
MMIO32((i2c) + 0x550) |
◆ I2C_TXDMAXCNT
#define I2C_TXDMAXCNT |
( |
|
i2c | ) |
MMIO32((i2c) + 0x548) |
◆ I2C_TXDPTR
#define I2C_TXDPTR |
( |
|
i2c | ) |
MMIO32((i2c) + 0x544) |
◆ i2c_set_rx_buffer()
void i2c_set_rx_buffer |
( |
uint32_t |
i2c, |
|
|
uint8_t * |
buffer, |
|
|
uint8_t |
len |
|
) |
| |
Configure I2C receive buffer properties.
Configures receive buffer for EasyDMA transaction. This API is only available if I2C_MODE_MASTER mode is activated.
Configures linear RX buffer for EasyDMA transmission.
- Parameters
-
[in] | i2c | i2c peripheral base, see I2C instances |
[in] | buffer | address of buffer start |
[in] | len | length of the buffer |
Definition at line 54 of file i2c.c.
References I2C_RXDLIST, I2C_RXDMAXCNT, and I2C_RXDPTR.
◆ i2c_set_tx_buffer()
void i2c_set_tx_buffer |
( |
uint32_t |
i2c, |
|
|
const uint8_t * |
buffer, |
|
|
uint8_t |
len |
|
) |
| |
Configure I2C transmit buffer properties.
Configures transmit buffer for EasyDMA transaction. This API is only available if I2C_MODE_MASTER mode is activated.
Configures linear TX buffer for EasyDMA transmission.
- Parameters
-
[in] | i2c | i2c peripheral base, see I2C instances |
[in] | buffer | address of buffer start |
[in] | len | length of data in the buffer |
Definition at line 37 of file i2c.c.
References I2C_TXDLIST, I2C_TXDMAXCNT, and I2C_TXDPTR.