35 lines
546 B
C
35 lines
546 B
C
|
|
|
||
|
|
#include <stdio.h>
|
||
|
|
#include "freertos/FreeRTOS.h"
|
||
|
|
#include "freertos/task.h"
|
||
|
|
#include "freertos/queue.h"
|
||
|
|
#include "driver/gpio.h"
|
||
|
|
#include "driver/ledc.h"
|
||
|
|
#include "soc/soc_caps.h"
|
||
|
|
#include "esp_log.h"
|
||
|
|
#include "esp_adc/adc_oneshot.h"
|
||
|
|
#include "esp_adc/adc_cali.h"
|
||
|
|
#include "esp_adc/adc_cali_scheme.h"
|
||
|
|
#include "ui.h"
|
||
|
|
|
||
|
|
/*配置ADC采用通道*/
|
||
|
|
#define EXAMPLE_ADC1_CHAN8 ADC_CHANNEL_8
|
||
|
|
/*配置用于进行ADC采样的引脚*/
|
||
|
|
#define EXAMPLE_POWER_IO (9)
|
||
|
|
|
||
|
|
|
||
|
|
void powerTask(void);
|
||
|
|
|
||
|
|
/*初始化电源管理系统*/
|
||
|
|
void powerInit(void);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|