Files
STM32F4-Base/App/task/adc_task.c
2026-07-19 15:27:49 +08:00

46 lines
1.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 模块名称ADC Sampling Task
* 模块功能TPAFE5160 8 通道同步采样,数据缓存与通知
* 适用平台STM32F407ZGTx + TPAFE5160
* 作者:王建锋
* 创建日期2026-07-19
* 修改记录:
* v1.0 2026-07-19 王建锋 创建初始版本
*/
#include "adc_task.h"
#include "cmsis_os.h"
#include "tpafe5160.h"
#define DBG_TAG "[ADC_TASK]"
#include "dbg_log.h"
/*
* 函数功能ADC 任务初始化
* 入口参数:无
* 返 回 值0 - 成功,-1 - 失败
* 限定条件TPAFE5160 硬件已上电
* 函数说明:配置采样参数,准备数据缓冲区
*/
int adc_task_init(void)
{
DBG_INFO("adc_task_init");
return 0;
}
/*
* 函数功能ADC 任务主函数
* 入口参数arg - FreeRTOS 传入参数(未使用)
* 返 回 值:无
* 限定条件adc_task_init() 已成功调用
* 函数说明:定时触发 TPAFE5160 同步采样并处理数据
*/
void adc_task_func(void const *arg)
{
(void)arg;
for (;;) {
osDelay(1000);
}
}