Skip to content

Commit c2faff2

Browse files
committed
F4_HAL/def: Define NULL instead of including stdio.h.
The definition of NULL is the only reason stdio.h is needed, and including this standard header clashes with a CC3000 driver's definitions because the latter wants to redefine built-in macros. The patch here is the simplest way to deal with this but the proper fix is really to modify the CC3000 driver.
1 parent dc9fb19 commit c2faff2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@
4747
/* Includes ------------------------------------------------------------------*/
4848
#include "stm32f4xx.h"
4949
#include "Legacy/stm32_hal_legacy.h"
50-
#include <stdio.h>
50+
51+
// instead of including stdio.h
52+
#ifndef NULL
53+
#define NULL ((void*)0)
54+
#endif
5155

5256
/* Exported types ------------------------------------------------------------*/
5357

0 commit comments

Comments
 (0)