TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

Library Functions. More...

Functions

TM_AM2301_Result_t TM_AM2301_Init (TM_AM2301_t *AMStruct, GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Initializes AM2301 sensor. More...
 
TM_AM2301_Result_t TM_AM2301_Read (TM_AM2301_t *AMStruct)
 Reads data from sensor. More...
 

Detailed Description

Library Functions.

Function Documentation

TM_AM2301_Result_t TM_AM2301_Init ( TM_AM2301_t AMStruct,
GPIO_TypeDef *  GPIOx,
uint16_t  GPIO_Pin 
)

Initializes AM2301 sensor.

Parameters
*AMStructPointer to empty TM_AM2301_Data_t data structure
*GPIOxPointer to GPIOx port you will use for your sensor
GPIO_PinGPIO pin used in your port for sensor pin
Return values
TM_AM2301_OK
TM_AM2301_Result_t TM_AM2301_Read ( TM_AM2301_t AMStruct)

Reads data from sensor.

Parameters
*AMStructPointer to TM_AM2301_Data_t data structure to store data into
Return values
Datavalid:
  • TM_AM2301_OK: Data valid
  • Else: Data not valid