zerocross 2.1.0.0
|
API for configuring and manipulating Zero-Cross Click driver. More...
Topics | |
Zero-Cross Registers Settings | |
Settings for registers of Zero-Cross Click driver. | |
Zero-Cross MikroBUS Map | |
MikroBUS pin mapping of Zero-Cross Click driver. | |
Functions | |
void | zerocross_cfg_setup (zerocross_cfg_t *cfg) |
Zero-Cross configuration object setup function. | |
err_t | zerocross_init (zerocross_t *ctx, zerocross_cfg_t *cfg) |
Zero-Cross initialization function. | |
uint8_t | zerocross_pin_read (zerocross_t *ctx) |
Zero-Cross pin reading function. | |
void | zerocross_get_freq (zerocross_t *ctx, float *freq) |
Zero-Cross frequency reading function. | |
API for configuring and manipulating Zero-Cross Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void zerocross_cfg_setup | ( | zerocross_cfg_t * | cfg | ) |
Zero-Cross configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See zerocross_cfg_t object definition for detailed explanation. |
void zerocross_get_freq | ( | zerocross_t * | ctx, |
float * | freq ) |
Zero-Cross frequency reading function.
This function reads the frequency of the Zero-Cross click board.
[in] | ctx | : Click context object. See zerocross_t object definition for detailed explanation. |
[out] | freq | : Read frequency. |
err_t zerocross_init | ( | zerocross_t * | ctx, |
zerocross_cfg_t * | cfg ) |
Zero-Cross initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See zerocross_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See zerocross_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t zerocross_pin_read | ( | zerocross_t * | ctx | ) |
Zero-Cross pin reading function.
This function reads the state of the ZC pin of Zero-Cross click board.
[in] | ctx | : Click context object. See zerocross_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state.