#ifndef DEVCONTROL_COMMON_H
#define DEVCONTROL_COMMON_H

#include "device_init.h"
#include "car0101_control.h"
#include "car0102_control.h"
#include "car0103_control.h"
#include "car0104_control.h"
#include "ptz0401_control.h"
#include "tank0202_control.h"
#include "tank0203_control.h"
#include "tank0206_control.h"
#include "tank_common.h"
#include "common.h"

#define DEVICE_CAR0101 101  //莽牛大车
#define DEVICE_CAR0102 102  //莽牛小车
#define DEVICE_CAR0103 103  //推土机
#define DEVICE_CAR0104 104  //挖机
#define DEVICE_TANK0201 201 //废弃坦克
#define DEVICE_TANK0202 202 //
#define DEVICE_TANK0203 203 //M1A2美国坦克
#define DEVICE_TANK0206 206 //可以喷水坦克
#define DEVICE_PAO_PTZ0401 401 //云台

typedef struct {
    int device_id;              // 设备ID (101, 102等)
    void (*device_abnormal_stop)(void);    // 车停止
    void (*gpio_pin_pulled)(void);
    void (*gpio_pwm_pulled)(void);
    void (*device_close)(void);// 关闭线程池等
} device_abnormal_close_t;

typedef struct {
    int device_id;              // 设备ID (101, 102等)
    void (*device_didrive_control)(unsigned char *valt);    // PWM初始化函数指针
} device_didrive;



void device_stop(int device_id);

void device_end_close(int device_id);

void device_walk_control(int device_id,unsigned char *valt);

#endif 