31 lines
525 B
C
31 lines
525 B
C
#ifndef __ESC_H
|
|
#define __ESC_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "main.h"
|
|
#include "tim.h"
|
|
#include <stdint.h>
|
|
|
|
/* 常见 ESC PWM 范围,单位:us */
|
|
#define ESC_MIN_US 1100
|
|
#define ESC_MID_US 1500
|
|
#define ESC_MAX_US 3000
|
|
|
|
/* 建议初次测试不要超过这个值 */
|
|
#define ESC_TEST_LOW_US 1100
|
|
|
|
void ESC_Init(void);
|
|
void ESC_SetThrottleUs(uint16_t us);
|
|
void ESC_Stop(void);
|
|
void ESC_Arm(void);
|
|
void ESC_TestLowSpeed(void);
|
|
void ESC_Calibrate(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |