force2 2.0.0.0
|
API for configuring and manipulating Force 2 Click driver. More...
Topics | |
Force 2 Settings | |
Settings of Force 2 Click driver. | |
Force 2 MikroBUS Map | |
MikroBUS pin mapping of Force 2 Click driver. | |
Functions | |
void | force2_cfg_setup (force2_cfg_t *cfg) |
Force 2 configuration object setup function. | |
err_t | force2_init (force2_t *ctx, force2_cfg_t *cfg) |
Force 2 initialization function. | |
err_t | force2_read_an_pin_value (force2_t *ctx, uint16_t *data_out) |
Force 2 read AN pin value function. | |
err_t | force2_read_an_pin_voltage (force2_t *ctx, float *data_out) |
Force 2 read AN pin voltage level function. | |
API for configuring and manipulating Force 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void force2_cfg_setup | ( | force2_cfg_t * | cfg | ) |
Force 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See force2_cfg_t object definition for detailed explanation. |
err_t force2_init | ( | force2_t * | ctx, |
force2_cfg_t * | cfg ) |
Force 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See force2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See force2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t force2_read_an_pin_value | ( | force2_t * | ctx, |
uint16_t * | data_out ) |
Force 2 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See force2_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t force2_read_an_pin_voltage | ( | force2_t * | ctx, |
float * | data_out ) |
Force 2 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 force2_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.