You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
460 B
21 lines
460 B
/*
|
|
* i2c.h
|
|
*
|
|
* Created on: 1 Jun 2019
|
|
* Author: maximilian
|
|
*/
|
|
|
|
#ifndef PLATFORM_I2C_H_
|
|
#define PLATFORM_I2C_H_
|
|
|
|
#include "stm32f10x.h"
|
|
#include <stdlib.h>
|
|
|
|
void i2cInit(I2C_TypeDef* I2Cx);
|
|
void i2c1Init(void);
|
|
void i2cStartTransmission(I2C_TypeDef* I2Cx, uint8_t dir, uint8_t slave_addr);
|
|
void i2cWrite(I2C_TypeDef* I2Cx, uint8_t* data);
|
|
uint8_t i2cRead(I2C_TypeDef* I2Cx);
|
|
void i2cEndTransmission(I2C_TypeDef* I2Cx);
|
|
|
|
#endif /* PLATFORM_I2C_H_ */
|
|
|