Fixed cmakelists

This commit is contained in:
2025-08-28 13:09:47 -07:00
parent 8979e1b28a
commit 4900cde915
4 changed files with 8 additions and 11 deletions

View File

@@ -23,14 +23,14 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(MX_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/Core/Include
${CMAKE_CURRENT_SOURCE_DIR}/Core/Include/*
${CMAKE_CURRENT_SOURCE_DIR}/Drivers/CMSIS/Device/ST/${MCU_FAMILY}/Include
${CMAKE_CURRENT_SOURCE_DIR}/Drivers/CMSIS/Include
)
set(PROJECT_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/Core/Include
${CMAKE_CURRENT_SOURCE_DIR}/Core/Include/Reg
)
file(GLOB_RECURSE PROJECT_SOURCES

View File

@@ -37,6 +37,8 @@ constexpr RCC_Peripheral getTimerRCC(Timer_Key t) {
case Timer_Key::S_TIM16: return {Bus::APB2, &RCC->APB2ENR, RCC_APB2ENR_TIM16EN};
case Timer_Key::S_TIM17: return {Bus::APB2, &RCC->APB2ENR, RCC_APB2ENR_TIM17EN};
}
return {Bus::APB2, &RCC->APB2ENR, RCC_APB2ENR_TIM1EN};
}
//Get actual register value based on enum
@@ -50,6 +52,7 @@ constexpr volatile TIM_TypeDef* getTimerRegister(Timer_Key t) {
case Timer_Key::S_TIM16: return TIM16;
case Timer_Key::S_TIM17: return TIM17;
}
return TIM1;
}
constexpr IRQn_Type getIRQn(Timer_Key t) {
@@ -62,6 +65,7 @@ constexpr IRQn_Type getIRQn(Timer_Key t) {
case Timer_Key::S_TIM16: return TIM16_IRQn;
case Timer_Key::S_TIM17: return TIM17_IRQn;
}
return TIM1_BRK_UP_TRG_COM_IRQn;
}

View File

@@ -8,7 +8,7 @@
#ifndef SHAL_H
#define SHAL_H
#include "SHAL_TIM.h"
#endif

View File

@@ -29,11 +29,4 @@ private:
};
extern "C" void TIM2_IRQHandler(void){
if(TIM2->SR & TIM_SR_UIF) {
}
}
#endif