Go to the documentation of this file.
39 #include "drv_spi_master.h"
52 #define DIGIPOT5_RES_ZEROSCALE 0x00
53 #define DIGIPOT5_RES_1KOHM 0x1A
54 #define DIGIPOT5_RES_2KOHM 0x34
55 #define DIGIPOT5_RES_3KOHM 0x4E
56 #define DIGIPOT5_RES_5KOHM_HALFSCALE 0x80
57 #define DIGIPOT5_RES_7KOHM 0xB6
58 #define DIGIPOT5_RES_8KOHM 0xD0
59 #define DIGIPOT5_RES_10KOHM_FULLSCALE 0x100
66 #define DIGIPOT5_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
69 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
70 cfg.sdo = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
71 cfg.sdi = MIKROBUS( mikrobus, MIKROBUS_MOSI )
241 uint16_t *data_out );
276 #endif // _DIGIPOT5_H_
digipot5_err_t digipot5_generic_read(digipot5_t *ctx, digipot5_reg_t reg_addr, uint16_t *data_out)
Generic Read function.
digipot5_err_t digipot5_init(digipot5_t *ctx, digipot5_cfg_t *cfg)
Click Initialization function.
digipot5_reg_t digipot5_increment_wiper(digipot5_t *ctx, digipot5_reg_t reg_addr)
Increment Wiper function.
pin_name_t sdo
Definition: digipot5.h:138
void digipot5_reset(digipot5_t *ctx)
Reset function.
Definition: digipot5.h:89
Definition: digipot5.h:111
Definition: digipot5.h:100
pin_name_t sdi
Definition: digipot5.h:139
Definition: digipot5.h:88
Definition: digipot5.h:101
Click configuration structure definition.
Definition: digipot5.h:133
Definition: digipot5.h:109
Definition: digipot5.h:98
pin_name_t rst
Definition: digipot5.h:142
Click context object definition.
Definition: digipot5.h:120
digipot5_err_t
Click error code definition.
Definition: digipot5.h:84
Definition: digipot5.h:110
Definition: digipot5.h:99
Definition: digipot5.h:107
spi_master_t spi
Definition: digipot5.h:126
void digipot5_cfg_setup(digipot5_cfg_t *cfg)
Configuration Object Setup function.
Definition: digipot5.h:105
Definition: digipot5.h:113
hal_spi_mode_t spi_mode
Definition: digipot5.h:146
Definition: digipot5.h:108
digipot5_err_t digipot5_generic_write(digipot5_t *ctx, digipot5_reg_t reg_addr, uint16_t data_in)
Generic Write function.
Definition: digipot5.h:106
Definition: digipot5.h:112
Definition: digipot5.h:103
Definition: digipot5.h:102
digital_out_t rst
Definition: digipot5.h:123
void digipot5_default_cfg(digipot5_t *ctx)
Click Default Configuration function.
hal_spi_speed_t spi_speed
Definition: digipot5.h:145
Definition: digipot5.h:86
digipot5_reg_t digipot5_decrement_wiper(digipot5_t *ctx, digipot5_reg_t reg_addr)
Decrement Wiper function.
digipot5_reg_t
Click register address definition.
Definition: digipot5.h:96
pin_name_t sck
Definition: digipot5.h:137
Definition: digipot5.h:87
Definition: digipot5.h:104
pin_name_t cs
Definition: digipot5.h:136