1
0
Fork 0

CO_SYNC: bugfix, if CO_CONFIG_FLAG_OD_DYNAMIC is disabled.

This commit is contained in:
Janez 2024-07-13 15:29:58 +02:00
parent e85410e923
commit 835bae5664
2 changed files with 5 additions and 5 deletions

View file

@ -269,13 +269,13 @@ CO_SYNC_init(CO_SYNC_t* SYNC, CO_EM_t* em, OD_entry_t* OD_1005_cobIdSync, OD_ent
SYNC->em = em;
#if ((CO_CONFIG_SYNC)&CO_CONFIG_SYNC_PRODUCER) != 0
SYNC->isProducer = (cobIdSync & 0x40000000U) != 0U;
SYNC->CANdevTx = CANdevTx;
#endif
#if ((CO_CONFIG_SYNC)&CO_CONFIG_FLAG_OD_DYNAMIC) != 0
SYNC->CAN_ID = (uint16_t)(cobIdSync & 0x7FFU);
SYNC->CANdevRx = CANdevRx;
SYNC->CANdevRxIdx = CANdevRxIdx;
#if ((CO_CONFIG_SYNC)&CO_CONFIG_SYNC_PRODUCER) != 0
SYNC->CANdevTx = CANdevTx;
SYNC->CANdevTxIdx = CANdevTxIdx;
#endif
#endif

View file

@ -80,9 +80,10 @@ typedef struct {
uint32_t* OD_1007_window; /**< Pointer to variable in OD, "Synchronous window length" in microseconds */
#if (((CO_CONFIG_SYNC)&CO_CONFIG_SYNC_PRODUCER) != 0) || defined CO_DOXYGEN
bool_t isProducer; /**< True, if device is SYNC producer. Calculated from _COB ID SYNC Message_ variable from
Object dictionary(index 0x1005).*/
CO_CANtx_t* CANtxBuff; /**< CAN transmit buffer inside CANdevTx */
bool_t isProducer; /**< True, if device is SYNC producer. Calculated from _COB ID SYNC Message_ variable
from Object dictionary(index 0x1005).*/
CO_CANmodule_t* CANdevTx; /**< From CO_SYNC_init() */
CO_CANtx_t* CANtxBuff; /**< CAN transmit buffer inside CANdevTx */
#endif
#if ((CO_CONFIG_SYNC)&CO_CONFIG_FLAG_OD_DYNAMIC) || defined CO_DOXYGEN
@ -92,7 +93,6 @@ typedef struct {
uint16_t CAN_ID; /**< CAN ID of the SYNC message. Calculated from _COB ID SYNC Message_ variable
from Object dictionary (index 0x1005). */
#if (((CO_CONFIG_SYNC)&CO_CONFIG_SYNC_PRODUCER) != 0) || defined CO_DOXYGEN
CO_CANmodule_t* CANdevTx; /**< From CO_SYNC_init() */
uint16_t CANdevTxIdx; /**< From CO_SYNC_init() */
OD_extension_t OD_1019_extension; /**< Extension for OD object */
#endif