dcmotor7
2.0.0.0
|
Functions | |
void | dcmotor7_cfg_setup (dcmotor7_cfg_t *cfg) |
Config Object Initialization function. More... | |
DCMOTOR7_RETVAL | dcmotor7_init (dcmotor7_t *ctx, dcmotor7_cfg_t *cfg) |
Initialization function. More... | |
void | dcmotor7_default_cfg (dcmotor7_t *ctx) |
Default Confuguration. More... | |
void | dcmotor7_generic_write (dcmotor7_t *ctx, uint8_t reg, uint8_t tmp) |
Generic write function. More... | |
void | dcmotor7_generic_read (dcmotor7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | dcmotor7_set_port (dcmotor7_t *ctx, uint8_t port, uint8_t value) |
Functions for set port. More... | |
void | dcmotor7_set_motor (dcmotor7_t *ctx, uint8_t motor, uint8_t in1, uint8_t in2) |
Functions for set Motor. More... | |
void | dcmotor7_set_tblkab (dcmotor7_t *ctx, uint8_t tblk) |
Functions for set Motor Ach and Bch Digital tBLK. More... | |
void | dcmotor7_set_hb_mode (dcmotor7_t *ctx, uint8_t mode) |
Functions for set H-Bridge operation mode. More... | |
void | dcmotor7_motor_stop (dcmotor7_t *ctx, uint8_t motor) |
Motor stop function. More... | |
void | dcmotor7_go_to_stand_by_mode (dcmotor7_t *ctx, uint8_t motor) |
Function for setting the motor in stand mode. More... | |
void | dcmotor7_set_pwm_motor_a (dcmotor7_t *ctx, uint8_t state) |
Function for set PWM value for motor A. More... | |
void | dcmotor7_set_pwm_motor_b (dcmotor7_t *ctx, uint8_t state) |
Function for set PWM value for motor B. More... | |
void dcmotor7_cfg_setup | ( | dcmotor7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void dcmotor7_default_cfg | ( | dcmotor7_t * | ctx | ) |
Default Confuguration.
ctx | Click object. |
Set: DCMOTOR7_CMD_CONFIGURATION
This function is default configuration for this click.
void dcmotor7_generic_read | ( | dcmotor7_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 |
This function reads data from the desired register.
void dcmotor7_generic_write | ( | dcmotor7_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tmp | ||
) |
Generic write function.
ctx | Click object. |
reg | Register address. |
tmp | Data buf to be written |
This function writes data to the desired register.
void dcmotor7_go_to_stand_by_mode | ( | dcmotor7_t * | ctx, |
uint8_t | motor | ||
) |
Function for setting the motor in stand mode.
ctx | Click object. |
motor | Motor (A or B) |
DCMOTOR7_RETVAL dcmotor7_init | ( | dcmotor7_t * | ctx, |
dcmotor7_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void dcmotor7_motor_stop | ( | dcmotor7_t * | ctx, |
uint8_t | motor | ||
) |
Motor stop function.
ctx | Click object. |
motor | Motor (A or B) |
void dcmotor7_set_hb_mode | ( | dcmotor7_t * | ctx, |
uint8_t | mode | ||
) |
Functions for set H-Bridge operation mode.
ctx | Click object. |
mode | Mode (Small mode or Large mode) |
void dcmotor7_set_motor | ( | dcmotor7_t * | ctx, |
uint8_t | motor, | ||
uint8_t | in1, | ||
uint8_t | in2 | ||
) |
Functions for set Motor.
ctx | Click object. |
motor | Motor (A or B) |
in1 | Motor Ach or Bch IN1 signal |
in2 | Motor Ach or Bch IN2 signal |
void dcmotor7_set_port | ( | dcmotor7_t * | ctx, |
uint8_t | port, | ||
uint8_t | value | ||
) |
Functions for set port.
ctx | Click object. |
port | Port to be set up |
value | Value to which the selected port is being set |
void dcmotor7_set_pwm_motor_a | ( | dcmotor7_t * | ctx, |
uint8_t | state | ||
) |
Function for set PWM value for motor A.
ctx | Click object. |
state | PWM state |
void dcmotor7_set_pwm_motor_b | ( | dcmotor7_t * | ctx, |
uint8_t | state | ||
) |
Function for set PWM value for motor B.
ctx | Click object.v |
state | PWM state |
void dcmotor7_set_tblkab | ( | dcmotor7_t * | ctx, |
uint8_t | tblk | ||
) |
Functions for set Motor Ach and Bch Digital tBLK.
ctx | Click object. |
tbblk | TBLK noise rejection time (Digital tBLK = fOSCM � 4 clk or fOSCM � 6 clk) |