defines: prevent redefinition of UNUSED

To prevent compiler warnings/errors we have to wrap the definition of
UNUSED with an ifndef. So there are no problems if this is already
defined in the project

Signed-off-by: Peter Tönz <peter.tonz@husqvarnagroup.com>
This commit is contained in:
Peter Tönz 2022-09-29 14:43:11 +02:00 committed by Ali LABBENE
parent 5d432f9cf3
commit e92669fc50
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ typedef enum
/* Exported macro ------------------------------------------------------------*/
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
#ifndef UNUSED
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
#endif
#define HAL_MAX_DELAY 0xFFFFFFFFU