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 LOADCELL7_NUM_CONVERSIONS 80
84#define LOADCELL7_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
85#define LOADCELL7_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
103#define LOADCELL7_MAP_MIKROBUS( cfg, mikrobus ) \
104 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
105 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
106 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
107 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS );
void loadcell7_disable_device(loadcell7_t *ctx)
Load Cell 7 disable device function.
err_t loadcell7_tare_scale(loadcell7_t *ctx)
Load Cell 7 tare scale function.
err_t loadcell7_calibrate_weight(loadcell7_t *ctx, float cal_weight)
Load Cell 7 calibrate weight function.
err_t loadcell7_init(loadcell7_t *ctx, loadcell7_cfg_t *cfg)
Load Cell 7 initialization function.
void loadcell7_cfg_setup(loadcell7_cfg_t *cfg)
Load Cell 7 configuration object setup function.
err_t loadcell7_read_raw_adc(loadcell7_t *ctx, int32_t *data_out)
Load Cell 7 read raw adc function.
err_t loadcell7_get_weight(loadcell7_t *ctx, float *weight)
Load Cell 7 get weight function.
void loadcell7_enable_device(loadcell7_t *ctx)
Load Cell 7 enable device function.
loadcell7_return_value_t
Load Cell 7 Click return value data.
Definition loadcell7.h:152
@ LOADCELL7_OK
Definition loadcell7.h:153
@ LOADCELL7_ERROR
Definition loadcell7.h:154
This file contains SPI specific macros, functions, etc.
Load Cell 7 Click configuration object.
Definition loadcell7.h:134
pin_name_t sck
Definition loadcell7.h:138
spi_master_mode_t spi_mode
Definition loadcell7.h:143
pin_name_t mosi
Definition loadcell7.h:137
uint32_t spi_speed
Definition loadcell7.h:142
pin_name_t miso
Definition loadcell7.h:136
pin_name_t cs
Definition loadcell7.h:139
Load Cell 7 Click context object.
Definition loadcell7.h:117
digital_out_t cs
Definition loadcell7.h:119
spi_master_t spi
Definition loadcell7.h:122
digital_in_t miso
Definition loadcell7.h:118
float weight_scale
Definition loadcell7.h:125
int32_t tare_scale
Definition loadcell7.h:124