thermo21 2.0.0.0
thermo21.h File Reference

This file contains API for Thermo 21 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  thermo21_t
 Thermo 21 Click context object. More...
 
struct  thermo21_cfg_t
 Thermo 21 Click configuration object. More...
 

Macros

#define THERMO21_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define THERMO21_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define THERMO21_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo21_return_value_t { THERMO21_OK = 0 , THERMO21_ERROR = -1 }
 Thermo 21 Click return value data. More...
 

Functions

void thermo21_cfg_setup (thermo21_cfg_t *cfg)
 Thermo 21 configuration object setup function.
 
err_t thermo21_init (thermo21_t *ctx, thermo21_cfg_t *cfg)
 Thermo 21 initialization function.
 
err_t thermo21_generic_read (thermo21_t *ctx, uint8_t *data_out, uint8_t len)
 Data reading function.
 
err_t thermo21_temperature_read (thermo21_t *ctx, float *data_out)
 Temperature reading function.
 

Detailed Description

This file contains API for Thermo 21 Click Driver.

Enumeration Type Documentation

◆ thermo21_return_value_t

Thermo 21 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO21_OK 
THERMO21_ERROR