diff options
| author | sakimisu <[email protected]> | 2022-11-06 16:31:34 +0800 |
|---|---|---|
| committer | sakimisu <[email protected]> | 2022-11-06 16:31:34 +0800 |
| commit | 66db88b7cd7aa7eac522d2c0e940947d2cbf391d (patch) | |
| tree | 6a8540fc8b7b3bf48d06ddb6b1515f7d9b182561 /demo/stm32 | |
| parent | 10de5a3e7884cc6172a5e2b1dccab4ad0cdf1626 (diff) | |
move malloc,free,printf macro into config.h
Diffstat (limited to 'demo/stm32')
5 files changed, 25 insertions, 20 deletions
diff --git a/demo/stm32/usb_device/stm32f103c8t6/Core/Inc/usb_config.h b/demo/stm32/usb_device/stm32f103c8t6/Core/Inc/usb_config.h index d7fc7270..f36817b6 100644 --- a/demo/stm32/usb_device/stm32f103c8t6/Core/Inc/usb_config.h +++ b/demo/stm32/usb_device/stm32f103c8t6/Core/Inc/usb_config.h @@ -8,14 +8,15 @@ /* ================ USB common Configuration ================ */ +#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__) + +#define usb_malloc(size) malloc(size) +#define usb_free(ptr) free(ptr) + #ifndef CONFIG_USB_DBG_LEVEL #define CONFIG_USB_DBG_LEVEL USB_DBG_INFO #endif -#ifndef CONFIG_USB_PRINTF -#define CONFIG_USB_PRINTF printf -#endif - /* Enable print with color */ #define CONFIG_USB_PRINTF_COLOR_ENABLE diff --git a/demo/stm32/usb_device/stm32f429igt6/Core/Inc/usb_config.h b/demo/stm32/usb_device/stm32f429igt6/Core/Inc/usb_config.h index d7fc7270..f36817b6 100644 --- a/demo/stm32/usb_device/stm32f429igt6/Core/Inc/usb_config.h +++ b/demo/stm32/usb_device/stm32f429igt6/Core/Inc/usb_config.h @@ -8,14 +8,15 @@ /* ================ USB common Configuration ================ */ +#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__) + +#define usb_malloc(size) malloc(size) +#define usb_free(ptr) free(ptr) + #ifndef CONFIG_USB_DBG_LEVEL #define CONFIG_USB_DBG_LEVEL USB_DBG_INFO #endif -#ifndef CONFIG_USB_PRINTF -#define CONFIG_USB_PRINTF printf -#endif - /* Enable print with color */ #define CONFIG_USB_PRINTF_COLOR_ENABLE diff --git a/demo/stm32/usb_device/stm32h743vbt6/Core/Inc/usb_config.h b/demo/stm32/usb_device/stm32h743vbt6/Core/Inc/usb_config.h index d7fc7270..f36817b6 100644 --- a/demo/stm32/usb_device/stm32h743vbt6/Core/Inc/usb_config.h +++ b/demo/stm32/usb_device/stm32h743vbt6/Core/Inc/usb_config.h @@ -8,14 +8,15 @@ /* ================ USB common Configuration ================ */ +#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__) + +#define usb_malloc(size) malloc(size) +#define usb_free(ptr) free(ptr) + #ifndef CONFIG_USB_DBG_LEVEL #define CONFIG_USB_DBG_LEVEL USB_DBG_INFO #endif -#ifndef CONFIG_USB_PRINTF -#define CONFIG_USB_PRINTF printf -#endif - /* Enable print with color */ #define CONFIG_USB_PRINTF_COLOR_ENABLE diff --git a/demo/stm32/usb_host/stm32f429igt6/Core/Inc/usb_config.h b/demo/stm32/usb_host/stm32f429igt6/Core/Inc/usb_config.h index 796311dd..67488137 100644 --- a/demo/stm32/usb_host/stm32f429igt6/Core/Inc/usb_config.h +++ b/demo/stm32/usb_host/stm32f429igt6/Core/Inc/usb_config.h @@ -8,14 +8,15 @@ /* ================ USB common Configuration ================ */ +#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__) + +#define usb_malloc(size) malloc(size) +#define usb_free(ptr) free(ptr) + #ifndef CONFIG_USB_DBG_LEVEL #define CONFIG_USB_DBG_LEVEL USB_DBG_INFO #endif -#ifndef CONFIG_USB_PRINTF -#define CONFIG_USB_PRINTF printf -#endif - /* Enable print with color */ #define CONFIG_USB_PRINTF_COLOR_ENABLE diff --git a/demo/stm32/usb_host/stm32h743xih6/Core/Inc/usb_config.h b/demo/stm32/usb_host/stm32h743xih6/Core/Inc/usb_config.h index 796311dd..67488137 100644 --- a/demo/stm32/usb_host/stm32h743xih6/Core/Inc/usb_config.h +++ b/demo/stm32/usb_host/stm32h743xih6/Core/Inc/usb_config.h @@ -8,14 +8,15 @@ /* ================ USB common Configuration ================ */ +#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__) + +#define usb_malloc(size) malloc(size) +#define usb_free(ptr) free(ptr) + #ifndef CONFIG_USB_DBG_LEVEL #define CONFIG_USB_DBG_LEVEL USB_DBG_INFO #endif -#ifndef CONFIG_USB_PRINTF -#define CONFIG_USB_PRINTF printf -#endif - /* Enable print with color */ #define CONFIG_USB_PRINTF_COLOR_ENABLE |
