Nut/OS  5.0.5
API Reference
stm32_twi2.c File Reference

STM32F I2C bus 1 initialization. More...

#include <cfg/os.h>
#include <cfg/clock.h>
#include <cfg/arch.h>
#include <cfg/twi.h>
#include <cfg/arch/gpio.h>
#include <string.h>
#include <sys/atom.h>
#include <sys/event.h>
#include <sys/timer.h>
#include <dev/irqreg.h>
#include <dev/gpio.h>
#include <dev/twif.h>
#include <arch/cm3/stm/stm32xxxx.h>
#include <arch/cm3/stm/stm32xxxx_gpio.h>
#include <arch/cm3/stm/stm32xxxx_rcc.h>
#include <arch/cm3/stm/stm32_twi.h>
Include dependency graph for stm32_twi2.c:

Defines

#define I2CBUS2_SCL_PORT   NUTGPIO_PORTB
 I2CBUS2 GPIO configuartion and assignment.
#define I2CBUS2_SCL_PIN   10
#define I2CBUS2_SDA_PORT   NUTGPIO_PORTB
#define I2CBUS2_SDA_PIN   11
#define I2CBUS2_SMBA_PORT   NUTGPIO_PORTB
#define I2CBUS2_SMBA_PIN   11

Functions

int Stm32I2cBus2Recover (void)
int Stm32I2cBus2Init (void)
 Processor specific Hardware Initiliaization.

Variables

NUTTWIBUS Stm32TwiBus_2
 TWI/I2C bus structure.

Detailed Description

STM32F I2C bus 1 initialization.


Define Documentation

#define I2CBUS2_SCL_PORT   NUTGPIO_PORTB

I2CBUS2 GPIO configuartion and assignment.

F1: SMBA PB12 SCL PB10 SDA PB11 L1: SMBA PB12 SCL PB10 SDA PB11 F2/F4L SMBA PB12 PF2 PH6 SCL PB10 PF1 PH4 SDA PB11 PF0 PH5

Referenced by Stm32I2cBus2Init(), and Stm32I2cBus2Recover().

#define I2CBUS2_SCL_PIN   10
#define I2CBUS2_SDA_PORT   NUTGPIO_PORTB
#define I2CBUS2_SDA_PIN   11
#define I2CBUS2_SMBA_PORT   NUTGPIO_PORTB

Referenced by Stm32I2cBus2Init().

#define I2CBUS2_SMBA_PIN   11

Referenced by Stm32I2cBus2Init().


Function Documentation

int Stm32I2cBus2Recover ( void  )

References GPIO_CFG_MULTIDRIVE, GPIO_CFG_OUTPUT, GpioPinConfigSet(), GpioPinSetHigh, GpioPinSetLow, I2CBUS2_SCL_PIN, I2CBUS2_SCL_PORT, I2CBUS2_SDA_PIN, I2CBUS2_SDA_PORT, and NutMicroDelay().

Here is the call graph for this function:

int Stm32I2cBus2Init ( void  )

Variable Documentation

Initial value:

TWI/I2C bus structure.