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.

35 lines
1.3 KiB

11 months ago
11 months ago
  1. #pragma once
  2. #include "project_configs.h"
  3. #define MAX_USR_NAME_SIZE 5
  4. #define MOTO_POWER_EN_IO PC2
  5. #define MOTO1_CSN_IO PB3
  6. #define MOTO2_CSN_IO PB4
  7. #define MOTO3_CSN_IO PB5
  8. #define MOTO4_CSN_IO PB6
  9. #define MOTO1_DRV_ENN_IO PD0
  10. #define MOTO2_DRV_ENN_IO PD1
  11. #define MOTO3_DRV_ENN_IO PD2
  12. #define MOTO4_DRV_ENN_IO PD3
  13. #define ID1_IO PE0
  14. #define ID2_IO PE1
  15. #define ID3_IO PD7
  16. #define ID4_IO PD9
  17. #define ID5_IO PD8
  18. #define IO_OUT1_IO PC0
  19. #define IO_OUT2_IO PC1
  20. #define MOTOR_SPI_INS hspi1
  21. /***********************************************************************************************************************
  22. * MOTOR_CFG *
  23. ***********************************************************************************************************************/
  24. #define MOTOR_SHAFT false
  25. #define STEPMOTOR_IHOLD 10
  26. #define STEPMOTOR_IRUN 20
  27. #define STEPMOTOR_IHOLDDELAY 100
  28. #define MOTOR_VSTART 200 // �����ٶ�
  29. #define MOTOR_A1 100 // �׶�1_���ٶ�
  30. #define MOTOR_AMAX 300 // �׶�2_���ٶ�
  31. #define MOTOR_V1 500 // �׶�2_��ʼ�ٶ�
  32. #define MOTOR_TZEROWAIT 100 // �ٶ��������л�ʱ��