dcmotor13 2.0.0.0
|
API for configuring and manipulating DC Motor 13 Click driver. More...
Topics | |
DC Motor 13 Registers List | |
List of registers of DC Motor 13 Click driver. | |
DC Motor 13 Registers Settings | |
Settings for registers of DC Motor 13 Click driver. | |
DC Motor 13 MikroBUS Map | |
MikroBUS pin mapping of DC Motor 13 Click driver. | |
Functions | |
void | dcmotor13_cfg_setup (dcmotor13_cfg_t *cfg) |
DC Motor 13 configuration object setup function. | |
err_t | dcmotor13_init (dcmotor13_t *ctx, dcmotor13_cfg_t *cfg) |
DC Motor 13 initialization function. | |
err_t | dcmotor13_default_cfg (dcmotor13_t *ctx) |
DC Motor 13 default configuration function. | |
err_t | dcmotor13_write_register (dcmotor13_t *ctx, uint8_t reg, uint8_t data_in) |
DC Motor 13 write register function. | |
err_t | dcmotor13_read_register (dcmotor13_t *ctx, uint8_t reg, uint8_t *data_out) |
DC Motor 13 read register function. | |
void | dcmotor13_enable_device (dcmotor13_t *ctx) |
DC Motor 13 enable device function. | |
void | dcmotor13_disable_device (dcmotor13_t *ctx) |
DC Motor 13 disable device function. | |
void | dcmotor13_reset_device (dcmotor13_t *ctx) |
DC Motor 13 reset device function. | |
uint8_t | dcmotor13_get_int_pin (dcmotor13_t *ctx) |
DC Motor 13 get int pin function. | |
void | dcmotor13_set_ai1_pin (dcmotor13_t *ctx, uint8_t state) |
DC Motor 13 set AI1 pin function. | |
void | dcmotor13_set_bi1_pin (dcmotor13_t *ctx, uint8_t state) |
DC Motor 13 set BI1 pin function. | |
err_t | dcmotor13_get_lo_pin (dcmotor13_t *ctx, uint8_t *pin_state) |
DC Motor 13 get LO pin function. | |
err_t | dcmotor13_set_outa_mode (dcmotor13_t *ctx, uint8_t mode) |
DC Motor 13 set OUTA mode function. | |
err_t | dcmotor13_set_outb_mode (dcmotor13_t *ctx, uint8_t mode) |
DC Motor 13 set OUTB mode function. | |
err_t | dcmotor13_set_outa_torque (dcmotor13_t *ctx, uint8_t torque) |
DC Motor 13 set OUTA torque function. | |
err_t | dcmotor13_set_outb_torque (dcmotor13_t *ctx, uint8_t torque) |
DC Motor 13 set OUTB torque function. | |
API for configuring and manipulating DC Motor 13 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void dcmotor13_cfg_setup | ( | dcmotor13_cfg_t * | cfg | ) |
DC Motor 13 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dcmotor13_cfg_t object definition for detailed explanation. |
err_t dcmotor13_default_cfg | ( | dcmotor13_t * | ctx | ) |
DC Motor 13 default configuration function.
This function executes a default configuration of DC Motor 13 click board.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor13_disable_device | ( | dcmotor13_t * | ctx | ) |
DC Motor 13 disable device function.
This function disables the device by setting the SLP pin to low logic state.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
void dcmotor13_enable_device | ( | dcmotor13_t * | ctx | ) |
DC Motor 13 enable device function.
This function enables the device by setting the SLP pin to high logic state.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
uint8_t dcmotor13_get_int_pin | ( | dcmotor13_t * | ctx | ) |
DC Motor 13 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
err_t dcmotor13_get_lo_pin | ( | dcmotor13_t * | ctx, |
uint8_t * | pin_state ) |
DC Motor 13 get LO pin function.
This function reads the LO pin logic state.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[out] | pin_state | : LO pin logic state. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor13_init | ( | dcmotor13_t * | ctx, |
dcmotor13_cfg_t * | cfg ) |
DC Motor 13 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dcmotor13_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor13_read_register | ( | dcmotor13_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
DC Motor 13 read register function.
This function reads data from the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor13_reset_device | ( | dcmotor13_t * | ctx | ) |
DC Motor 13 reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
void dcmotor13_set_ai1_pin | ( | dcmotor13_t * | ctx, |
uint8_t | state ) |
DC Motor 13 set AI1 pin function.
This function sets the AI1 pin logic state.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void dcmotor13_set_bi1_pin | ( | dcmotor13_t * | ctx, |
uint8_t | state ) |
DC Motor 13 set BI1 pin function.
This function sets the BI1 pin logic state.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t dcmotor13_set_outa_mode | ( | dcmotor13_t * | ctx, |
uint8_t | mode ) |
DC Motor 13 set OUTA mode function.
This function sets the OUTA mode.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor13_set_outa_torque | ( | dcmotor13_t * | ctx, |
uint8_t | torque ) |
DC Motor 13 set OUTA torque function.
This function sets the OUTA torque.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | torque | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor13_set_outb_mode | ( | dcmotor13_t * | ctx, |
uint8_t | mode ) |
DC Motor 13 set OUTB mode function.
This function sets the OUTB mode.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor13_set_outb_torque | ( | dcmotor13_t * | ctx, |
uint8_t | torque ) |
DC Motor 13 set OUTB torque function.
This function sets the OUTB torque.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | torque | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor13_write_register | ( | dcmotor13_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
DC Motor 13 write register function.
This function writes a desired data byte to the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See dcmotor13_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.