31 #define TM_AM2301_H 130
114 #include "stm32f4xx.h"
116 #include "tm_stm32f4_delay.h"
117 #include "tm_stm32f4_gpio.h"
129 #define AM2301_PORT GPIOD
130 #define AM2301_PIN GPIO_PIN_1
134 #define AM2301_PIN_LOW TM_GPIO_SetPinLow(AM2301_PORT, AM2301_PIN)
135 #define AM2301_PIN_HIGH TM_GPIO_SetPinHigh(AM2301_PORT, AM2301_PIN)
136 #define AM2301_PIN_IN TM_GPIO_SetPinAsInput(AM2301_PORT, AM2301_PIN)
137 #define AM2301_PIN_OUT TM_GPIO_SetPinAsOutput(AM2301_PORT, AM2301_PIN)
138 #define AM2301_PIN_READ TM_GPIO_GetInputPinValue(AM2301_PORT, AM2301_PIN)
TM_AM2301_t TM_AM2301_Read(TM_AM2301_Data_t *data)
Reads data from sensor.
Definition: tm_stm32f4_am2301.h:157
Definition: tm_stm32f4_am2301.h:158
Definition: tm_stm32f4_am2301.h:161
AM2301 main data structure.
Definition: tm_stm32f4_am2301.h:170
Definition: tm_stm32f4_am2301.h:163
int16_t Temp
Definition: tm_stm32f4_am2301.h:171
uint16_t Hum
Definition: tm_stm32f4_am2301.h:173
Definition: tm_stm32f4_am2301.h:160
TM_AM2301_t TM_AM2301_Init(void)
Initializes AM2301 sensor.
Definition: tm_stm32f4_am2301.h:162
TM_AM2301_t
Definition: tm_stm32f4_am2301.h:156
Definition: tm_stm32f4_am2301.h:164
Definition: tm_stm32f4_am2301.h:159