MoistureSoftware/Source/i2c.h

26 lines
637 B
C

#ifndef __I2C_H__
#define __I2C_H__
#include "stm32f10x.h"
#include "stdbool.h"
#include "cmsis_os.h"
#include "stm32f10x.h"
// I2C1
extern void I2C_Init(void);
extern void I2C_Start(void);
extern void I2C_Stop(void);
extern uint8_t I2C_Wait_ACK(void);
extern void I2C_SendByte(uint8_t byte);
extern uint8_t I2C_ReadByte(uint8_t ack);
// I2C2
extern void I2C2_Init(void);
extern void I2C2_Start(void);
extern void I2C2_Stop(void);
extern uint8_t I2C2_Wait_ACK(void);
extern void I2C2_SendByte(uint8_t byte);
extern uint8_t I2C2_ReadByte(uint8_t ack);
extern void WS100T10_Init(void);
extern void WS100T10_Ctrl(uint8_t OutByte);
#endif