speedsense
2.1.0.0
|
API for configuring and manipulating Speed Sense Click driver. More...
Modules | |
Speed Sense MikroBUS Map | |
MikroBUS pin mapping of Speed Sense Click driver. | |
Speedsense_set | |
Functions | |
void | speedsense_cfg_setup (speedsense_cfg_t *cfg) |
Speed Sense configuration object setup function. More... | |
err_t | speedsense_init (speedsense_t *ctx, speedsense_cfg_t *cfg) |
Speed Sense initialization function. More... | |
uint8_t | speedsense_get_speed (speedsense_t *ctx) |
Speed Sense CHA pin reading function. More... | |
uint8_t | speedsense_get_direction (speedsense_t *ctx) |
Speed Sense CHB pin reading function. More... | |
API for configuring and manipulating Speed Sense Click driver.
void speedsense_cfg_setup | ( | speedsense_cfg_t * | cfg | ) |
Speed Sense configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See speedsense_cfg_t object definition for detailed explanation. |
uint8_t speedsense_get_direction | ( | speedsense_t * | ctx | ) |
Speed Sense CHB pin reading function.
This function reads the state of the CHB pin used for direction output protocols of Speed Sens click board.
[in] | ctx | : Click context object. See speedsense_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. uint8_t speedsense_get_speed | ( | speedsense_t * | ctx | ) |
Speed Sense CHA pin reading function.
This function reads the state of the CHA pin used for speed output protocols Speed Sense click board.
[in] | ctx | : Click context object. See speedsense_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t speedsense_init | ( | speedsense_t * | ctx, |
speedsense_cfg_t * | cfg | ||
) |
Speed Sense initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See speedsense_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See speedsense_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.