libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
I2C Defines

Defined Constants and Types for the NRF51xx I2C More...

Collaboration diagram for I2C Defines:

Modules

 I2C instances
 
 I2C event -> task shortcuts
 The effect of activated shortcut is, that upon I2C event triggering, the hardware will automatically start chosen task without intervention of the software.
 
 I2C interrupts
 
 I2C peripheral mode
 
 I2C frequency constants
 

Macros

#define I2C_TASK_STARTRX(i2c)   MMIO32((i2c) + 0x000)
 
#define I2C_TASK_STARTTX(i2c)   MMIO32((i2c) + 0x008)
 
#define I2C_TASK_STOP(i2c)   MMIO32((i2c) + 0x014)
 
#define I2C_TASK_SUSPEND(i2c)   MMIO32((i2c) + 0x01c)
 
#define I2C_TASK_RESUME(i2c)   MMIO32((i2c) + 0x020)
 
#define I2C_EVENT_STOPPED(i2c)   MMIO32((i2c) + 0x104)
 
#define I2C_EVENT_RXDREADY(i2c)   MMIO32((i2c) + 0x108)
 
#define I2C_EVENT_TXDSENT(i2c)   MMIO32((i2c) + 0x11c)
 
#define I2C_EVENT_ERROR(i2c)   MMIO32((i2c) + 0x124)
 
#define I2C_EVENT_BB(i2c)   MMIO32((i2c) + 0x138)
 
#define I2C_EVENT_SUSPENDED(i2c)   MMIO32((i2c) + 0x148)
 
#define I2C_SHORTS(i2c)   MMIO32((i2c) + 0x200)
 
#define I2C_INTEN(i2c)   MMIO32((i2c) + 0x300)
 
#define I2C_INTENSET(i2c)   MMIO32((i2c) + 0x304)
 
#define I2C_INTENCLR(i2c)   MMIO32((i2c) + 0x308)
 
#define I2C_ERRORSRC(i2c)   MMIO32((i2c) + 0x4c4)
 
#define I2C_ENABLE(i2c)   MMIO32((i2c) + 0x500)
 
#define I2C_PSELSCL(i2c)   MMIO32((i2c) + 0x508)
 
#define I2C_PSELSDA(i2c)   MMIO32((i2c) + 0x50c)
 
#define I2C_RXD(i2c)   MMIO32((i2c) + 0x518)
 
#define I2C_TXD(i2c)   MMIO32((i2c) + 0x51c)
 
#define I2C_FREQUENCY(i2c)   MMIO32((i2c) + 0x524)
 
#define I2C_ADDRESS(i2c)   MMIO32((i2c) + 0x588)
 
#define I2C_ERRORSRC_OVERRUN   (1 << 0)
 
#define I2C_ERRORSRC_ANACK   (1 << 1)
 
#define I2C_ERRORSRC_DNACK   (1 << 2)
 
#define I2C_PSEL_OFF   (0xffffffff)
 

Detailed Description

Defined Constants and Types for the NRF51xx 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>

Macro Definition Documentation

◆ I2C_ADDRESS

#define I2C_ADDRESS (   i2c)    MMIO32((i2c) + 0x588)

Definition at line 73 of file common/i2c.h.

◆ I2C_ENABLE

#define I2C_ENABLE (   i2c)    MMIO32((i2c) + 0x500)

Definition at line 67 of file common/i2c.h.

◆ I2C_ERRORSRC

#define I2C_ERRORSRC (   i2c)    MMIO32((i2c) + 0x4c4)

Definition at line 66 of file common/i2c.h.

◆ I2C_ERRORSRC_ANACK

#define I2C_ERRORSRC_ANACK   (1 << 1)

Definition at line 104 of file common/i2c.h.

◆ I2C_ERRORSRC_DNACK

#define I2C_ERRORSRC_DNACK   (1 << 2)

Definition at line 105 of file common/i2c.h.

◆ I2C_ERRORSRC_OVERRUN

#define I2C_ERRORSRC_OVERRUN   (1 << 0)

Definition at line 103 of file common/i2c.h.

◆ I2C_EVENT_BB

#define I2C_EVENT_BB (   i2c)    MMIO32((i2c) + 0x138)

Definition at line 58 of file common/i2c.h.

◆ I2C_EVENT_ERROR

#define I2C_EVENT_ERROR (   i2c)    MMIO32((i2c) + 0x124)

Definition at line 57 of file common/i2c.h.

◆ I2C_EVENT_RXDREADY

#define I2C_EVENT_RXDREADY (   i2c)    MMIO32((i2c) + 0x108)

Definition at line 55 of file common/i2c.h.

◆ I2C_EVENT_STOPPED

#define I2C_EVENT_STOPPED (   i2c)    MMIO32((i2c) + 0x104)

Definition at line 54 of file common/i2c.h.

◆ I2C_EVENT_SUSPENDED

#define I2C_EVENT_SUSPENDED (   i2c)    MMIO32((i2c) + 0x148)

Definition at line 59 of file common/i2c.h.

◆ I2C_EVENT_TXDSENT

#define I2C_EVENT_TXDSENT (   i2c)    MMIO32((i2c) + 0x11c)

Definition at line 56 of file common/i2c.h.

◆ I2C_FREQUENCY

#define I2C_FREQUENCY (   i2c)    MMIO32((i2c) + 0x524)

Definition at line 72 of file common/i2c.h.

◆ I2C_INTEN

#define I2C_INTEN (   i2c)    MMIO32((i2c) + 0x300)

Definition at line 63 of file common/i2c.h.

◆ I2C_INTENCLR

#define I2C_INTENCLR (   i2c)    MMIO32((i2c) + 0x308)

Definition at line 65 of file common/i2c.h.

◆ I2C_INTENSET

#define I2C_INTENSET (   i2c)    MMIO32((i2c) + 0x304)

Definition at line 64 of file common/i2c.h.

◆ I2C_PSEL_OFF

#define I2C_PSEL_OFF   (0xffffffff)

Definition at line 139 of file common/i2c.h.

◆ I2C_PSELSCL

#define I2C_PSELSCL (   i2c)    MMIO32((i2c) + 0x508)

Definition at line 68 of file common/i2c.h.

◆ I2C_PSELSDA

#define I2C_PSELSDA (   i2c)    MMIO32((i2c) + 0x50c)

Definition at line 69 of file common/i2c.h.

◆ I2C_RXD

#define I2C_RXD (   i2c)    MMIO32((i2c) + 0x518)

Definition at line 70 of file common/i2c.h.

◆ I2C_SHORTS

#define I2C_SHORTS (   i2c)    MMIO32((i2c) + 0x200)

Definition at line 62 of file common/i2c.h.

◆ I2C_TASK_RESUME

#define I2C_TASK_RESUME (   i2c)    MMIO32((i2c) + 0x020)

Definition at line 51 of file common/i2c.h.

◆ I2C_TASK_STARTRX

#define I2C_TASK_STARTRX (   i2c)    MMIO32((i2c) + 0x000)

Definition at line 47 of file common/i2c.h.

◆ I2C_TASK_STARTTX

#define I2C_TASK_STARTTX (   i2c)    MMIO32((i2c) + 0x008)

Definition at line 48 of file common/i2c.h.

◆ I2C_TASK_STOP

#define I2C_TASK_STOP (   i2c)    MMIO32((i2c) + 0x014)

Definition at line 49 of file common/i2c.h.

◆ I2C_TASK_SUSPEND

#define I2C_TASK_SUSPEND (   i2c)    MMIO32((i2c) + 0x01c)

Definition at line 50 of file common/i2c.h.

◆ I2C_TXD

#define I2C_TXD (   i2c)    MMIO32((i2c) + 0x51c)

Definition at line 71 of file common/i2c.h.