weather 2.0.0.0
|
Functions | |
void | weather_cfg_setup (weather_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | weather_init (weather_t *ctx, weather_cfg_t *cfg) |
Initialization function. | |
err_t | weather_default_cfg (weather_t *ctx) |
Click Default Configuration function. | |
err_t | weather_generic_write (weather_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
err_t | weather_generic_read (weather_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
err_t | weather_get_device_id (weather_t *ctx, uint8_t *device_id) |
Device ID. | |
err_t | weather_software_reset (weather_t *ctx) |
Software reset function. | |
err_t | weather_get_ambient_data (weather_t *ctx, weather_data_t *weather_data) |
Weather data. | |
err_t | weather_measurement_cfg (weather_t *ctx, weather_measurement_cfg_t *cfg) |
Measurement config. | |
void weather_cfg_setup | ( | weather_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
err_t weather_default_cfg | ( | weather_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Weather click.
err_t weather_generic_read | ( | weather_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
This function reads data from the desired register.
err_t weather_generic_write | ( | weather_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
This function writes data to the desired register.
err_t weather_get_ambient_data | ( | weather_t * | ctx, |
weather_data_t * | weather_data ) |
Weather data.
ctx | Click object. |
weather_data | Structure that contains info about weather data |
Use this function to read the temperature, pressure and humidity data
err_t weather_get_device_id | ( | weather_t * | ctx, |
uint8_t * | device_id ) |
Device ID.
ctx | Click object. |
device_id | (8 bit) Device ID - 0x60 - default |
You can use this function as a check on click communication with your MCU.
err_t weather_init | ( | weather_t * | ctx, |
weather_cfg_t * | cfg ) |
Initialization function.
weather | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
err_t weather_measurement_cfg | ( | weather_t * | ctx, |
weather_measurement_cfg_t * | cfg ) |
Measurement config.
ctx | Click object. |
cfg | Structure that contains info about new measurement data for settings |
Use this function to set up new settings
err_t weather_software_reset | ( | weather_t * | ctx | ) |
Software reset function.
ctx | Click object. |