2015-11-26 05:06 AM
Working with:
__TIM3_CLK_ENABLE();
well, it works, but 3 things bother me here (yep, most might cosmetics, but because of my company guidelines the code must be as clean as possible):#define UNUSED(x) ((void)(x))
The problem became solved when I just remove two brackets like:#define UNUSED(x) ((void)x)
It seems that this is more portable than the current macro. So could you please:2015-01-01 09:49 AM
The Problem exists here too, even with the fresh Version 1.0.
If you change the definition
#define UNUSED(x) ((void)(x))
to
#define UNUSED(x) ((void)x)
the problem vanishes.
You should consider changing this, even if You say
it ''is a rule of coding HAL library''
2015-11-27 08:14 AM
HiJoe,
1-To enable the timer, you have to use__HAL_RCC_TIM3_CLK_ENABLE() or __TIM3_CLK_ENABLE(). If you want to get rid of ''__'' you can access directly to the registerSET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM2EN);
2-Defining the macro unused as
#define UNUSED(x) ((void)(x))
is a rule of coding HAL library.
Thank you for your feedback
-Shahrzad-
2015-12-12 02:38 PM
regarding that
#define UNUSED(x) ((void)(x))
how should I get rid of the gcc warnings?