dcmotor7 2.0.0.0
|
Functions | |
void | dcmotor7_cfg_setup (dcmotor7_cfg_t *cfg) |
Config Object Initialization function. | |
DCMOTOR7_RETVAL | dcmotor7_init (dcmotor7_t *ctx, dcmotor7_cfg_t *cfg) |
Initialization function. | |
void | dcmotor7_default_cfg (dcmotor7_t *ctx) |
Default Confuguration. | |
void | dcmotor7_generic_write (dcmotor7_t *ctx, uint8_t reg, uint8_t tmp) |
Generic write function. | |
void | dcmotor7_generic_read (dcmotor7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | dcmotor7_set_port (dcmotor7_t *ctx, uint8_t port, uint8_t value) |
Functions for set port. | |
void | dcmotor7_set_motor (dcmotor7_t *ctx, uint8_t motor, uint8_t in1, uint8_t in2) |
Functions for set Motor. | |
void | dcmotor7_set_tblkab (dcmotor7_t *ctx, uint8_t tblk) |
Functions for set Motor Ach and Bch Digital tBLK. | |
void | dcmotor7_set_hb_mode (dcmotor7_t *ctx, uint8_t mode) |
Functions for set H-Bridge operation mode. | |
void | dcmotor7_motor_stop (dcmotor7_t *ctx, uint8_t motor) |
Motor stop function. | |
void | dcmotor7_go_to_stand_by_mode (dcmotor7_t *ctx, uint8_t motor) |
Function for setting the motor in stand mode. | |
void | dcmotor7_set_pwm_motor_a (dcmotor7_t *ctx, uint8_t state) |
Function for set PWM value for motor A. | |
void | dcmotor7_set_pwm_motor_b (dcmotor7_t *ctx, uint8_t state) |
Function for set PWM value for motor B. | |
void dcmotor7_cfg_setup | ( | dcmotor7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description 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 - DCMOTOR7_ENABLE_ALL_OUTPUT_PORT Set: DCMOTOR7_PORT_0 - DCMOTOR7_TBLK_FOSCM_X6_CLK Set: DCMOTOR7_PORT_5 - DCMOTOR7_HBMODE_SMALL_MODE
@description 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 |
@description 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 |
@description 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. |
@description 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) |