dcmotor29
2.1.0.0
|
API for configuring and manipulating DC Motor 29 Click driver. More...
Modules | |
DC Motor 29 Registers List | |
List of registers of DC Motor 29 Click driver. | |
DC Motor 29 Registers Settings | |
Settings for registers of DC Motor 29 Click driver. | |
DC Motor 29 MikroBUS Map | |
MikroBUS pin mapping of DC Motor 29 Click driver. | |
Functions | |
void | dcmotor29_cfg_setup (dcmotor29_cfg_t *cfg) |
DC Motor 29 configuration object setup function. More... | |
err_t | dcmotor29_init (dcmotor29_t *ctx, dcmotor29_cfg_t *cfg) |
DC Motor 29 initialization function. More... | |
err_t | dcmotor29_default_cfg (dcmotor29_t *ctx) |
DC Motor 29 default configuration function. More... | |
err_t | dcmotor29_generic_write (dcmotor29_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
DC Motor 29 data writing function. More... | |
err_t | dcmotor29_generic_read (dcmotor29_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
DC Motor 29 data reading function. More... | |
void | dcmotor29_set_in1_pin (dcmotor29_t *ctx, uint8_t pin_state) |
DC Motor 29 set IN1 pin function. More... | |
void | dcmotor29_set_rst_pin (dcmotor29_t *ctx, uint8_t pin_state) |
DC Motor 29 set RST pin function. More... | |
uint8_t | dcmotor29_get_ip_pin (dcmotor29_t *ctx) |
DC Motor 29 get IP pin function. More... | |
uint8_t | dcmotor29_get_int_pin (dcmotor29_t *ctx) |
DC Motor 29 get INT pin function. More... | |
err_t | dcmotor29_register_write (dcmotor29_t *ctx, uint8_t reg, uint8_t data_in) |
DC Motor 29 data register writing function. More... | |
err_t | dcmotor29_register_read (dcmotor29_t *ctx, uint8_t reg, uint8_t *data_out) |
DC Motor 29 data register reading function. More... | |
err_t | dcmotor29_port_expander_write (dcmotor29_t *ctx, uint8_t reg, uint8_t data_in) |
DC Motor 29 port ecpander write register function. More... | |
err_t | dcmotor29_port_expander_read (dcmotor29_t *ctx, uint8_t reg, uint8_t *data_out) |
DC Motor 29 port ecpander read register function. More... | |
err_t | dcmotor29_set_pins (dcmotor29_t *ctx, uint8_t set_mask, uint8_t clr_mask) |
DC Motor 29 set pins function. More... | |
err_t | dcmotor29_drvoff_state (dcmotor29_t *ctx, uint8_t drvoff_state) |
DC Motor 29 control drvoff function. More... | |
err_t | dcmotor29_drive_motor (dcmotor29_t *ctx, uint8_t state) |
DC Motor 29 drive motor function. More... | |
API for configuring and manipulating DC Motor 29 Click driver.
void dcmotor29_cfg_setup | ( | dcmotor29_cfg_t * | cfg | ) |
DC Motor 29 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dcmotor29_cfg_t object definition for detailed explanation. |
err_t dcmotor29_default_cfg | ( | dcmotor29_t * | ctx | ) |
DC Motor 29 default configuration function.
This function executes a default configuration of DC Motor 29 click board.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor29_drive_motor | ( | dcmotor29_t * | ctx, |
uint8_t | state | ||
) |
DC Motor 29 drive motor function.
This function sets motor driver into the selected state.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | state | : State of the driver. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor29_drvoff_state | ( | dcmotor29_t * | ctx, |
uint8_t | drvoff_state | ||
) |
DC Motor 29 control drvoff function.
This function sets the state of the DRVOFF pin, enabling or disabling outputs.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | drvoff_state | : State of the DRVOFF pin. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor29_generic_read | ( | dcmotor29_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
DC Motor 29 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor29_generic_write | ( | dcmotor29_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
DC Motor 29 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t dcmotor29_get_int_pin | ( | dcmotor29_t * | ctx | ) |
DC Motor 29 get INT pin function.
This function is used to get state of the INT pin.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
uint8_t dcmotor29_get_ip_pin | ( | dcmotor29_t * | ctx | ) |
DC Motor 29 get IP pin function.
This function is used to get state of the IP pin.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
err_t dcmotor29_init | ( | dcmotor29_t * | ctx, |
dcmotor29_cfg_t * | cfg | ||
) |
DC Motor 29 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dcmotor29_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor29_port_expander_read | ( | dcmotor29_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
DC Motor 29 port ecpander read register function.
This function reads a data byte from the selected register of the port expander.
[in] | ctx | : Click context object. See dcmotor29_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. err_t dcmotor29_port_expander_write | ( | dcmotor29_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
DC Motor 29 port ecpander write register function.
This function writes a data byte into the selected register of the port expander.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dcmotor29_register_read | ( | dcmotor29_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
DC Motor 29 data register reading function.
This function reads a data byte from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See dcmotor29_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. err_t dcmotor29_register_write | ( | dcmotor29_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
DC Motor 29 data register writing function.
This function writes a data byte into the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor29_set_in1_pin | ( | dcmotor29_t * | ctx, |
uint8_t | pin_state | ||
) |
DC Motor 29 set IN1 pin function.
This function is used to set state of the IN1 pin.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | pin_state | : Pin state. |
err_t dcmotor29_set_pins | ( | dcmotor29_t * | ctx, |
uint8_t | set_mask, | ||
uint8_t | clr_mask | ||
) |
DC Motor 29 set pins function.
This function sets and clears the value of the selected pins of PCA9538A port expander.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | clr_mask | : Pin clear mask. |
[in] | set_mask | : Pin set mask. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dcmotor29_set_rst_pin | ( | dcmotor29_t * | ctx, |
uint8_t | pin_state | ||
) |
DC Motor 29 set RST pin function.
This function is used to set state of the RST pin.
[in] | ctx | : Click context object. See dcmotor29_t object definition for detailed explanation. |
[in] | pin_state | : Pin state. |