43 lines
823 B
C
43 lines
823 B
C
/**
|
|
* @file execute_hd.h
|
|
* @author xxx
|
|
* @date 2023-12-19 19:27:43
|
|
* @brief 头文件 execute_hd.h
|
|
* @copyright Copyright (c) 2023 by xxx, All Rights Reserved.
|
|
*/
|
|
|
|
#ifndef __EXECUTE_H__
|
|
#define __EXECUTE_H__
|
|
#include "main.h"
|
|
#include "entity.h"
|
|
|
|
#define EXECUTE_PLAN EXECUTE_PLAN_1
|
|
|
|
/// 算法方案
|
|
typedef enum
|
|
{
|
|
EXECUTE_PLAN_1,
|
|
EXECUTE_PLAN_2,
|
|
EXECUTE_PLAN_3,
|
|
EXECUTE_PLAN_4,
|
|
} execute_plan_e;
|
|
|
|
/// 操作标志
|
|
typedef enum
|
|
{
|
|
EXECUTE_NONE = 0, ///< 不执行任何操作
|
|
EXECUTE_DAC = 1, ///< 执行DAC输出
|
|
} execute_e;
|
|
|
|
/// 返回内容
|
|
typedef struct
|
|
{
|
|
execute_e code; ///< 操作标志
|
|
uint16_t dac; ///< DAC值
|
|
} execute_rsp_t;
|
|
|
|
extern void execute_pid_init(execute_plan_e plan); // 算法方案初始化
|
|
extern execute_rsp_t* execute_dac(execute_plan_e plan); // 算法方案执行
|
|
|
|
#endif // !__EXECUTE_H__
|