servo 2.0.0.0
|
Functions | |
void | servo_cfg_setup (servo_cfg_t *cfg) |
Config Object Initialization function. | |
SERVO_RETVAL | servo_init (servo_t *ctx, servo_cfg_t *cfg) |
Initialization function. | |
void | servo_default_cfg (servo_t *ctx) |
Click Default Configuration function. | |
void | servo_generic_write_of_pca9685 (servo_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function of pca9685. | |
void | servo_generic_write_of_of_ltc2497 (servo_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function of ltc2497. | |
void | servo_generic_read_of_pca9685 (servo_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function of pca9685. | |
void | servo_generic_read_of_ltc2497 (servo_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function of ltc2497. | |
void | servo_setting (servo_t *ctx, servo_pos_and_res_t pos_and_res) |
Setting function. | |
void | servo_set_vref (servo_t *ctx, uint16_t v_ref) |
Set Vref function. | |
void | servo_stop (servo_t *ctx) |
Stop function. | |
void | servo_start (servo_t *ctx) |
Start function. | |
void | servo_soft_reset (servo_t *ctx) |
Soft reset function. | |
void | servo_sleep (servo_t *ctx) |
Sleep function. | |
void | servo_set_mode (servo_t *ctx, uint8_t mode, uint8_t w_data) |
Set mode function. | |
void | servo_set_position (servo_t *ctx, uint8_t motor, uint8_t position) |
Set position function. | |
void | servo_set_freq (servo_t *ctx, uint16_t freq) |
Set frequency function. | |
uint32_t | servo_get_channel (servo_t *ctx, uint8_t channel) |
Functions for reading adc value of current. | |
uint16_t | setvo_get_current (servo_t *ctx, uint8_t channel) |
Functions for reading current in mA. | |
void servo_cfg_setup | ( | servo_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void servo_default_cfg | ( | servo_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Servo click.
void servo_generic_read_of_ltc2497 | ( | servo_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function of ltc2497.
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 using slave_address of ltc2497.
void servo_generic_read_of_pca9685 | ( | servo_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function of pca9685.
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 using slave_address of pca9685.
void servo_generic_write_of_of_ltc2497 | ( | servo_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function of ltc2497.
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 using slave_address of ltc2497.
void servo_generic_write_of_pca9685 | ( | servo_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function of pca9685.
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 using slave_address of pca9685.
uint32_t servo_get_channel | ( | servo_t * | ctx, |
uint8_t | channel ) |
Functions for reading adc value of current.
ctx | Click object. |
channel | The channel from which it is read. |
@description This function reads adc value of current.
SERVO_RETVAL servo_init | ( | servo_t * | ctx, |
servo_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 servo_set_freq | ( | servo_t * | ctx, |
uint16_t | freq ) |
Set frequency function.
ctx | Click object. |
freq | Motor to be set. |
@description This function sets frequency.
void servo_set_mode | ( | servo_t * | ctx, |
uint8_t | mode, | ||
uint8_t | w_data ) |
Set mode function.
ctx | Click object. |
mode | One of the two modes to be set. |
w_data | Data that will be written in the register. |
@description This function sets mod.
Options for mode 2 that can be set: Output logic state ( not inverted or inverted ) Outputs change ( Outputs change on STOP or ACK command ) Outputs configured ( open-drain structure or totem pole structure)
void servo_set_position | ( | servo_t * | ctx, |
uint8_t | motor, | ||
uint8_t | position ) |
Set position function.
ctx | Click object. |
motor | Motor to be set. |
position | Position on which the motor will be set. |
@description This function sets position.
void servo_set_vref | ( | servo_t * | ctx, |
uint16_t | v_ref ) |
Set Vref function.
ctx | Click object. |
v_ref | V ref. |
@description This function settings Vref of Servo Clicks.
void servo_setting | ( | servo_t * | ctx, |
servo_pos_and_res_t | pos_and_res ) |
Setting function.
ctx | Click object. |
pos_and_res | Structure with position and resolution. |
@description This function setting position and resolution.
void servo_sleep | ( | servo_t * | ctx | ) |
Sleep function.
ctx | Click object. |
@description Functions for sleep mode chip.
void servo_soft_reset | ( | servo_t * | ctx | ) |
Soft reset function.
ctx | Click object. |
@description Functions for soft reset chip.
void servo_start | ( | servo_t * | ctx | ) |
Start function.
ctx | Click object. |
@description Function for start work servo motor.
void servo_stop | ( | servo_t * | ctx | ) |
Stop function.
ctx | Click object. |
v_ref | V ref. |
@description When the servo_stop() function is started, all controls and communication with the servo motor are blocked. To restore communication, you need to call the servo_start() function. Use this function when you need to shut down the all motors quickly.
uint16_t setvo_get_current | ( | servo_t * | ctx, |
uint8_t | channel ) |
Functions for reading current in mA.
ctx | Click object. |
channel | The channel from which it is read. |
@description This function reads the current value of Servo Click witch motor spends.