speedsense 2.1.0.0
|
API for configuring and manipulating Speed Sense Click driver. More...
Topics | |
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. | |
err_t | speedsense_init (speedsense_t *ctx, speedsense_cfg_t *cfg) |
Speed Sense initialization function. | |
uint8_t | speedsense_get_speed (speedsense_t *ctx) |
Speed Sense CHA pin reading function. | |
uint8_t | speedsense_get_direction (speedsense_t *ctx) |
Speed Sense CHB pin reading function. | |
API for configuring and manipulating Speed Sense Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
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.