mirror of https://github.com/rusefi/ChibiOS.git
Fix assignment of currcore when PORT_CORES_NUMBER not defined
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14195 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
6d6e4e415c
commit
6be40fd227
|
@ -60,14 +60,18 @@
|
|||
* @brief Access to current core's instance structure.
|
||||
*/
|
||||
#if defined(PORT_INSTANCE_ACCESS)
|
||||
#define currcore PORT_INSTANCE_ACCESS
|
||||
#else
|
||||
#if (PORT_CORES_NUMBER == 0) || defined(__DOXYGEN__)
|
||||
#define currcore (&ch0)
|
||||
#else
|
||||
#define currcore ch_system.instances[port_get_core_id()]
|
||||
#endif
|
||||
#endif
|
||||
#define currcore PORT_INSTANCE_ACCESS
|
||||
#else /* !defined(PORT_INSTANCE_ACCESS) */
|
||||
#if defined(PORT_CORES_NUMBER)
|
||||
#if (PORT_CORES_NUMBER > 1) || defined(__DOXYGEN__)
|
||||
#define currcore ch_system.instances[port_get_core_id()]
|
||||
#else
|
||||
#define currcore (&ch0)
|
||||
#endif
|
||||
#else
|
||||
#define currcore (&ch0)
|
||||
#endif /* defined(PORT_CORES_NUMBER) */
|
||||
#endif /* defined(PORT_INSTANCE_ACCESS) */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module macros. */
|
||||
|
|
Loading…
Reference in New Issue