STM32_EVAL_I2C_TSENSOR_Private_Functions
[STM32_EVAL_I2C_TSENSOR]

Functions

void LM75_DeInit (void)
 DeInitializes the LM75_I2C.
static void LM75_DMA_Config (LM75_DMADirection_TypeDef Direction, uint8_t *buffer, uint8_t NumData)
 Configure the DMA Peripheral used to handle communication via I2C.
ErrorStatus LM75_GetStatus (void)
 Checks the LM75 status.
void LM75_Init (void)
 Initializes the LM75_I2C.
uint8_t LM75_ReadConfReg (void)
 Read the configuration register from the LM75.
uint16_t LM75_ReadReg (uint8_t RegName)
 Read the specified register from the LM75.
uint16_t LM75_ReadTemp (void)
 Read Temperature register of LM75: double temperature value.
uint8_t LM75_ShutDown (FunctionalState NewState)
 Enables or disables the LM75.
uint8_t LM75_WriteConfReg (uint8_t RegValue)
 Write to the configuration register of the LM75.
uint8_t LM75_WriteReg (uint8_t RegName, uint16_t RegValue)
 Write to the specified register of the LM75.

Function Documentation

void LM75_DeInit ( void   ) 

DeInitializes the LM75_I2C.

Parameters:
None 
Return values:
None 

Definition at line 124 of file stm32_eval_i2c_tsensor.c.

References LM75_LowLevel_DeInit().

static void LM75_DMA_Config ( LM75_DMADirection_TypeDef  Direction,
uint8_t *  buffer,
uint8_t  NumData 
) [static]
ErrorStatus LM75_GetStatus ( void   ) 

Checks the LM75 status.

Parameters:
None 
Return values:
ErrorStatus,: LM75 Status (ERROR or SUCCESS).

< Clear the LM75_I2C AF flag

< Enable LM75_I2C acknowledgement if it is already disabled by other function

< Send LM75_I2C START condition

< Test on LM75_I2C EV5 and clear it

< EV5

< Send STLM75 slave address for write

Definition at line 224 of file stm32_eval_i2c_tsensor.c.

References ENABLE, ERROR, I2C_AcknowledgeConfig(), I2C_CheckEvent(), I2C_ClearFlag(), I2C_Direction_Transmitter, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED, I2C_FLAG_AF, I2C_FLAG_SB, I2C_GenerateSTART(), I2C_GetFlagStatus(), I2C_Send7bitAddress(), I2C_TIMEOUT, LM75_ADDR, LM75_I2C, and SUCCESS.

Referenced by main().

void LM75_Init ( void   ) 
uint8_t LM75_ReadConfReg ( void   ) 
uint16_t LM75_ReadReg ( uint8_t  RegName  ) 

Read the specified register from the LM75.

Parameters:
RegName,: specifies the LM75 register to be read. This member can be one of the following values:

  • LM75_REG_TEMP: temperature register
  • LM75_REG_TOS: Over-limit temperature register
  • LM75_REG_THYS: Hysteresis temperature register
Return values:
LM75 register value.

< Store LM75_I2C received data

Definition at line 277 of file stm32_eval_i2c_tsensor.c.

References DISABLE, DMA_ClearFlag(), DMA_Cmd(), DMA_GetFlagStatus(), ENABLE, I2C_CheckEvent(), I2C_Direction_Receiver, I2C_Direction_Transmitter, I2C_DMACmd(), I2C_DMALastTransferCmd(), I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED, I2C_FLAG_BTF, I2C_FLAG_BUSY, I2C_FLAG_SB, I2C_FLAG_TXE, I2C_GenerateSTART(), I2C_GenerateSTOP(), I2C_GetFlagStatus(), I2C_Send7bitAddress(), I2C_SendData(), LM75_ADDR, LM75_DMA_Config(), LM75_DMA_RX, LM75_DMA_RX_CHANNEL, LM75_DMA_RX_TCFLAG, LM75_FLAG_TIMEOUT, LM75_I2C, LM75_LONG_TIMEOUT, LM75_Timeout, and LM75_TIMEOUT_UserCallback.

uint16_t LM75_ReadTemp ( void   ) 
uint8_t LM75_ShutDown ( FunctionalState  NewState  ) 
uint8_t LM75_WriteConfReg ( uint8_t  RegValue  ) 
uint8_t LM75_WriteReg ( uint8_t  RegName,
uint16_t  RegValue 
)

Write to the specified register of the LM75.

Parameters:
RegName,: specifies the LM75 register to be written. This member can be one of the following values:

  • LM75_REG_TOS: Over-limit temperature register
  • LM75_REG_THYS: Hysteresis temperature register
RegValue,: value to be written to LM75 register.
Return values:
None 

Definition at line 387 of file stm32_eval_i2c_tsensor.c.

References DISABLE, DMA_ClearFlag(), DMA_Cmd(), DMA_GetFlagStatus(), ENABLE, I2C_CheckEvent(), I2C_Direction_Transmitter, I2C_DMACmd(), I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED, I2C_FLAG_BTF, I2C_FLAG_BUSY, I2C_FLAG_SB, I2C_FLAG_TXE, I2C_GenerateSTART(), I2C_GenerateSTOP(), I2C_GetFlagStatus(), I2C_Send7bitAddress(), I2C_SendData(), LM75_ADDR, LM75_DMA_Config(), LM75_DMA_TX, LM75_DMA_TX_CHANNEL, LM75_DMA_TX_TCFLAG, LM75_FLAG_TIMEOUT, LM75_I2C, LM75_LONG_TIMEOUT, LM75_OK, LM75_Timeout, LM75_TIMEOUT_UserCallback, and RESET.

Referenced by main().

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32