Safe changes from HAL cleanup
This commit is contained in:
@@ -160,9 +160,6 @@ uint8_t HAL_get_reset_source(void);
|
||||
|
||||
void _delay_ms(const int delay);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
||||
/*
|
||||
extern "C" {
|
||||
int freeMemory(void);
|
||||
@@ -172,14 +169,17 @@ extern "C" {
|
||||
extern "C" char* _sbrk(int incr);
|
||||
|
||||
/*
|
||||
static int freeMemory() {
|
||||
int freeMemory() {
|
||||
volatile int top;
|
||||
top = (int)((char*)&top - reinterpret_cast<char*>(_sbrk(0)));
|
||||
return top;
|
||||
}
|
||||
*/
|
||||
|
||||
static int freeMemory() {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
||||
static inline int freeMemory(void) {
|
||||
volatile char top;
|
||||
return &top - reinterpret_cast<char*>(_sbrk(0));
|
||||
}
|
||||
|
@@ -27,6 +27,10 @@
|
||||
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
||||
*/
|
||||
|
||||
#ifndef PWM
|
||||
#define PWM OUTPUT
|
||||
#endif
|
||||
|
||||
#define READ(IO) digitalRead(IO)
|
||||
#define WRITE(IO,V) digitalWrite(IO,V)
|
||||
|
||||
@@ -61,6 +65,8 @@
|
||||
#define PORTC 2
|
||||
#define PORTD 3
|
||||
#define PORTE 4
|
||||
#define PORTF 5
|
||||
#define PORTG 6
|
||||
|
||||
#define _STM32_PIN(P,PN) ((PORT##P * 16) + PN)
|
||||
|
||||
|
Reference in New Issue
Block a user