Hi Rastislav,
the macro that I use is:
/** I2C - Register Layout Typedef */
typedef struct {
__IO uint8_t A1; /**< I2C Address Register 1, offset: 0x0 */
__IO uint8_t F; /**< I2C Frequency Divider register, offset: 0x1 */
__IO uint8_t C1; /**< I2C Control Register 1, offset: 0x2 */
__IO uint8_t S; /**< I2C Status register, offset: 0x3 */
__IO uint8_t D; /**< I2C Data I/O register, offset: 0x4 */
__IO uint8_t C2; /**< I2C Control Register 2, offset: 0x5 */
__IO uint8_t FLT; /**< I2C Programmable Input Glitch Filter register, offset: 0x6 */
__IO uint8_t RA; /**< I2C Range Address register, offset: 0x7 */
__IO uint8_t SMB; /**< I2C SMBus Control and Status register, offset: 0x8 */
__IO uint8_t A2; /**< I2C Address Register 2, offset: 0x9 */
__IO uint8_t SLTH; /**< I2C SCL Low Timeout Register High, offset: 0xA */
__IO uint8_t SLTL; /**< I2C SCL Low Timeout Register Low, offset: 0xB */
} I2C_Type, *I2C_MemMapPtr;
#define I2C_C1_REG(base) ((base)->C1)
that is included inside MKL25Z4.h file of KDS.
The disassembly is the following, but I don't understand where I can find the address...
Iic_repeatedStart:
00005694: push {r7, lr}
00005696: sub sp, #8
00005698: add r7, sp, #0
0000569a: str r0, [r7, #4]
346 I2C_C1_REG(dev->regMap) |= I2C_C1_RSTA_MASK;
0000569c: ldr r3, [r7, #4]
0000569e: ldr r2, [r3, #0]
000056a0: ldr r3, [r7, #4]
000056a2: ldr r3, [r3, #0]
000056a4: ldrb r3, [r3, #2]
000056a6: uxtb r3, r3
000056a8: movs r1, #4
000056aa: orrs r3, r1
000056ac: uxtb r3, r3
000056ae: strb r3, [r2, #2]
349 }
000056b0: mov sp, r7
000056b2: add sp, #8
000056b4: pop {r7, pc}
000056b6: nop ; (mov r8, r8)
352 {
Thanks
Gianluca