Don't include SW CRC if not requested

I've got build failure when enable CRC module on STM32. The reason is SW CRC header is included by default  but not by compiler if ChibiOS-Contrib/os/various/ is not included into search path.
The fix includes only requested LL header.
This commit is contained in:
snazarkin 2021-07-19 16:56:32 +03:00 committed by GitHub
parent 34591368db
commit 3404e4d270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -72,9 +72,13 @@ typedef enum {
CRC_COMPLETE /* Asynchronous operation complete. */
} crcstate_t;
#if STM32_CRC_USE_CRC1 == TRUE
#include "hal_crc_lld.h"
#include "crcsw.h" /* Include software LL driver */
#endif
#if CRCSW_USE_CRC1 == TRUE
#include "crcsw.h" /* Include software LL driver */
#endif
/*===========================================================================*/
/* Driver macros. */