Go to the documentation of this file.
42 #ifdef PREINIT_SUPPORTED
46 #ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52 #include "drv_digital_out.h"
53 #include "drv_digital_in.h"
54 #include "drv_i2c_master.h"
67 #define BUCK6_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
69 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
70 cfg.en = MIKROBUS( mikrobus, MIKROBUS_AN ); \
71 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
72 cfg.syn = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
80 #define BUCK6_RETVAL uint8_t
83 #define BUCK6_INIT_ERROR 0xFF
90 #define BUCK6_MAX_RANGE_1000mV 0xFA
91 #define BUCK6_MAX_RANGE_1500mV 0xF4
92 #define BUCK6_MAX_RANGE_2000mV 0xF1
93 #define BUCK6_MAX_RANGE_2500mV 0xEE
94 #define BUCK6_MAX_RANGE_3000mV 0xEA
95 #define BUCK6_MAX_RANGE_3500mV 0xE7
96 #define BUCK6_MAX_RANGE_4000mV 0xE4
97 #define BUCK6_MAX_RANGE_4500mV 0xE1
98 #define BUCK6_MAX_RANGE_5000mV 0xDE
99 #define BUCK6_MAX_RANGE_5500mV 0xDB
101 #define BUCK6_MAX_RANGE_6000mV 0xD8
102 #define BUCK6_MAX_RANGE_6500mV 0xD4
103 #define BUCK6_MAX_RANGE_7000mV 0xD1
104 #define BUCK6_MAX_RANGE_7500mV 0xCF
105 #define BUCK6_MAX_RANGE_8000mV 0xCB
106 #define BUCK6_MAX_RANGE_8500mV 0xC8
107 #define BUCK6_MAX_RANGE_9000mV 0xC5
108 #define BUCK6_MAX_RANGE_9500mV 0xC2
109 #define BUCK6_MAX_RANGE_10000mV 0xBF
110 #define BUCK6_MAX_RANGE_10500mV 0xBC
111 #define BUCK6_MAX_RANGE_11000mV 0xB9
112 #define BUCK6_MAX_RANGE_11500mV 0xB6
113 #define BUCK6_MAX_RANGE_12000mV 0xB2
114 #define BUCK6_MAX_RANGE_12500mV 0xAF
116 #define BUCK6_MAX_RANGE_13000mV 0xAB
117 #define BUCK6_MAX_RANGE_13500mV 0xA9
118 #define BUCK6_MAX_RANGE_14000mV 0xA6
119 #define BUCK6_MAX_RANGE_14500mV 0xA3
120 #define BUCK6_MAX_RANGE_15000mV 0xA0
121 #define BUCK6_MAX_RANGE_15500mV 0x9C
122 #define BUCK6_MAX_RANGE_16000mV 0x99
123 #define BUCK6_MAX_RANGE_16500mV 0x96
124 #define BUCK6_MAX_RANGE_17000mV 0x93
125 #define BUCK6_MAX_RANGE_17500mV 0x90
126 #define BUCK6_MAX_RANGE_18000mV 0x8D
127 #define BUCK6_MAX_RANGE_18500mV 0x8A
128 #define BUCK6_MAX_RANGE_19000mV 0x87
129 #define BUCK6_MAX_RANGE_19500mV 0x84
130 #define BUCK6_MAX_RANGE_20000mV 0x80
137 #define BUCK6_SLEEP_MODE 0x00
144 #define BUCK6_ACTIVE_MODE 0x01
uint8_t buck6_get_rst(buck6_t *ctx)
uint8_t i2c_address
Definition: buck6.h:197
pin_name_t rst
Definition: buck6.h:191
BUCK6_RETVAL buck6_init(buck6_t *ctx, buck6_cfg_t *cfg)
Initialization function.
void buck6_generic_read(buck6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
pin_name_t sda
Definition: buck6.h:186
Click ctx object definition.
Definition: buck6.h:158
void buck6_set_mode(buck6_t *ctx, uint8_t mode)
Set mode.
pin_name_t en
Definition: buck6.h:190
void buck6_cfg_setup(buck6_cfg_t *cfg)
Config Object Initialization function.
void buck6_generic_write(buck6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
digital_out_t syn
Definition: buck6.h:162
#define BUCK6_RETVAL
Definition: buck6.h:80
digital_out_t en
Definition: buck6.h:161
uint32_t i2c_speed
Definition: buck6.h:196
i2c_master_t i2c
Definition: buck6.h:170
digital_in_t rst
Definition: buck6.h:166
pin_name_t syn
Definition: buck6.h:192
void buck6_set_max_voltage(buck6_t *ctx, uint8_t voltage)
Set maximum voltage.
uint8_t slave_address
Definition: buck6.h:174
Click configuration structure definition.
Definition: buck6.h:182
pin_name_t scl
Definition: buck6.h:185