This commit is contained in:
2024-05-08 03:04:20 +08:00
commit a58a15aa26
293 changed files with 194341 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
//
// Created by ZK on 2023/3/14.
//
#include "Current.h"

View File

@@ -0,0 +1,8 @@
//
// Created by ZK on 2023/3/14.
//
#ifndef BOOOOMFOC_STSPIN32G4_EVB_CURRENT_H
#define BOOOOMFOC_STSPIN32G4_EVB_CURRENT_H
#endif //BOOOOMFOC_STSPIN32G4_EVB_CURRENT_H

View File

@@ -0,0 +1,21 @@
//
// Created by ZK on 2023/3/14.
//
#include "InteriorADC.h"
bool InteriorADC_Init(void) {
//使能ADC注入
HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
HAL_ADCEx_Calibration_Start(&hadc2, ADC_SINGLE_ENDED);
HAL_Delay(100);
HAL_ADCEx_InjectedStart(&hadc1);
__HAL_ADC_ENABLE_IT(&hadc1, ADC_IT_JEOC);
HAL_ADCEx_InjectedStart(&hadc2);
__HAL_ADC_ENABLE_IT(&hadc2, ADC_IT_JEOC);
return 0;//返回值为零表示初始化成功
}

View File

@@ -0,0 +1,12 @@
//
// Created by ZK on 2023/3/14.
//
#ifndef BOOOOMFOC_STSPIN32G4_EVB_INTERIORADC_H
#define BOOOOMFOC_STSPIN32G4_EVB_INTERIORADC_H
#include "APP_Main.h"
bool InteriorADC_Init(void);
#endif //BOOOOMFOC_STSPIN32G4_EVB_INTERIORADC_H