hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
ifx-i2c.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
8#ifndef IFX_I2C_H
9#define IFX_I2C_H
10
11#include <stdint.h>
12
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
22#define LIB_I2C UINT8_C(0x23)
23
27#define IFX_I2C_LOG_TAG "IFX_I2C"
28
33#define IFX_I2C_GET_CLOCK_FREQUENCY 0x01
34
39#define IFX_I2C_SET_CLOCK_FREQUENCY 0x02
40
45#define IFX_I2C_GET_SLAVE_ADDR 0x03
46
51#define IFX_I2C_SET_SLAVE_ADDR 0x04
52
56#define IFX_I2C_GET_GUARD_TIME 0x05
57
62#define IFX_I2C_SET_GUARD_TIME 0x06
63
76 uint32_t *frequency_hz_buffer);
77
90 uint32_t frequency_hz);
91
104 uint16_t *address_buffer);
105
117ifx_status_t ifx_i2c_set_slave_address(ifx_protocol_t *self, uint16_t address);
118
135 uint32_t *guard_time_us_buffer);
136
150 uint32_t guard_time_us);
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif // IFX_I2C_H
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Definition ifx-error.h:91
Generic protocol API (ISO/OSI stack).
ifx_status_t ifx_i2c_get_clock_frequency(ifx_protocol_t *self, uint32_t *frequency_hz_buffer)
Getter for I2C clock frequency in [Hz].
ifx_status_t ifx_i2c_get_slave_address(ifx_protocol_t *self, uint16_t *address_buffer)
Getter for I2C slave address.
ifx_status_t ifx_i2c_set_clock_frequency(ifx_protocol_t *self, uint32_t frequency_hz)
Sets I2C clock frequency in [Hz].
ifx_status_t ifx_i2c_set_guard_time(ifx_protocol_t *self, uint32_t guard_time_us)
Sets guard time to be waited between I2C transmissions.
ifx_status_t ifx_i2c_get_guard_time(ifx_protocol_t *self, uint32_t *guard_time_us_buffer)
Getter for I2C guard time in [us].
ifx_status_t ifx_i2c_set_slave_address(ifx_protocol_t *self, uint16_t address)
Sets I2C slave address.