Skip to content

Commit b191654

Browse files
authored
Merge pull request #4 from fpistm/Header_usage
Avoid use internal core header file use Arduino.h instead
2 parents 24cd55d + 2f333a4 commit b191654

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/STM32FreeRTOS.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* \param[in] millis milliseconds to delay
1212
*/
1313
static void delayMS(uint32_t millis) {
14-
uint32_t iterations = millis * (SystemCoreClock/7000);
14+
uint32_t iterations = millis * (F_CPU/7000);
1515
uint32_t i;
1616
for(i = 0; i < iterations; ++i) {
1717
__asm__("nop\n\t");

src/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Frederic Pillon <frederic.pillon@st.com> for STMicroelectronics.
44
* @brief Include source of FreeRTOS portable layer file to match Arduino library format
55
*/
6-
#include "stm32_def.h"
6+
#include <Arduino.h>
77

88
#ifndef __CORTEX_M
99
#pragma GCC error "no \"__CORTEX_M\" definition"

src/portmacro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#ifndef _PORTMACRO_H_
88
#define _PORTMACRO_H_
9-
#include "stm32_def.h"
9+
#include <Arduino.h>
1010

1111
#ifndef __CORTEX_M
1212
#pragma GCC error "no \"__CORTEX_M\" definition"

0 commit comments

Comments
 (0)