dcmotor23
2.1.0.0
|
API for configuring and manipulating DC Motor 23 Click driver. More...
Modules | |
DC Motor 23 Registers List | |
List of registers of DC Motor 23 Click driver. | |
DC Motor 23 Registers Settings | |
Settings for registers of DC Motor 23 Click driver. | |
DC Motor 23 MikroBUS Map | |
MikroBUS pin mapping of DC Motor 23 Click driver. | |
Functions | |
void | dcmotor23_cfg_setup (dcmotor23_cfg_t *cfg) |
DC Motor 23 configuration object setup function. More... | |
err_t | dcmotor23_init (dcmotor23_t *ctx, dcmotor23_cfg_t *cfg) |
DC Motor 23 initialization function. More... | |
err_t | dcmotor23_default_cfg (dcmotor23_t *ctx) |
DC Motor 23 default configuration function. More... | |
err_t | dcmotor23_write_register (dcmotor23_t *ctx, uint8_t reg, uint8_t data_in) |
DC Motor 23 I2C writing function. More... | |
err_t | dcmotor23_read_register (dcmotor23_t *ctx, uint8_t reg, uint8_t *data_out) |
DC Motor 23 I2C reading function. More... | |
err_t | dcmotor23_get_lo_pin (dcmotor23_t *ctx, uint8_t *pin_state) |
DC Motor 23 get LO pin function. More... | |
err_t | dcmotor23_set_output_mode (dcmotor23_t *ctx, uint8_t mode, uint8_t sel_motor) |
DC Motor 23 set output mode function. More... | |
err_t | dcmotor23_set_clockwise (dcmotor23_t *ctx, uint8_t sel_motor) |
DC Motor 23 set clockwise function. More... | |
err_t | dcmotor23_set_counter_clockwise (dcmotor23_t *ctx, uint8_t sel_motor) |
DC Motor 23 set counter clockwise function. More... | |
err_t | dcmotor23_set_decay (dcmotor23_t *ctx, uint8_t sel_motor) |
DC Motor 23 set decay function. More... | |
err_t | dcmotor23_set_outa_torque (dcmotor23_t *ctx, uint8_t torque) |
DC Motor 23 set OUTA torque function. More... | |
err_t | dcmotor23_set_outb_torque (dcmotor23_t *ctx, uint8_t torque) |
DC Motor 23 set OUTB torque function. More... | |
void | dcmotor23_normal_operation_mode (dcmotor23_t *ctx) |
DC Motor 23 set normal operation mode function. More... | |
void | dcmotor23_sleep_mode (dcmotor23_t *ctx) |
DC Motor 23 set sleep operation mode function. More... | |
void | dcmotor23_reset_device (dcmotor23_t *ctx) |
DC Motor 23 reset device function. More... | |
uint8_t | dcmotor23_get_int_pin (dcmotor23_t *ctx) |
DC Motor 23 get INT pin function. More... | |
void | dcmotor23_set_en_a_pin (dcmotor23_t *ctx, uint8_t state) |
DC Motor 23 set EN_A pin function. More... | |
void | dcmotor23_set_en_b_pin (dcmotor23_t *ctx, uint8_t state) |
DC Motor 23 set EN_B pin function. More... | |
API for configuring and manipulating DC Motor 23 Click driver.
void dcmotor23_cfg_setup | ( | dcmotor23_cfg_t * | cfg | ) |
DC Motor 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dcmotor23_cfg_t object definition for detailed explanation. |
err_t dcmotor23_default_cfg | ( | dcmotor23_t * | ctx | ) |
DC Motor 23 default configuration function.
This function executes a default configuration of DC Motor 23 click board.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t dcmotor23_get_int_pin | ( | dcmotor23_t * | ctx | ) |
DC Motor 23 get INT pin function.
This function get interrupt pin stste of the PCA9538 8-bit I2C-bus and SMBus low power I/O port with interrupt and reset on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
err_t dcmotor23_get_lo_pin | ( | dcmotor23_t * | ctx, |
uint8_t * | pin_state | ||
) |
DC Motor 23 get LO pin function.
This function reads the LO pin logic state of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_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 dcmotor23_init | ( | dcmotor23_t * | ctx, |
dcmotor23_cfg_t * | cfg | ||
) |
DC Motor 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dcmotor23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor23_normal_operation_mode | ( | dcmotor23_t * | ctx | ) |
DC Motor 23 set normal operation mode function.
This function set normal operation mode and enable the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
err_t dcmotor23_read_register | ( | dcmotor23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
DC Motor 23 I2C reading function.
This function reads data from the selected PCA9538A register by using I2C serial interface of the PCA9538 8-bit I2C-bus and SMBus low power I/O port with interrupt and reset on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor23_reset_device | ( | dcmotor23_t * | ctx | ) |
DC Motor 23 reset device function.
This function perform reset of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
err_t dcmotor23_set_clockwise | ( | dcmotor23_t * | ctx, |
uint8_t | sel_motor | ||
) |
DC Motor 23 set clockwise function.
This function set clockwise for the selected output of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | sel_motor | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor23_set_counter_clockwise | ( | dcmotor23_t * | ctx, |
uint8_t | sel_motor | ||
) |
DC Motor 23 set counter clockwise function.
This function set counter clockwise for the selected output of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | sel_motor | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor23_set_decay | ( | dcmotor23_t * | ctx, |
uint8_t | sel_motor | ||
) |
DC Motor 23 set decay function.
This function set decay for the selected output of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | sel_motor | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. Slow
Decay - State of the DECAY set to Low level, Fast
Decay - State of the DECAY set to High level. void dcmotor23_set_en_a_pin | ( | dcmotor23_t * | ctx, |
uint8_t | state | ||
) |
DC Motor 23 set EN_A pin function.
This function sets the ENABLE_A pin logic state of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | state | : ENABLE_A pin logic state. |
void dcmotor23_set_en_b_pin | ( | dcmotor23_t * | ctx, |
uint8_t | state | ||
) |
DC Motor 23 set EN_B pin function.
This function sets the ENABLE_B pin logic state of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | state | : ENABLE_B pin logic state. |
err_t dcmotor23_set_outa_torque | ( | dcmotor23_t * | ctx, |
uint8_t | torque | ||
) |
DC Motor 23 set OUTA torque function.
This function set sets the OUTA torque of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | torque | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor23_set_outb_torque | ( | dcmotor23_t * | ctx, |
uint8_t | torque | ||
) |
DC Motor 23 set OUTB torque function.
This function sets the OUTB torque of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | torque | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor23_set_output_mode | ( | dcmotor23_t * | ctx, |
uint8_t | mode, | ||
uint8_t | sel_motor | ||
) |
DC Motor 23 set output mode function.
This function set desired mode for the selected output of the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | mode | :
|
[in] | sel_motor | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor23_sleep_mode | ( | dcmotor23_t * | ctx | ) |
DC Motor 23 set sleep operation mode function.
This function set sleep operation mode and disable the TB67H480 BiCD Constant Current Dual H-bridge Driver IC on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
err_t dcmotor23_write_register | ( | dcmotor23_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
DC Motor 23 I2C writing function.
This function writes a desired data byte to the selected PCA9538A register the selected register by using I2C serial interface of the PCA9538 8-bit I2C-bus and SMBus low power I/O port with interrupt and reset on the DC Motor 23 Click board™.
[in] | ctx | : Click context object. See dcmotor23_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.