dcmotor19 2.0.0.0
|
API for configuring and manipulating DC Motor 19 Click driver. More...
Topics | |
DC Motor 19 Settings | |
Settings of DC Motor 19 Click driver. | |
DC Motor 19 MikroBUS Map | |
MikroBUS pin mapping of DC Motor 19 Click driver. | |
Functions | |
void | dcmotor19_cfg_setup (dcmotor19_cfg_t *cfg) |
DC Motor 19 configuration object setup function. | |
err_t | dcmotor19_init (dcmotor19_t *ctx, dcmotor19_cfg_t *cfg) |
DC Motor 19 initialization function. | |
err_t | dcmotor19_drive_motor (dcmotor19_t *ctx, uint8_t speed, uint32_t time_ms) |
DC Motor 19 drive motor function. | |
err_t | dcmotor19_set_channel_mode (dcmotor19_t *ctx, uint8_t channel, uint8_t mode) |
DC Motor 19 set channel mode function. | |
void | dcmotor19_disable_standby_mode (dcmotor19_t *ctx) |
DC Motor 19 disable standby mode function. | |
void | dcmotor19_enable_standby_mode (dcmotor19_t *ctx) |
DC Motor 19 enable standby mode function. | |
API for configuring and manipulating DC Motor 19 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void dcmotor19_cfg_setup | ( | dcmotor19_cfg_t * | cfg | ) |
DC Motor 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dcmotor19_cfg_t object definition for detailed explanation. |
void dcmotor19_disable_standby_mode | ( | dcmotor19_t * | ctx | ) |
DC Motor 19 disable standby mode function.
This function disables the standby mode.
[out] | ctx | : Click context object. See dcmotor19_t object definition for detailed explanation. |
err_t dcmotor19_drive_motor | ( | dcmotor19_t * | ctx, |
uint8_t | speed, | ||
uint32_t | time_ms ) |
DC Motor 19 drive motor function.
This function drives the motor for a certian time specified by time_ms at the desired speed. The motor channel and mode must be previously selected using the dcmotor19_set_channel_mode function.
[out] | ctx | : Click context object. See dcmotor19_t object definition for detailed explanation. |
[in] | speed | : Motor speed level [1-100]. |
[in] | time_ms | : Driving time in miliseconds. |
0
- Success, -1
- Error.void dcmotor19_enable_standby_mode | ( | dcmotor19_t * | ctx | ) |
DC Motor 19 enable standby mode function.
This function enables the standby mode.
[out] | ctx | : Click context object. See dcmotor19_t object definition for detailed explanation. |
err_t dcmotor19_init | ( | dcmotor19_t * | ctx, |
dcmotor19_cfg_t * | cfg ) |
DC Motor 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dcmotor19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dcmotor19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t dcmotor19_set_channel_mode | ( | dcmotor19_t * | ctx, |
uint8_t | channel, | ||
uint8_t | mode ) |
DC Motor 19 set channel mode function.
This function sets the active channel and mode which will be used by the dcmotor19_drive_motor function.
[out] | ctx | : Click context object. See dcmotor19_t object definition for detailed explanation. |
[in] | channel | : Active channel selection [1-3]. |
[in] | mode | : Mode selection [0-2]. |
0
- Success, -1
- Error.