mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/kinetis: move IRQ name adaption to cpu_conf.h
Found and fixed the issue for the kinetis-based boards: The kinetis code is using some macros to map some IRQ names, that differ in some versions of vendor headers, to a RIOT wide unique name. The doxygen of this mapping states, that this mapping must be done before any vendor header is included. Unfortunately, the mapping was so far placed in cpu/kinetis/vectors.c, before any other include statement. In some cases, the vendor headers might be included before the mapping macros in vectors.c, leading to the compilation errors down the line. To fix this, the adaption defines are moved into cpu/kinetis/cpu_conf.h, which is the file that actually includes the vendor headers. This way it is ensured, that these adaption macros are always defined before any vendor header is included, and therefore preventing this kind of error for good.
This commit is contained in:
parent
717a12507a
commit
edb890ff93
@ -19,6 +19,19 @@
|
||||
#ifndef CPU_CONF_H
|
||||
#define CPU_CONF_H
|
||||
|
||||
/* This is needed to homogenize the symbolic IRQ names across different versions
|
||||
* of the vendor headers. These must be defined before any vendor headers are
|
||||
* included */
|
||||
#define FTFA_IRQn FTF_IRQn
|
||||
#define FTFA_Collision_IRQn Read_Collision_IRQn
|
||||
#define FTFE_IRQn FTF_IRQn
|
||||
#define FTFE_Collision_IRQn Read_Collision_IRQn
|
||||
#define FTFL_IRQn FTF_IRQn
|
||||
#define FTFL_Collision_IRQn Read_Collision_IRQn
|
||||
#define PMC_IRQn LVD_LVW_IRQn
|
||||
#define Watchdog_IRQn WDOG_EWM_IRQn
|
||||
#define LVD_LVW_DCDC_IRQn LVD_LVW_IRQn
|
||||
|
||||
/* Dispatch to a separate file per family */
|
||||
#if defined(KINETIS_SERIES_K)
|
||||
#include "cpu_conf_kinetis_k.h"
|
||||
|
@ -26,20 +26,6 @@
|
||||
* @name Interrupt vector definition
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* This is needed to homogenize the symbolic IRQ names across different versions
|
||||
* of the vendor headers. These must be defined before any vendor headers are
|
||||
* included */
|
||||
#define FTFA_IRQn FTF_IRQn
|
||||
#define FTFA_Collision_IRQn Read_Collision_IRQn
|
||||
#define FTFE_IRQn FTF_IRQn
|
||||
#define FTFE_Collision_IRQn Read_Collision_IRQn
|
||||
#define FTFL_IRQn FTF_IRQn
|
||||
#define FTFL_Collision_IRQn Read_Collision_IRQn
|
||||
#define PMC_IRQn LVD_LVW_IRQn
|
||||
#define Watchdog_IRQn WDOG_EWM_IRQn
|
||||
#define LVD_LVW_DCDC_IRQn LVD_LVW_IRQn
|
||||
|
||||
#include "vectors_kinetis.h"
|
||||
|
||||
/* CPU specific interrupt vector table */
|
||||
|
Loading…
Reference in New Issue
Block a user