#ifndef PTZ_COMMON_H__
#define PTZ_COMMON_H__

#include "ptz_driver.h"

/* ===================== 硬件/PWM 参数 ===================== */
#define PWM_PIN_up        21
#define PWM_PIN_down      2

#define SERVO_FREQ        50.0f
#define PWM_RANGE         1024

#define MIN_PULSE_WIDTH   0.5f
#define MAX_PULSE_WIDTH   2.5f

/* ===================== 轴结构体 ===================== */
typedef struct {
    float angle;
    float target;
    float speed;
    float min_limit;
    float max_limit;
    float max_speed_cfg;
    float accel_cfg;
} ServoAxis;

void device_ptz_pwm_task_threadpoll_init();

#endif
