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"
68#define POWERMUX2_MAP_MIKROBUS( cfg, mikrobus ) \
69 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
70 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
71 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
72 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
err_t powermux2_generic_write(powermux2_t *ctx, uint8_t data_in)
Power MUX 2 data writing function.
err_t powermux2_init(powermux2_t *ctx, powermux2_cfg_t *cfg)
Power MUX 2 initialization function.
void powermux2_cfg_setup(powermux2_cfg_t *cfg)
Power MUX 2 configuration object setup function.
err_t powermux2_set_resistance(powermux2_t *ctx, float resistance)
Power MUX 2 set resistance function.
powermux2_return_value_t
Power MUX 2 Click return value data.
Definition powermux2.h:116
@ POWERMUX2_OK
Definition powermux2.h:117
@ POWERMUX2_ERROR
Definition powermux2.h:118
Power MUX 2 Click configuration object.
Definition powermux2.h:95
spi_master_chip_select_polarity_t cs_polarity
Definition powermux2.h:107
pin_name_t sck
Definition powermux2.h:100
spi_master_mode_t spi_mode
Definition powermux2.h:106
pin_name_t mosi
Definition powermux2.h:99
uint32_t spi_speed
Definition powermux2.h:105
pin_name_t miso
Definition powermux2.h:98
pin_name_t cs
Definition powermux2.h:101
Power MUX 2 Click context object.
Definition powermux2.h:81
spi_master_t spi
Definition powermux2.h:84
pin_name_t chip_select
Definition powermux2.h:86