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.

29 lines
532 B

  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdio.h>
  4. #define servo_amount 5
  5. typedef struct{
  6. uint8_t addr;
  7. uint8_t data_len;
  8. uint8_t special_bit;
  9. uint8_t sign_ed;
  10. }reg_info_t;
  11. // ��������
  12. typedef struct {
  13. uint8_t id;
  14. reg_info_t reg_info;
  15. uint8_t cmd;
  16. } servo_obj_t;
  17. enum {
  18. STS_small_L = 0,
  19. STS_small_M,
  20. STS_small_R,//right
  21. STS_large_R,//Roll
  22. STS_large_Y,
  23. };
  24. void servo_drive_single(uint8_t id, uint8_t addr, uint8_t cmd, int16_t *param_data, uint8_t param_count);
  25. servo_obj_t* Get_Servo(uint8_t servo_id);