Edwin the variable that you commented for Cmake is currenly not implmeted Errors were generated due to the missing IFDEF __CPP__ wrappers on the .h Files

interrupts
key 4 years ago
parent 675ae4d7b6
commit 0d645c30bb

@ -33,7 +33,7 @@ add_subdirectory(utils)
add_subdirectory(bsl) add_subdirectory(bsl)
#set(BSL_HEADER_FILE ${CMAKE_SOURCE_DIR}/bsl/raspberry/bsl_raspberry.hpp) #set(BSL_HEADER_FILE ${CMAKE_SOURCE_DIR}/bsl/raspberry/bsl_raspberry.hpp)
set(BSL_HEADER_FILE ${CMAKE_SOURCE_DIR}/bsl/nucleo_f042k6/bsl_nucleo_f042k6.hpp) #set(BSL_HEADER_FILE ${CMAKE_SOURCE_DIR}/bsl/nucleo_f042k6/bsl_nucleo_f042k6.hpp)
message("${BoldBlue}Project Info ${ColourReset}") message("${BoldBlue}Project Info ${ColourReset}")
message("${Blue} |--> Exec Name \t: ${EXECUTABLE} ${ColourReset}") message("${Blue} |--> Exec Name \t: ${EXECUTABLE} ${ColourReset}")

@ -15,6 +15,13 @@
************************************************************************************************** **************************************************************************************************
*/ */
#ifndef _TIMER_H_
#define _TIMER_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "hardwareDescription.h" #include "hardwareDescription.h"
typedef enum { typedef enum {
@ -58,3 +65,8 @@ uint32_t timerGetCount(timerNo_t timer);
void timerThrowError(timerError_t error); void timerThrowError(timerError_t error);
#ifdef __cplusplus
}
#endif
#endif // _TIMER_H_

@ -16,7 +16,15 @@
************************************************************************************************** **************************************************************************************************
*/ */
#ifndef _hardwareDescription_H_
#define _hardwareDescription_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "stm32f042x6.h" #include "stm32f042x6.h"
#include <stdint.h>
#define PACKAGE_LQFP32 1 #define PACKAGE_LQFP32 1
@ -154,11 +162,12 @@ typedef enum {
/*! /*!
* Enum for awailable clok sources RM Page: 95 * Enum for awailable clok sources RM Page: 95
* */ * */
typedef enum { typedef enum {
HSI, /*!< High speed internal */ CLK_HSI, /*!< High speed internal */
HSE, /*!< High speed external */ CLK_HSE, /*!< High speed external */
LSI, /*!< Low speed internal */ CLK_LSI, /*!< Low speed internal */
LSE /*!< Low speed External */ CLK_LSE /*!< Low speed External */
}clkSources_t; }clkSources_t;
/*! /*!
@ -193,3 +202,9 @@ static const uint8_t timerBus_No[MAX_TIMER_CHANNEL_COUNT] = {
2, 2,
2 2
}; };
#ifdef __cplusplus
}
#endif
#endif // _hardwareDescription_H_

@ -51,7 +51,6 @@ void timerSetAutoReload(timerNo_t timer, uint32_t reload)
void timerClearCounter(timerNo_t timer) void timerClearCounter(timerNo_t timer)
{ {
BASE->CNT = 0; BASE->CNT = 0;
} }

@ -22,7 +22,6 @@
#include "usart.h" #include "usart.h"
#include "pin.h" #include "pin.h"
#include "stm32f042x6.h"
#define SYST_CLK 8000000 #define SYST_CLK 8000000

@ -76,5 +76,5 @@ list(APPEND EXTRA_LIBS sub::translator)
list(APPEND EXTRA_LIBS sub::delay) list(APPEND EXTRA_LIBS sub::delay)
list(APPEND EXTRA_LIBS sub::pin) list(APPEND EXTRA_LIBS sub::pin)
list(APPEND EXTRA_LIBS sub::usart) list(APPEND EXTRA_LIBS sub::usart)
list(APPEND EXTRA_LIBS sub::init)
list(APPEND EXTRA_LIBS sub::timer) list(APPEND EXTRA_LIBS sub::timer)
list(APPEND EXTRA_LIBS sub::init)

Loading…
Cancel
Save