EV3 Servo Motors. More...
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "modp_numtoa.h"
#include "ev3.h"
#include "ev3_port.h"
#include "ev3_servo.h"
Functions | |
size_t | get_servo_address (uint8_t sn, char *buf, size_t sz) |
Read "address" attribute of the servo motor. More... | |
size_t | get_servo_command (uint8_t sn, char *buf, size_t sz) |
Read "command" attribute of the servo motor. More... | |
size_t | set_servo_command (uint8_t sn, char *value) |
Write "command" attribute of the servo motor. More... | |
size_t | multi_set_servo_command (uint8_t *sn, char *value) |
Write "command" attribute of several servo motors. More... | |
size_t | get_servo_driver_name (uint8_t sn, char *buf, size_t sz) |
Read "driver_name" attribute of the servo motor. More... | |
size_t | get_servo_max_pulse_sp (uint8_t sn, int *buf) |
Read "max_pulse_sp" attribute of the servo motor. More... | |
size_t | set_servo_max_pulse_sp (uint8_t sn, int value) |
Write "max_pulse_sp" attribute of the servo motor. More... | |
size_t | multi_set_servo_max_pulse_sp (uint8_t *sn, int value) |
Write "max_pulse_sp" attribute of several servo motors. More... | |
size_t | get_servo_mid_pulse_sp (uint8_t sn, int *buf) |
Read "mid_pulse_sp" attribute of the servo motor. More... | |
size_t | set_servo_mid_pulse_sp (uint8_t sn, int value) |
Write "mid_pulse_sp" attribute of the servo motor. More... | |
size_t | multi_set_servo_mid_pulse_sp (uint8_t *sn, int value) |
Write "mid_pulse_sp" attribute of several servo motors. More... | |
size_t | get_servo_min_pulse_sp (uint8_t sn, int *buf) |
Read "min_pulse_sp" attribute of the servo motor. More... | |
size_t | set_servo_min_pulse_sp (uint8_t sn, int value) |
Write "min_pulse_sp" attribute of the servo motor. More... | |
size_t | multi_set_servo_min_pulse_sp (uint8_t *sn, int value) |
Write "min_pulse_sp" attribute of several servo motors. More... | |
size_t | get_servo_polarity (uint8_t sn, char *buf, size_t sz) |
Read "polarity" attribute of the servo motor. More... | |
size_t | set_servo_polarity (uint8_t sn, char *value) |
Write "polarity" attribute of the servo motor. More... | |
size_t | multi_set_servo_polarity (uint8_t *sn, char *value) |
Write "polarity" attribute of several servo motors. More... | |
size_t | get_servo_position_sp (uint8_t sn, int *buf) |
Read "position_sp" attribute of the servo motor. More... | |
size_t | set_servo_position_sp (uint8_t sn, int value) |
Write "position_sp" attribute of the servo motor. More... | |
size_t | multi_set_servo_position_sp (uint8_t *sn, int value) |
Write "position_sp" attribute of several servo motors. More... | |
size_t | get_servo_rate_sp (uint8_t sn, int *buf) |
Read "rate_sp" attribute of the servo motor. More... | |
size_t | set_servo_rate_sp (uint8_t sn, int value) |
Write "rate_sp" attribute of the servo motor. More... | |
size_t | multi_set_servo_rate_sp (uint8_t *sn, int value) |
Write "rate_sp" attribute of several servo motors. More... | |
size_t | get_servo_state (uint8_t sn, char *buf, size_t sz) |
Read "state" attribute of the servo motor. More... | |
const char * | ev3_servo_type (INX_T type_inx) |
Get name of the specified servo motor type. More... | |
INX_T | get_servo_type_inx (uint8_t sn) |
Read "driver_name" attribute and get index of the servo motor type. More... | |
size_t | get_servo_desc (uint8_t sn, EV3_SERVO *desc) |
Read servo motor attributes that are required for filling the descriptor. More... | |
EV3_SERVO * | ev3_servo_desc (uint8_t sn) |
Get descriptor of the servo motor. More... | |
INX_T | ev3_servo_desc_type_inx (uint8_t sn) |
Get type from the servo motor descriptor. More... | |
uint8_t | ev3_servo_desc_port (uint8_t sn) |
Get EV3 port from the servo motor descriptor. More... | |
uint8_t | ev3_servo_desc_extport (uint8_t sn) |
Get extended port from the servo motor descriptor. More... | |
uint8_t | ev3_servo_desc_addr (uint8_t sn) |
Get I2C address from the servo motor descriptor. More... | |
char * | ev3_servo_port_name (uint8_t sn, char *buf) |
Assemble EV3 port name from the servo motor descriptor. More... | |
bool | ev3_search_servo (INX_T type_inx, uint8_t *sn, uint8_t from) |
Search of a sequence number of the specified servo motor type. More... | |
bool | ev3_search_servo_plugged_in (uint8_t port, uint8_t extport, uint8_t *sn, uint8_t from) |
Search of a sequence number the servo motor by plug-in attributes. More... | |
const char * | ev3_servo_command (INX_T command_inx) |
Get name of the specified servo motor command. More... | |
INX_T | get_servo_command_inx (uint8_t sn) |
Read "command" attribute of the servo motor and get the index. More... | |
size_t | set_servo_command_inx (uint8_t sn, INX_T command_inx) |
Write "command" attribute of the servo motor by the index. More... | |
size_t | multi_set_servo_command_inx (uint8_t *sn, INX_T command_inx) |
Write "command" attribute of several servo motors by the index. More... | |
const char * | ev3_servo_polarity (INX_T polarity_inx) |
Get name of the specified servo motor polarity. More... | |
INX_T | get_servo_polarity_inx (uint8_t sn) |
Read "polarity" attribute of the servo motor and get the index. More... | |
size_t | set_servo_polarity_inx (uint8_t sn, INX_T polarity_inx) |
Write "polarity" attribute of the servo motor by the index. More... | |
size_t | multi_set_servo_polarity_inx (uint8_t *sn, INX_T polarity_inx) |
Write "polarity" attribute of several servo motors by the index. More... | |
size_t | get_servo_state_flags (uint8_t sn, FLAGS_T *flags) |
Read "state" attribute of the servo motor and get the flags. More... | |
int | ev3_servo_init (void) |
Detect connected servo motors. More... | |
EV3 Servo Motors.
(ev3_servo.yu-c)