weather 2.0.0.0
|
Functions | |
void | weather_cfg_setup (weather_cfg_t *cfg) |
Config Object Initialization function. More... | |
WEATHER_RETVAL | weather_init (weather_t *ctx, weather_cfg_t *cfg) |
Initialization function. More... | |
void | weather_default_cfg (weather_t *ctx) |
Click Default Configuration function. More... | |
void | weather_generic_write (weather_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | weather_generic_read (weather_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint8_t | weather_get_device_id (weather_t *ctx) |
Device ID. More... | |
void | weather_software_reset (weather_t *ctx) |
Software reset function. More... | |
void | weather_get_ambient_data (weather_t *ctx, weather_data_t *weather_data) |
Weather data. More... | |
void | weather_measurement_cfg (weather_t *ctx, weather_measurement_cfg_t *cfg) |
Measurement config. More... | |
void weather_cfg_setup | ( | weather_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void weather_default_cfg | ( | weather_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Weather click.
void 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 |
@description This function reads data from the desired register.
void 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. |
@description This function writes data to the desired register.
void 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 |
@description Use this function to read the temperature, pressure and humidity data
uint8_t weather_get_device_id | ( | weather_t * | ctx | ) |
Device ID.
ctx | Click object. |
@description You can use this function as a check on click communication with your MCU.
WEATHER_RETVAL weather_init | ( | weather_t * | ctx, |
weather_cfg_t * | cfg | ||
) |
Initialization function.
weather | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void 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 |
@description Use this function to set up new settings
void weather_software_reset | ( | weather_t * | ctx | ) |
Software reset function.
ctx | Click object. |