#ifndef _I2C_MASTER_MOD_FNS_H
#define _I2C_MASTER_MOD_FNS_H

#include <atmel_start.h>

int32_t i2c_m_sync_blk_cmd_write_and_read(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *wr_buffer, uint8_t wr_length, uint8_t *rd_buffer, uint8_t *rd_length);

int32_t i2c_m_sync_my_cmd_write(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t length);

int32_t i2c_m_sync_my_cmd_read(struct i2c_m_sync_desc *i2c, uint8_t reg, uint8_t *buffer, uint8_t length);

int32_t i2c_m_sync_ext_cmd_write(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t length);

int32_t i2c_m_sync_ext_cmd_read(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t length);

int32_t i2c_m_sync_blk_cmd_write(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t length);

int32_t i2c_m_sync_blk_cmd_read(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t *length);

int32_t i2c_m_sync_ext_blk_cmd_write(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t length);

int32_t i2c_m_sync_ext_blk_cmd_read(struct i2c_m_sync_desc *i2c, uint8_t cmd, uint8_t *buffer, uint8_t *length);

int32_t enable_pec(struct i2c_m_sync_desc *i2c);

int32_t disable_pec(struct i2c_m_sync_desc *i2c);

#endif
