Skip to content

Commit ea8bf81

Browse files
dhylandsdpgeorge
authored andcommitted
stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.
1 parent f243851 commit ea8bf81

26 files changed

Lines changed: 26 additions & 25 deletions

stmhal/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ INC += -I../lib/timeutils
4747
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
4848
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
4949
CFLAGS += -Iboards/$(BOARD)
50+
CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES)xx_hal.h>'
5051

5152
LDFLAGS = -nostdlib -T $(LD_FILE) -Map=$(@:.elf=.map) --cref
5253
LIBS =

stmhal/accel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <stdio.h>
2828
#include <string.h>
2929

30-
#include "stm32f4xx_hal.h"
30+
#include STM32_HAL_H
3131

3232
#include "py/nlr.h"
3333
#include "py/runtime.h"

stmhal/adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include <stdio.h>
28-
#include <stm32f4xx_hal.h>
28+
#include STM32_HAL_H
2929
#include <string.h>
3030

3131
#include "py/nlr.h"

stmhal/dac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <stdint.h>
2929
#include <string.h>
3030

31-
#include "stm32f4xx_hal.h"
31+
#include STM32_HAL_H
3232

3333
#include "py/nlr.h"
3434
#include "py/runtime.h"

stmhal/diskio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <stdint.h>
3131
#include <stdio.h>
3232

33-
#include "stm32f4xx_hal.h"
33+
#include STM32_HAL_H
3434

3535
#include "py/runtime.h"
3636
#include "lib/fatfs/ff.h" /* FatFs lower layer API */

stmhal/dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <stdio.h>
2828
#include <string.h>
2929
#include <stdint.h>
30-
#include <stm32f4xx_hal.h>
30+
#include STM32_HAL_H
3131

3232
#include "dma.h"
3333

stmhal/flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include <stm32f4xx_hal.h>
27+
#include STM32_HAL_H
2828

2929
#include "flash.h"
3030

stmhal/lcd.c

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

2727
#include <stdio.h>
2828
#include <string.h>
29-
#include <stm32f4xx_hal.h>
29+
#include STM32_HAL_H
3030

3131
#include "py/nlr.h"
3232
#include "py/runtime.h"

stmhal/led.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include <stdio.h>
28-
#include <stm32f4xx_hal.h>
28+
#include STM32_HAL_H
2929

3030
#include "py/nlr.h"
3131
#include "py/runtime.h"

stmhal/modpyb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <stdint.h>
2828
#include <stdio.h>
2929

30-
#include "stm32f4xx_hal.h"
30+
#include STM32_HAL_H
3131

3232
#include "py/mpstate.h"
3333
#include "py/nlr.h"

0 commit comments

Comments
 (0)