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_reg_t digipot5_decrement_wiper(digipot5_t *ctx, digipot5_reg_t reg_addr)
Decrement Wiper function.
digipot5_reg_t digipot5_increment_wiper(digipot5_t *ctx, digipot5_reg_t reg_addr)
Increment Wiper function.
digipot5_reg_t
Click register address definition.
Definition: digipot5.h:96
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:112
Click context object definition.
Definition: digipot5.h:120
Definition: digipot5.h:106
Definition: digipot5.h:109
void digipot5_cfg_setup(digipot5_cfg_t *cfg)
Configuration Object Setup function.
pin_name_t sdo
Definition: digipot5.h:138
Definition: digipot5.h:98
Definition: digipot5.h:107
Definition: digipot5.h:110
pin_name_t sdi
Definition: digipot5.h:139
spi_master_t spi
Definition: digipot5.h:126
Definition: digipot5.h:89
Definition: digipot5.h:99
void digipot5_default_cfg(digipot5_t *ctx)
Click Default Configuration function.
pin_name_t rst
Definition: digipot5.h:142
Definition: digipot5.h:111
Definition: digipot5.h:113
Definition: digipot5.h:86
Definition: digipot5.h:104
void digipot5_reset(digipot5_t *ctx)
Reset function.
Click configuration structure definition.
Definition: digipot5.h:133
digipot5_err_t digipot5_generic_read(digipot5_t *ctx, digipot5_reg_t reg_addr, uint16_t *data_out)
Generic Read function.
digipot5_err_t
Click error code definition.
Definition: digipot5.h:84
hal_spi_speed_t spi_speed
Definition: digipot5.h:145
digital_out_t rst
Definition: digipot5.h:123
Definition: digipot5.h:105
Definition: digipot5.h:100
Definition: digipot5.h:87
hal_spi_mode_t spi_mode
Definition: digipot5.h:146
Definition: digipot5.h:88
pin_name_t cs
Definition: digipot5.h:136
digipot5_err_t digipot5_init(digipot5_t *ctx, digipot5_cfg_t *cfg)
Click Initialization function.
Definition: digipot5.h:101
Definition: digipot5.h:103
Definition: digipot5.h:102
pin_name_t sck
Definition: digipot5.h:137