AnsweredAssumed Answered

StdPeriph_Driver I2C

Question asked by Leek1001 on Nov 30, 2011
Latest reply on Jun 27, 2012 by Rabbit
Hello all,

I want to use the StdPeriph_Driver as a guide for my own project.
Part: STM32F100RB value line discovery (test kit).
Trying to get the I2C to work.

I want to use the I2C files (.c+.h) for my own project.
So when I put these files in my own project
(included correctly I think: I put the files i2c.c and i2c.h in de src folder and included 
- stm32f10x.h and
- stm32f10x_conf.h
in the firmware folder and included in the i2c.h file like:
#include "../firmware/stm32f10x.h"
#include "../firmware/stm32f10x_conf.h"

Now I call the I2C_StructInit function in my main.c
But it gives the error: too few arguments to function 'I2C_StructInit'
I've absolutely no idea what to include in that function.

void I2C_StructInit(I2C_InitTypeDef* I2C_InitStruct){

I2C_InitTypeDef refers to:
typedef struct{
... declaring variables.

If a take a look at void I2C_Init(I2C_TypeDef* I2Cx, I2C_InitTypeDef* I2C_InitStruct){
Then I see that I2Cx need to be I2C2 (the I2C I use).
But what does I2C_InitStruct need to be?

your help is very appreciated!
If I do something wrong here, just mention it.