thermo25 2.1.0.0
thermo25.h File Reference

This file contains API for Thermo 25 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"

Go to the source code of this file.

Data Structures

struct  thermo25_t
 Thermo 25 Click context object. More...
 
struct  thermo25_cfg_t
 Thermo 25 Click configuration object. More...
 

Macros

#define THERMO25_MODE_CONTINUOUS   0x00
 Thermo 25 mode select setting.
 
#define THERMO25_MODE_SHUTDOWN   0xFF
 
#define THERMO25_DEVICE_ID   0x900F
 Thermo 25 device ID setting.
 
#define THERMO25_DATA_RESOLUTION   0.03125f
 Thermo 25 temperature data resolution setting.
 
#define THERMO25_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define THERMO25_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define THERMO25_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo25_return_value_t { THERMO25_OK = 0 , THERMO25_ERROR = -1 }
 Thermo 25 Click return value data. More...
 

Functions

void thermo25_cfg_setup (thermo25_cfg_t *cfg)
 Thermo 25 configuration object setup function.
 
err_t thermo25_init (thermo25_t *ctx, thermo25_cfg_t *cfg)
 Thermo 25 initialization function.
 
err_t thermo25_set_mode (thermo25_t *ctx, uint8_t mode)
 Thermo 25 set mode function.
 
err_t thermo25_read_data (thermo25_t *ctx, uint16_t *data_out)
 Thermo 25 read data function.
 
err_t thermo25_check_communication (thermo25_t *ctx)
 Thermo 25 check communication function.
 
err_t thermo25_read_temperature (thermo25_t *ctx, float *temperature)
 Thermo 25 read temperature function.
 

Detailed Description

This file contains API for Thermo 25 Click Driver.

Enumeration Type Documentation

◆ thermo25_return_value_t

Thermo 25 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO25_OK 
THERMO25_ERROR