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
|
|
|
|
|
|
|
void i2cSend(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t* data, uint16_t length);
|
|
|
|
void i2cSendByte(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t data);
|
|
|
|
void i2cWriteReg(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t regAddr, uint8_t value);
|
|
|
|
|
|
|
|
void i2cRead(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t* data, uint16_t length);
|
|
|
|
uint8_t i2cReadByte(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t regAddr);
|
|
|
|
uint16_t i2cReadWord(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t regAddr);
|