Change firmware to use C++ main

This commit is contained in:
2020-06-28 14:22:46 +02:00
parent c808fc488d
commit e3d4c3dffc
9 changed files with 81 additions and 44 deletions

View File

@@ -24,7 +24,7 @@
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "init.h"
/* USER CODE BEGIN Includes */

View File

@@ -1,8 +1,8 @@
/**
******************************************************************************
* File Name : gpio.h
* Description : This file contains all the functions prototypes for
* the gpio
* Description : This file contains all the functions prototypes for
* the gpio
******************************************************************************
* @attention
*
@@ -25,7 +25,7 @@
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "init.h"
/* USER CODE BEGIN Includes */

View File

@@ -1,8 +1,8 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* @file : init.h
* @brief : Header for init.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
@@ -20,8 +20,8 @@
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifndef __INIT_H
#define __INIT_H
#ifdef __cplusplus
extern "C" {
@@ -52,6 +52,7 @@ extern "C" {
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
void init(void);
/* USER CODE BEGIN EFP */
@@ -80,6 +81,6 @@ void Error_Handler(void);
}
#endif
#endif /* __MAIN_H */
#endif /* __INIT_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -31,7 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "main.h"
#include "init.h"
#include "stm32f0xx.h"
#include "stm32f0xx_hal.h"