generated from Template/H563ZI-HAL-CMake-Template
新增 CommonCenter 类和 Config 结构体,提供超声波测距功能的配置和实例化支持
This commit is contained in:
14
Core/App/config.hpp
Normal file
14
Core/App/config.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "stm32h563xx.h"
|
||||
#include "tim.h"
|
||||
|
||||
#include "./Helper/gpio_helper.hpp"
|
||||
|
||||
struct Config {
|
||||
static inline struct {
|
||||
GpioHelper::Gpio trigger;
|
||||
TIM_HandleTypeDef* timer;
|
||||
uint32_t channel;
|
||||
} kCaptureConfig = {{GPIOA, GPIO_PIN_0}, &htim7, TIM_CHANNEL_1};
|
||||
};
|
||||
Reference in New Issue
Block a user