-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KL27Z: Fix duplicate define error #2400
KL27Z: Fix duplicate define error #2400
Conversation
Signed-off-by: Mahadevan Mahesh <[email protected]>
@@ -168,7 +168,7 @@ void SPI_MasterTransferCreateHandleDMA(SPI_Type *base, | |||
handle->bytesPerFrame = 1U; | |||
#endif /* FSL_FEATURE_SPI_16BIT_TRANSFERS */ | |||
|
|||
#if defined(FSL_FEATURE_SPI_FIFO_SIZE) && (FSL_FEATURE_SPI_FIFO_SIZE > 1) | |||
#if defined(FSL_FEATURE_SPI_HAS_FIFO) && (FSL_FEATURE_SPI_HAS_FIFO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both are the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old code was using a macro that is not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I missed first check is defined
, the second is checking if it's set to non zero value. ;) All good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first check is not needed http://stackoverflow.com/questions/5085392/what-is-the-value-of-an-undefined-constant-used-in-if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had discussed about this, however there were some use-cases which required this.
I do not want to make changes that deviates from the SDK code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theotherjimmy It's correct but some compilers create a warning, that a macro is not defined (we had this problem with some cortex cmsis defines).
Any update? |
Signed-off-by: Mahadevan Mahesh [email protected]