Functions
Private Functions
Collaboration diagram for Private Functions:

Functions

static void I2C4_MspDeInit (I2C_HandleTypeDef *phi2c)
 DeInitializes I2C MSP. More...
 
static void I2C4_MspInit (I2C_HandleTypeDef *phi2c)
 Initializes I2C MSP. More...
 
static int32_t I2C4_ReadReg (uint16_t DevAddr, uint16_t Reg, uint16_t MemAddSize, uint8_t *pData, uint16_t Length)
 Read a register of the device through BUS. More...
 
static int32_t I2C4_WriteReg (uint16_t DevAddr, uint16_t Reg, uint16_t MemAddSize, uint8_t *pData, uint16_t Length)
 Write a value in a register of the device through BUS. More...
 
static void I2C_Compute_PRESC_SCLDEL_SDADEL (uint32_t clock_src_freq, uint32_t I2C_speed)
 Compute PRESC, SCLDEL and SDADEL. More...
 
static uint32_t I2C_Compute_SCLL_SCLH (uint32_t clock_src_freq, uint32_t I2C_speed)
 Calculate SCLL and SCLH and find best configuration. More...
 
static uint32_t I2C_GetTiming (uint32_t clock_src_freq, uint32_t i2c_freq)
 Compute I2C timing according current I2C clock source and required I2C clock. More...
 

Detailed Description

Function Documentation

◆ I2C4_MspDeInit()

static void I2C4_MspDeInit ( I2C_HandleTypeDef phi2c)
static

DeInitializes I2C MSP.

Parameters
phi2cI2C handler
Return values
None

Definition at line 814 of file stm32h747i_discovery_bus.c.

◆ I2C4_MspInit()

static void I2C4_MspInit ( I2C_HandleTypeDef phi2c)
static

Initializes I2C MSP.

Parameters
phi2cI2C handler
Return values
None

Definition at line 769 of file stm32h747i_discovery_bus.c.

◆ I2C4_ReadReg()

static int32_t I2C4_ReadReg ( uint16_t  DevAddr,
uint16_t  Reg,
uint16_t  MemAddSize,
uint8_t *  pData,
uint16_t  Length 
)
static

Read a register of the device through BUS.

Parameters
DevAddrDevice address on BUS
MemAddSizeSize of internal memory address
RegThe target register address to read
pDataThe target register value to be read
Lengthdata length in bytes
Return values
BSPstatus

Definition at line 859 of file stm32h747i_discovery_bus.c.

◆ I2C4_WriteReg()

static int32_t I2C4_WriteReg ( uint16_t  DevAddr,
uint16_t  Reg,
uint16_t  MemAddSize,
uint8_t *  pData,
uint16_t  Length 
)
static

Write a value in a register of the device through BUS.

Parameters
DevAddrDevice address on Bus.
MemAddSizeSize of internal memory address
RegThe target register address to write
pDataThe target register value to be written
Lengthdata length in bytes
Return values
BSPstatus

Definition at line 840 of file stm32h747i_discovery_bus.c.

◆ I2C_Compute_PRESC_SCLDEL_SDADEL()

static void I2C_Compute_PRESC_SCLDEL_SDADEL ( uint32_t  clock_src_freq,
uint32_t  I2C_speed 
)
static

Compute PRESC, SCLDEL and SDADEL.

Parameters
clock_src_freqI2C source clock in HZ.
I2C_speedI2C frequency (index).
Return values
None.

Definition at line 610 of file stm32h747i_discovery_bus.c.

◆ I2C_Compute_SCLL_SCLH()

static uint32_t I2C_Compute_SCLL_SCLH ( uint32_t  clock_src_freq,
uint32_t  I2C_speed 
)
static

Calculate SCLL and SCLH and find best configuration.

Parameters
clock_src_freqI2C source clock in HZ.
I2C_speedI2C frequency (index).
Return values
configindex (0 to I2C_VALID_TIMING_NBR], 0xFFFFFFFF for no valid config.

Definition at line 691 of file stm32h747i_discovery_bus.c.

◆ I2C_GetTiming()

static uint32_t I2C_GetTiming ( uint32_t  clock_src_freq,
uint32_t  i2c_freq 
)
static

Compute I2C timing according current I2C clock source and required I2C clock.

Parameters
clock_src_freqI2C clock source in Hz.
i2c_freqRequired I2C clock in Hz.
Return values
I2Ctiming or 0 in case of error.

Definition at line 572 of file stm32h747i_discovery_bus.c.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:09