ultralowpress 2.0.0.0
ultralowpress.h File Reference

This file contains API for Ultra-Low Press Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  ultralowpress_t
 Ultra-Low Press Click context object. More...
 
struct  ultralowpress_cfg_t
 Ultra-Low Press Click configuration object. More...
 

Macros

#define ULTRALOWPRESS_REG_CMD   0x22
 Ultra-Low Press description register.
 
#define ULTRALOWPRESS_REG_TEMP   0x2E
 
#define ULTRALOWPRESS_REG_PRESS   0x30
 
#define ULTRALOWPRESS_REG_STATUS_SYNC   0x32
 
#define ULTRALOWPRESS_REG_STATUS   0x36
 
#define ULTRALOWPRESS_REG_SERIAL_NUM_L   0x50
 
#define ULTRALOWPRESS_REG_SERIAL_NUM_H   0x52
 
#define ULTRALOWPRESS_REG_CMD_SLEEP   0x6C32
 Ultra-Low Press description setting.
 
#define ULTRALOWPRESS_REG_CMD_RESET   0xB169
 
#define ULTRALOWPRESS_STATUS_CLEAR   0xFFFF
 
#define ULTRALOWPRESS_SET_DEV_ADDR   0x6C
 Ultra-Low Press device address setting.
 
#define ULTRALOWPRESS_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ultralowpress_return_value_t { ULTRALOWPRESS_OK = 0 , ULTRALOWPRESS_ERROR = -1 }
 Ultra-Low Press Click return value data. More...
 

Functions

void ultralowpress_cfg_setup (ultralowpress_cfg_t *cfg)
 Ultra-Low Press configuration object setup function.
 
err_t ultralowpress_init (ultralowpress_t *ctx, ultralowpress_cfg_t *cfg)
 Ultra-Low Press initialization function.
 
err_t ultralowpress_generic_write (ultralowpress_t *ctx, uint8_t reg, uint16_t tx_data)
 Writing function.
 
err_t ultralowpress_generic_read (ultralowpress_t *ctx, uint8_t reg, uint16_t *rx_data)
 Reading function.
 
void ultralowpress_clear_status (ultralowpress_t *ctx)
 Clear status.
 
uint8_t ultralowpress_ready_to_read (ultralowpress_t *ctx)
 Ready to read.
 
float ultralowpress_get_press (ultralowpress_t *ctx)
 Read pressure.
 
float ultralowpress_get_temp (ultralowpress_t *ctx)
 Read temperature.
 

Detailed Description

This file contains API for Ultra-Low Press Click Driver.

Enumeration Type Documentation

◆ ultralowpress_return_value_t

Ultra-Low Press Click return value data.

Predefined enum values for driver return values.

Enumerator
ULTRALOWPRESS_OK 
ULTRALOWPRESS_ERROR