Skip to content

File syn_port_i2c.h

File List > port > syn_port_i2c.h

Go to the documentation of this file

#ifndef SYN_PORT_I2C_H
#define SYN_PORT_I2C_H

#include "../common/syn_defs.h"

#ifdef __cplusplus
extern "C" {
#endif

SYN_Status syn_port_i2c_init(uint8_t i2c_id, uint32_t clock_speed_hz, uint8_t role,
                             uint16_t own_addr);

SYN_Status syn_port_i2c_deinit(uint8_t i2c_id);

SYN_Status syn_port_i2c_transfer(uint8_t i2c_id, uint16_t addr, const uint8_t *tx, size_t tx_len,
                                 uint8_t *rx, size_t rx_len);

#ifdef __cplusplus
}
#endif

#endif /* SYN_PORT_I2C_H */