profet23a 2.0.0.0
|
API for configuring and manipulating PROFET 2 3A Click driver. More...
Topics | |
PROFET 2 3A Registers Settings | |
Settings for registers of PROFET 2 3A Click driver. | |
PROFET 2 3A MikroBUS Map | |
MikroBUS pin mapping of PROFET 2 3A Click driver. | |
Functions | |
void | profet23a_cfg_setup (profet23a_cfg_t *cfg) |
PROFET 2 3A configuration object setup function. | |
err_t | profet23a_init (profet23a_t *ctx, profet23a_cfg_t *cfg) |
PROFET 2 3A initialization function. | |
err_t | profet23a_default_cfg (profet23a_t *ctx) |
PROFET 2 3A default configuration function. | |
err_t | profet23a_read_an_pin_value (profet23a_t *ctx, uint16_t *data_out) |
Read AN pin value function. | |
err_t | profet23a_read_an_pin_voltage (profet23a_t *ctx, float *data_out) |
Read AN pin voltage level function. | |
void | profet23a_set_dsl (profet23a_t *ctx, uint8_t state) |
Set diagnostic select pin state. | |
void | profet23a_set_den (profet23a_t *ctx, uint8_t state) |
Set diagnostic enable pin state. | |
void | profet23a_set_in1 (profet23a_t *ctx, uint8_t state) |
Set channel 1 enable pin state. | |
void | profet23a_set_in0 (profet23a_t *ctx, uint8_t state) |
Set channel 0 enable 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. | |
API for configuring and manipulating PROFET 2 3A Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void profet23a_cfg_setup | ( | profet23a_cfg_t * | cfg | ) |
PROFET 2 3A configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See profet23a_cfg_t object definition for detailed explanation. |
err_t profet23a_default_cfg | ( | profet23a_t * | ctx | ) |
PROFET 2 3A default configuration function.
This function executes a default configuration of PROFET 2 3A click board.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t profet23a_init | ( | profet23a_t * | ctx, |
profet23a_cfg_t * | cfg ) |
PROFET 2 3A initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See profet23a_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t profet23a_read_an_pin_value | ( | profet23a_t * | ctx, |
uint16_t * | data_out ) |
Read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t profet23a_read_an_pin_voltage | ( | profet23a_t * | ctx, |
float * | data_out ) |
Read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.void profet23a_set_den | ( | profet23a_t * | ctx, |
uint8_t | state ) |
Set diagnostic enable pin state.
This function set den pin state.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
void profet23a_set_dsl | ( | profet23a_t * | ctx, |
uint8_t | state ) |
Set diagnostic select pin state.
This function set dsl pin state.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
void profet23a_set_in0 | ( | profet23a_t * | ctx, |
uint8_t | state ) |
Set channel 0 enable pin state.
This function set in0 pin state.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
void profet23a_set_in1 | ( | profet23a_t * | ctx, |
uint8_t | state ) |
Set channel 1 enable pin state.
This function set in1 pin state.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[in] | state | : 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.
This function sets DEN, DSL INx pins state to set device in selected mode for selected channel.
[in] | ctx | : Click context object. See profet23a_t object definition for detailed explanation. |
[in] | channel | : Channel to set. |
[in] | mode | : Mode to set. |
0
- Success, -1
- Error, -2
- Error Channel.