profet27a 2.0.0.0
|
API for configuring and manipulating PROFET 2 7A Click driver. More...
Topics | |
PROFET 2 7A Registers Settings | |
Settings for registers of PROFET 2 7A Click driver. | |
PROFET 2 7A MikroBUS Map | |
MikroBUS pin mapping of PROFET 2 7A Click driver. | |
Functions | |
void | profet27a_cfg_setup (profet27a_cfg_t *cfg) |
PROFET 2 7A configuration object setup function. | |
err_t | profet27a_init (profet27a_t *ctx, profet27a_cfg_t *cfg) |
PROFET 2 7A initialization function. | |
err_t | profet27a_default_cfg (profet27a_t *ctx) |
PROFET 2 7A default configuration function. | |
err_t | profet27a_read_an_pin_value (profet27a_t *ctx, uint16_t *data_out) |
Read AN pin value function. | |
err_t | profet27a_read_an_pin_voltage (profet27a_t *ctx, float *data_out) |
Read AN pin voltage level function. | |
void | profet27a_set_dsl (profet27a_t *ctx, uint8_t state) |
Set diagnostic select pin state. | |
void | profet27a_set_den (profet27a_t *ctx, uint8_t state) |
Set diagnostic enable pin state. | |
void | profet27a_set_in1 (profet27a_t *ctx, uint8_t state) |
Set channel 1 enable pin state. | |
void | profet27a_set_in0 (profet27a_t *ctx, uint8_t state) |
Set channel 0 enable pin state. | |
err_t | profet27a_set_mode (profet27a_t *ctx, profet27a_channel_t channel, uint8_t mode) |
Set mode device mode for specific channel channel. | |
API for configuring and manipulating PROFET 2 7A Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void profet27a_cfg_setup | ( | profet27a_cfg_t * | cfg | ) |
PROFET 2 7A configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See profet27a_cfg_t object definition for detailed explanation. |
err_t profet27a_default_cfg | ( | profet27a_t * | ctx | ) |
PROFET 2 7A default configuration function.
This function executes a default configuration of PROFET 2 7A click board.
[in] | ctx | : Click context object. See profet27a_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t profet27a_init | ( | profet27a_t * | ctx, |
profet27a_cfg_t * | cfg ) |
PROFET 2 7A initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See profet27a_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See profet27a_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t profet27a_read_an_pin_value | ( | profet27a_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 profet27a_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t profet27a_read_an_pin_voltage | ( | profet27a_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 profet27a_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.void profet27a_set_den | ( | profet27a_t * | ctx, |
uint8_t | state ) |
Set diagnostic enable pin state.
This function set den pin state.
[in] | ctx | : Click context object. See profet27a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
void profet27a_set_dsl | ( | profet27a_t * | ctx, |
uint8_t | state ) |
Set diagnostic select pin state.
This function set dsl pin state.
[in] | ctx | : Click context object. See profet27a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
void profet27a_set_in0 | ( | profet27a_t * | ctx, |
uint8_t | state ) |
Set channel 0 enable pin state.
This function set in0 pin state.
[in] | ctx | : Click context object. See profet27a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
void profet27a_set_in1 | ( | profet27a_t * | ctx, |
uint8_t | state ) |
Set channel 1 enable pin state.
This function set in1 pin state.
[in] | ctx | : Click context object. See profet27a_t object definition for detailed explanation. |
[in] | state | : Pin state. |
err_t profet27a_set_mode | ( | profet27a_t * | ctx, |
profet27a_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 profet27a_t object definition for detailed explanation. |
[in] | channel | : Channel to set. |
[in] | mode | : Mode to set. |
0
- Success, -1
- Error, -2
- Error Channel.