dcmotor19 2.0.0.0
DC Motor 19 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ dcmotor19_cfg_setup()

void dcmotor19_cfg_setup ( dcmotor19_cfg_t * cfg)

DC Motor 19 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See dcmotor19_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ dcmotor19_disable_standby_mode()

void dcmotor19_disable_standby_mode ( dcmotor19_t * ctx)

DC Motor 19 disable standby mode function.

This function disables the standby mode.

Parameters
[out]ctx: Click context object. See dcmotor19_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ dcmotor19_drive_motor()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ dcmotor19_enable_standby_mode()

void dcmotor19_enable_standby_mode ( dcmotor19_t * ctx)

DC Motor 19 enable standby mode function.

This function enables the standby mode.

Parameters
[out]ctx: Click context object. See dcmotor19_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ dcmotor19_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ dcmotor19_set_channel_mode()

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.

Parameters
[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].
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.