39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_spi_master.h"
74#define BAROMETER7_CMD_TRIGGER_TEST_MODE 0x0C
75#define BAROMETER7_CMD_RESET_BIT_MASK 0x10
76#define BAROMETER7_CMD_ACQUIRE_PRESSURE 0x20
77#define BAROMETER7_CMD_ACQUIRE_TEMPERATURE 0x40
78#define BAROMETER7_CMD_TRIGGER_DIAGNOSIS 0x80
79#define BAROMETER7_CMD_ACQUIRE_IDENTIFIER 0xE0
101#define BAROMETER7_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
102#define BAROMETER7_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
120#define BAROMETER7_MAP_MIKROBUS( cfg, mikrobus ) \
121 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
122 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
123 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
124 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
barometer7_return_value_t
Barometer 7 Click return value data.
Definition barometer7.h:182
@ BAROMETER7_ERROR
Definition barometer7.h:184
@ BAROMETER7_OK
Definition barometer7.h:183
@ BAROMETER7_CMD_ERROR
Definition barometer7.h:185
barometer7_diagnosis_code_t
Barometer 7 Click diagnosis code data.
Definition barometer7.h:194
@ BAROMETER7_ACQUISITION_CHAIN_FAILURE
Definition barometer7.h:196
@ BAROMETER7_NO_ERROR
Definition barometer7.h:200
@ BAROMETER7_PRESSURE_OUT_OF_RANGE_LOW
Definition barometer7.h:199
@ BAROMETER7_SENSOR_CELL_FAILURE
Definition barometer7.h:197
@ BAROMETER7_EEPROM_FEC_ERROR
Definition barometer7.h:195
@ BAROMETER7_PRESSURE_OUT_OF_RANGE_HIGH
Definition barometer7.h:198
err_t barometer7_get_pressure(barometer7_t *ctx, float *pressure)
Barometer 7 get pressure function.
err_t barometer7_generic_transfer(barometer7_t *ctx, uint8_t cmd, uint16_t *data_out)
Barometer 7 data transfer function.
err_t barometer7_trigger_test_mode(barometer7_t *ctx, uint16_t *tdm_data)
Barometer 7 get trigger test mode data function.
err_t barometer7_get_identifier(barometer7_t *ctx, barometer7_identifier_t *identifier)
Barometer 7 get identifier function.
err_t barometer7_set_reset(barometer7_t *ctx, uint8_t cmd, uint16_t *data_out)
Barometer 7 set reset function.
err_t barometer7_get_temp_data(barometer7_t *ctx, uint16_t *temp_data)
Barometer 7 get temperature data function.
err_t barometer7_get_id_data(barometer7_t *ctx, uint16_t *id_data)
Barometer 7 get ID data function.
err_t barometer7_set_command(barometer7_t *ctx, uint8_t cmd, uint16_t *data_out)
Barometer 7 set command function.
err_t barometer7_get_press_data(barometer7_t *ctx, uint16_t *press_data)
Barometer 7 get pressure data function.
err_t barometer7_get_temperature(barometer7_t *ctx, float *temperature)
Barometer 7 get temperature function.
err_t barometer7_default_cfg(barometer7_t *ctx)
Barometer 7 default configuration function.
err_t barometer7_init(barometer7_t *ctx, barometer7_cfg_t *cfg)
Barometer 7 initialization function.
void barometer7_cfg_setup(barometer7_cfg_t *cfg)
Barometer 7 configuration object setup function.
err_t barometer7_get_trigger_diagnosis_data(barometer7_t *ctx, uint16_t *td_data)
Barometer 7 get trigger diagnosis data function.
This file contains SPI specific macros, functions, etc.
Barometer 7 Click configuration object.
Definition barometer7.h:150
spi_master_chip_select_polarity_t cs_polarity
Definition barometer7.h:160
pin_name_t sck
Definition barometer7.h:154
spi_master_mode_t spi_mode
Definition barometer7.h:159
pin_name_t mosi
Definition barometer7.h:153
uint32_t spi_speed
Definition barometer7.h:158
pin_name_t miso
Definition barometer7.h:152
pin_name_t cs
Definition barometer7.h:155
Barometer 7 Click response structure for identifier.
Definition barometer7.h:169
uint8_t supplier
Definition barometer7.h:170
uint8_t metal_version
Definition barometer7.h:172
uint8_t silicon_version
Definition barometer7.h:171
uint8_t asic_name
Definition barometer7.h:173
Barometer 7 Click context object.
Definition barometer7.h:134
spi_master_t spi
Definition barometer7.h:136
uint8_t diagnosis
Definition barometer7.h:140
uint8_t parity
Definition barometer7.h:141
pin_name_t chip_select
Definition barometer7.h:138