2015-07-22 19:11:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "stm32f7xx.h"
|
|
|
|
#include "gfx.h"
|
|
|
|
|
2018-06-23 03:02:07 +00:00
|
|
|
gBool i2cInit(I2C_TypeDef* i2c);
|
2015-07-22 19:11:28 +00:00
|
|
|
|
2018-11-03 00:51:23 +00:00
|
|
|
void i2cSend(I2C_TypeDef* i2c, gU8 slaveAddr, gU8* data, gU16 length);
|
|
|
|
void i2cSendByte(I2C_TypeDef* i2c, gU8 slaveAddr, gU8 data);
|
|
|
|
void i2cWriteReg(I2C_TypeDef* i2c, gU8 slaveAddr, gU8 regAddr, gU8 value);
|
2015-07-22 19:11:28 +00:00
|
|
|
|
2018-11-03 00:51:23 +00:00
|
|
|
void i2cRead(I2C_TypeDef* i2c, gU8 slaveAddr, gU8* data, gU16 length);
|
|
|
|
gU8 i2cReadByte(I2C_TypeDef* i2c, gU8 slaveAddr, gU8 regAddr);
|
|
|
|
gU16 i2cReadWord(I2C_TypeDef* i2c, gU8 slaveAddr, gU8 regAddr);
|