Go to the documentation of this file.
32 #ifndef CO_CONFIG_SYNC
33 #define CO_CONFIG_SYNC (CO_CONFIG_SYNC_ENABLE | CO_CONFIG_SYNC_PRODUCER)
36 #if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
107 #if ((CO_CONFIG_SYNC) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
109 void (*pFunctSignalPre)(
void *object);
155 uint8_t synchronousCounterOverflowValue,
162 #if ((CO_CONFIG_SYNC) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
177 void (*pFunctSignalPre)(
void *
object));
212 uint32_t ObjDict_synchronousWindowLength,
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
Interface between CAN hardware and CANopenNode.
uint32_t periodTime
Sync period time in [microseconds].
Definition: CO_SYNC.h:86
CO_SYNC_status_t CO_SYNC_process(CO_SYNC_t *SYNC, uint32_t timeDifference_us, uint32_t ObjDict_synchronousWindowLength, uint32_t *timerNext_us)
Process SYNC communication.
@ CO_SYNC_NONE
SYNC not received.
Definition: CO_SYNC.h:123
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
uint8_t counter
Counter of the SYNC message if counterOverflowValue is different than zero.
Definition: CO_SYNC.h:101
@ CO_SYNC_OUTSIDE_WINDOW
SYNC received outside SYNC window.
Definition: CO_SYNC.h:125
CO_ReturnError_t
Return values of some CANopen functions.
Definition: CO_driver.h:488
CO_CANmodule_t * CANdevRx
From CO_SYNC_init()
Definition: CO_SYNC.h:113
unsigned char bool_t
Boolean data type for general use.
Definition: CO_driver.h:141
CO_SYNC_status_t
Return value for CO_SYNC_process.
Definition: CO_SYNC.h:122
uint32_t periodTimeoutTime
Sync period timeout time in [microseconds].
Definition: CO_SYNC.h:89
CO_CANtx_t * CANtxBuff
CAN transmit buffer inside CANdevTx.
Definition: CO_SYNC.h:116
void CO_SYNC_initCallbackPre(CO_SYNC_t *SYNC, void *object, void(*pFunctSignalPre)(void *object))
Initialize SYNC callback function.
@ CO_SYNC_RECEIVED
SYNC received.
Definition: CO_SYNC.h:124
uint8_t counterOverflowValue
Value from Synchronous counter overflow value variable from Object dictionary (index 0x1019)
Definition: CO_SYNC.h:92
uint16_t receiveError
Set to nonzero value, if SYNC with wrong data length is received from CAN.
Definition: CO_SYNC.h:106
bool_t CANrxToggle
Variable toggles, if new SYNC message received from CAN bus.
Definition: CO_SYNC.h:99
CO_ReturnError_t CO_SYNCsend(CO_SYNC_t *SYNC)
Send SYNC message.
uint32_t timer
Timer for the SYNC message in [microseconds].
Definition: CO_SYNC.h:104
uint16_t COB_ID
COB_ID of SYNC message.
Definition: CO_SYNC.h:83
bool_t curentSyncTimeIsInsideWindow
True, if current time is inside synchronous window.
Definition: CO_SYNC.h:95
Emergency object.
Definition: CO_Emergency.h:369
CO_NMT_internalState_t
Internal network state of the CANopen node.
Definition: CO_NMT_Heartbeat.h:77
bool_t isProducer
True, if device is SYNC producer.
Definition: CO_SYNC.h:80
volatile void * CANrxNew
Indicates, if new SYNC message received from CAN bus.
Definition: CO_SYNC.h:97
void * functSignalObjectPre
From CO_SYNC_initCallbackPre() or NULL.
Definition: CO_SYNC.h:111
CO_ReturnError_t CO_SYNC_init(CO_SYNC_t *SYNC, CO_EM_t *em, CO_SDO_t *SDO, CO_NMT_internalState_t *operatingState, uint32_t COB_ID_SYNCMessage, uint32_t communicationCyclePeriod, uint8_t synchronousCounterOverflowValue, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx)
Initialize SYNC object.
Complete CAN module object.
Definition: CO_driver.h:319
CO_EM_t * em
From CO_SYNC_init()
Definition: CO_SYNC.h:76
CO_CANmodule_t * CANdevTx
From CO_SYNC_init()
Definition: CO_SYNC.h:115
SYNC producer and consumer object.
Definition: CO_SYNC.h:75
uint16_t CANdevRxIdx
From CO_SYNC_init()
Definition: CO_SYNC.h:114
CO_NMT_internalState_t * operatingState
From CO_SYNC_init()
Definition: CO_SYNC.h:77
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition: CO_driver.h:299
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151
uint16_t CANdevTxIdx
From CO_SYNC_init()
Definition: CO_SYNC.h:117