Page 2 of 2
Re: Adding an argument to PAL event callbacks
Posted: Sat Sep 02, 2017 9:30 am
by Giovanni
It makes sense, I will add switches to disable single ISRs without impacting others.
Giovanni
Re: Adding an argument to PAL event callbacks
Posted: Mon Sep 04, 2017 12:01 am
by FXCoder
Thanks Giovanni.
I see you were busy on the weekend and the defines are there.
I added definitions in mcuconf.h for PAL vector override.
For consistency can I suggest adopting the same structure as used for other settings so that the setting can be explicitly shown (TRUE/FALSE)?
More work I know...
In mcuconf.h
Code: Select all
/*
* PAL driver system settings.
*/
#define STM32_DISABLE_EXTI1_HANDLER TRUE
etc...
Then in stm32_isr.c
Code: Select all
#if !STM32_DISABLE_EXTI1_HANDLER
/**
* @brief EXTI[1] interrupt handler.
*
* @isr
*/
etc...
And in stm32_isr.h
Code: Select all
/**
* @name Configuration options
* @{
*/
/**
* @brief EXTI0 interrupt override setting.
*/
#if !defined(STM32_DISABLE_EXTI0_HANDLER) || defined(__DOXYGEN__)
#define STM32_DISABLE_EXTI0_HANDLER FALSE
#endif
etc...
Re: Adding an argument to PAL event callbacks
Posted: Mon Sep 04, 2017 8:12 am
by Giovanni
Hi,
I prefer to not bring so many arcane switches in mcuconf.h, it is already quite complex as is. I think simple definitions are fine for this use case and need no checks.
Giovanni
Re: Adding an argument to PAL event callbacks
Posted: Mon Sep 04, 2017 8:24 am
by FXCoder
OK.
So the preferred location is still mcuconf.h but just as plain #defines.
Correct?
Re: Adding an argument to PAL event callbacks
Posted: Mon Sep 04, 2017 8:51 am
by Giovanni
Correct, in alternative twitches could be placed in makefiles -D...
Giovanni