libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include <libopencm3/cm3/common.h>
#include <libopencm3/nrf/memorymap.h>
#include <libopencm3/nrf/periph.h>
#include <libopencm3/nrf/common/i2c.h>
Go to the source code of this file.
Macros | |
#define | I2C_EVENT_RXSTARTED(i2c) MMIO32((i2c) + 0x14C) |
#define | I2C_EVENT_TXSTARTED(i2c) MMIO32((i2c) + 0x150) |
#define | I2C_EVENT_LASTRX(i2c) MMIO32((i2c) + 0x15C) |
#define | I2C_EVENT_LASTTX(i2c) MMIO32((i2c) + 0x160) |
#define | I2C_RXDPTR(i2c) MMIO32((i2c) + 0x534) |
#define | I2C_RXDMAXCNT(i2c) MMIO32((i2c) + 0x538) |
#define | I2C_RXDAMOUNT(i2c) MMIO32((i2c) + 0x53C) |
#define | I2C_RXDLIST(i2c) MMIO32((i2c) + 0x540) |
#define | I2C_TXDPTR(i2c) MMIO32((i2c) + 0x544) |
#define | I2C_TXDMAXCNT(i2c) MMIO32((i2c) + 0x548) |
#define | I2C_TXDAMOUNT(i2c) MMIO32((i2c) + 0x54C) |
#define | I2C_TXDLIST(i2c) MMIO32((i2c) + 0x550) |
#define | I2C_SHORTS_LASTTX_STARTRX (1 << 7) |
On start of last byte transmission, activate start of reception task. More... | |
#define | I2C_SHORTS_LASTTX_SUSPEND (1 << 8) |
On start of last byte transmission, activate suspend task. More... | |
#define | I2C_SHORTS_LASTTX_STOP (1 << 9) |
On start of last byte transmission, activate stop task. More... | |
#define | I2C_SHORTS_LASTRX_STARTTX (1 << 10) |
On start of last byte reception, activate start of transmission task. More... | |
#define | I2C_SHORTS_LASTRX_STOP (1 << 12) |
On start of last byte reception, activate stop task. More... | |
#define | I2C_INTEN_SUSPENDED (1 << 18) |
#define | I2C_INTEN_RXSTARTED (1 << 19) |
#define | I2C_INTEN_TXSTARTED (1 << 20) |
#define | I2C_INTEN_LASTRX (1 << 23) |
#define | I2C_INTEN_LASTTX (1 << 24) |
#define | I2C_MODE_MASTER (6) |
NRF52 I2C Master mode with EasyDMA support. More... | |
Functions | |
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... | |