magneto9 2.0.0.0
|
API for configuring and manipulating Magneto 9 Click driver. More...
Topics | |
Magneto 9 Registers Settings | |
Settings for registers of Magneto 9 Click driver. | |
Magneto 9 MikroBUS Map | |
MikroBUS pin mapping of Magneto 9 Click driver. | |
Functions | |
void | magneto9_cfg_setup (magneto9_cfg_t *cfg) |
Magneto 9 configuration object setup function. | |
err_t | magneto9_init (magneto9_t *ctx, magneto9_cfg_t *cfg) |
Magneto 9 initialization function. | |
err_t | magneto9_read_an_pin_value (magneto9_t *ctx, uint16_t *data_out) |
Magneto 9 read AN pin value function. | |
err_t | magneto9_read_an_pin_voltage (magneto9_t *ctx, float *data_out) |
Magneto 9 read AN pin voltage level function. | |
err_t | magneto9_read_raw_adc (magneto9_t *ctx, uint16_t *raw_adc) |
Magneto 9 read raw ADC function. | |
err_t | magneto9_read_adc_voltage (magneto9_t *ctx, float *voltage) |
Magneto 9 read ADC voltage function. | |
uint8_t | magneto9_get_pwm_pin (magneto9_t *ctx) |
Magneto 9 get PWM pin function. | |
API for configuring and manipulating Magneto 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void magneto9_cfg_setup | ( | magneto9_cfg_t * | cfg | ) |
Magneto 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See magneto9_cfg_t object definition for detailed explanation. |
uint8_t magneto9_get_pwm_pin | ( | magneto9_t * | ctx | ) |
Magneto 9 get PWM pin function.
This function returns the PWM pin logic state.
[in] | ctx | : Click context object. See magneto9_t object definition for detailed explanation. |
err_t magneto9_init | ( | magneto9_t * | ctx, |
magneto9_cfg_t * | cfg ) |
Magneto 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See magneto9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See magneto9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t magneto9_read_adc_voltage | ( | magneto9_t * | ctx, |
float * | voltage ) |
Magneto 9 read ADC voltage function.
This function reads raw 12-bit ADC data and converts it to voltage by using I2C serial interface.
[in] | ctx | : Click context object. See magneto9_t object definition for detailed explanation. |
[out] | voltage | : Calculated ADC voltage. |
0
- Success, -1
- Error.err_t magneto9_read_an_pin_value | ( | magneto9_t * | ctx, |
uint16_t * | data_out ) |
Magneto 9 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See magneto9_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t magneto9_read_an_pin_voltage | ( | magneto9_t * | ctx, |
float * | data_out ) |
Magneto 9 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 magneto9_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t magneto9_read_raw_adc | ( | magneto9_t * | ctx, |
uint16_t * | raw_adc ) |
Magneto 9 read raw ADC function.
This function reads raw 12-bit ADC data by using I2C serial interface.
[in] | ctx | : Click context object. See magneto9_t object definition for detailed explanation. |
[out] | raw_adc | : Raw ADC read data. |
0
- Success, -1
- Error.