Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
47 #include "drv_analog_in.h"
69 #define PROFET23A_MODE_ON 1
70 #define PROFET23A_MODE_OFF 2
71 #define PROFET23A_DIAGNOSTIC_ON 3
72 #define PROFET23A_DIAGNOSTIC_OFF 4
90 #define PROFET23A_MAP_MIKROBUS( cfg, mikrobus ) \
91 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
92 cfg.dsl = MIKROBUS( mikrobus, MIKROBUS_RST ); \
93 cfg.den = MIKROBUS( mikrobus, MIKROBUS_CS ); \
94 cfg.in1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
95 cfg.in0 = MIKROBUS( mikrobus, MIKROBUS_INT )
295 #endif // PROFET23A_H
@ PROFET23A_ERROR
Definition: profet23a.h:144
uint8_t mode
Definition: profet23a.h:113
float vref
Definition: profet23a.h:133
digital_out_t den
Definition: profet23a.h:107
analog_in_t adc
Definition: profet23a.h:111
pin_name_t dsl
Definition: profet23a.h:127
@ PROFET23A_CHANNEL_0
Definition: profet23a.h:155
@ PROFET23A_CHANNEL_1
Definition: profet23a.h:156
digital_out_t in0
Definition: profet23a.h:109
digital_out_t dsl
Definition: profet23a.h:106
PROFET 2 3A Click context object.
Definition: profet23a.h:105
pin_name_t in0
Definition: profet23a.h:130
void profet23a_set_in1(profet23a_t *ctx, uint8_t state)
Set channel 1 enable pin state.
void profet23a_set_den(profet23a_t *ctx, uint8_t state)
Set diagnostic enable pin state.
err_t profet23a_init(profet23a_t *ctx, profet23a_cfg_t *cfg)
PROFET 2 3A initialization function.
uint16_t kilis
Definition: profet23a.h:116
pin_name_t in1
Definition: profet23a.h:129
profet23a_return_value_t
PROFET 2 3A Click return value data.
Definition: profet23a.h:142
err_t profet23a_read_an_pin_value(profet23a_t *ctx, uint16_t *data_out)
Read AN pin value function.
PROFET 2 3A Click configuration object.
Definition: profet23a.h:125
@ PROFET23A_OK
Definition: profet23a.h:143
uint8_t channel
Definition: profet23a.h:114
void profet23a_set_dsl(profet23a_t *ctx, uint8_t state)
Set diagnostic select pin state.
err_t profet23a_set_mode(profet23a_t *ctx, profet23a_channel_t channel, uint8_t mode)
Set mode device mode for specific channel channel.
uint16_t rsens
Definition: profet23a.h:115
digital_out_t in1
Definition: profet23a.h:108
pin_name_t an
Definition: profet23a.h:126
analog_in_resolution_t resolution
Definition: profet23a.h:132
void profet23a_cfg_setup(profet23a_cfg_t *cfg)
PROFET 2 3A configuration object setup function.
pin_name_t den
Definition: profet23a.h:128
@ PROFET23A_ERROR_CHANNEL
Definition: profet23a.h:145
profet23a_channel_t
PROFET 2 3A channel select.
Definition: profet23a.h:154
void profet23a_set_in0(profet23a_t *ctx, uint8_t state)
Set channel 0 enable pin state.
err_t profet23a_read_an_pin_voltage(profet23a_t *ctx, float *data_out)
Read AN pin voltage level function.
err_t profet23a_default_cfg(profet23a_t *ctx)
PROFET 2 3A default configuration function.