dcmotor11 2.0.0.0
|
Functions | |
void | dcmotor11_cfg_setup (dcmotor11_cfg_t *cfg) |
Config Object Initialization function. | |
DCMOTOR11_RETVAL | dcmotor11_init (dcmotor11_t *ctx, dcmotor11_cfg_t *cfg) |
Initialization function. | |
void | dcmotor11_generic_write (dcmotor11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | dcmotor11_generic_read (dcmotor11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | dcmotor11_control (dcmotor11_t *ctx, uint8_t dir, uint8_t speed) |
Motor Control. | |
uint8_t | dcmotor11_get_fault (dcmotor11_t *ctx) |
Get Fault. | |
void | dcmotor11_clear_fault (dcmotor11_t *ctx, uint8_t dev_data) |
Set Fault. | |
void | dcmotor11_stop (dcmotor11_t *ctx) |
Motor Stop. | |
void | dcmotor11_break (dcmotor11_t *ctx) |
Motor Break. | |
uint8_t | dcmotor11_get_interrupt_state (dcmotor11_t *ctx) |
Interrupt state on the INT pin. | |
void dcmotor11_break | ( | dcmotor11_t * | ctx | ) |
Motor Break.
ctx | Click object. |
void dcmotor11_cfg_setup | ( | dcmotor11_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void dcmotor11_clear_fault | ( | dcmotor11_t * | ctx, |
uint8_t | dev_data ) |
Set Fault.
ctx | Click object. |
dev_data | Data for write to the Fault register |
void dcmotor11_control | ( | dcmotor11_t * | ctx, |
uint8_t | dir, | ||
uint8_t | speed ) |
Motor Control.
ctx | Click object. |
dir | Sets Directions - FORWARD/BACKWARD |
speed | Sets output voltage (Speed) |
void dcmotor11_generic_read | ( | dcmotor11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void dcmotor11_generic_write | ( | dcmotor11_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t dcmotor11_get_fault | ( | dcmotor11_t * | ctx | ) |
Get Fault.
ctx | Click object. |
uint8_t dcmotor11_get_interrupt_state | ( | dcmotor11_t * | ctx | ) |
Interrupt state on the INT pin.
ctx | Click object. |
DCMOTOR11_RETVAL dcmotor11_init | ( | dcmotor11_t * | ctx, |
dcmotor11_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void dcmotor11_stop | ( | dcmotor11_t * | ctx | ) |
Motor Stop.
ctx | Click object. |