Envorimental Monitoring
Loading...
Searching...
No Matches
i2c_core.h
Go to the documentation of this file.
1
17
18#ifndef INC_I2C_CORE_H_
19#define INC_I2C_CORE_H_
20
21#include "stdint.h"
22#include "stm32f4xx_hal.h"
23#include "main.h"
24
39
56float i2c_sensor_read(uint8_t device_address, sensor_t sensor_type,
57 void *p_handle);
58
70uint8_t I2C_ScanDeviceAddress(I2C_HandleTypeDef *hi2c);
71
72#endif /* INC_I2C_CORE_H_ */
float i2c_sensor_read(uint8_t device_address, sensor_t sensor_type, void *p_handle)
Reads a single measurement from the specified I2C sensor.
Definition i2c_core.c:11
uint8_t I2C_ScanDeviceAddress(I2C_HandleTypeDef *hi2c)
Scans the I2C bus for the first responding device.
Definition i2c_core.c:52
sensor_t
Identifies the physical quantity to be read from a sensor.
Definition i2c_core.h:33
@ LIGHT_SENSOR
Definition i2c_core.h:36
@ PRESSURE_SENSOR
Definition i2c_core.h:35
@ HUMIDITY_SENSOR
Definition i2c_core.h:34
@ TEMPERATURE_SENSOR
Definition i2c_core.h:37
: Header for main.c file. This file contains the common defines of the application.