Official STMicroelectronics Arduino Core STM32F4 HAL compatibility (#11006)
This commit is contained in:
committed by
Scott Lahteine
parent
4dbec774b5
commit
e0276d2f32
@@ -21,8 +21,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _HAL_STM32F4_H
|
||||
#define _HAL_STM32F4_H
|
||||
|
||||
@@ -41,6 +39,10 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#ifdef USBCON
|
||||
#include <USBSerial.h>
|
||||
#endif
|
||||
|
||||
#include "../math_32bit.h"
|
||||
#include "../HAL_SPI.h"
|
||||
#include "fastio_STM32F4.h"
|
||||
@@ -48,7 +50,6 @@
|
||||
|
||||
#include "HAL_timers_STM32F4.h"
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Defines
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -186,6 +187,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
extern "C" char* _sbrk(int incr);
|
||||
|
||||
/*
|
||||
static int freeMemory() {
|
||||
volatile int top;
|
||||
@@ -193,6 +195,7 @@ static int freeMemory() {
|
||||
return top;
|
||||
}
|
||||
*/
|
||||
|
||||
static int freeMemory() {
|
||||
volatile char top;
|
||||
return &top - reinterpret_cast<char*>(_sbrk(0));
|
||||
|
||||
Reference in New Issue
Block a user