You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
532 B

#pragma once
#include <stdint.h>
#include <stdio.h>
#define servo_amount 5
typedef struct{
uint8_t addr;
uint8_t data_len;
uint8_t special_bit;
uint8_t sign_ed;
}reg_info_t;
// ¶æ»ú¶ÔÏó
typedef struct {
uint8_t id;
reg_info_t reg_info;
uint8_t cmd;
} servo_obj_t;
enum {
STS_small_L = 0,
STS_small_M,
STS_small_R,//right
STS_large_R,//Roll
STS_large_Y,
};
void servo_drive_single(uint8_t id, uint8_t addr, uint8_t cmd, int16_t *param_data, uint8_t param_count);
servo_obj_t* Get_Servo(uint8_t servo_id);