Files
Power-Pico/Power_Pico/User/Tasks/Inc/user_PDUFPTask.h

41 lines
662 B
C
Raw Normal View History

2025-10-14 16:24:47 +08:00
#ifndef __USER_PDUFPTASK_H__
#define __USER_PDUFPTASK_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "user_TasksInit.h"
2025-12-05 19:43:31 +08:00
// 定义UI层发送给PD UFP Task的指令的信号 //
typedef enum {
2025-12-05 19:43:31 +08:00
PD_CMD_START = 0,
PD_CMD_STOP,
PD_CMD_SET_PPS,
} PD_command_t;
2025-12-05 19:43:31 +08:00
// 定义PD UFP Task任务发送到UI层的处理信号 //
typedef enum {
2025-12-05 19:43:31 +08:00
PD_EVT_PPS_READY = 0,
PD_EVT_PPS_FAILED,
} PD_handle_event_t;
2025-12-05 19:43:31 +08:00
// UI层发送到PD UFP Task任务的命令信号结构体 //
typedef struct
{
2025-12-05 19:43:31 +08:00
PD_command_t event;
float set_voltage;
float set_current;
2025-12-05 19:43:31 +08:00
} PD_command_msg_t;
2025-10-14 16:24:47 +08:00
void PDUFPTask(void *argument);
#ifdef __cplusplus
}
#endif
#endif