include/sync.h
changeset 291 6165554cbfe9
parent 263 d221d387ad2f
child 378 d2abf6c8c27b
equal deleted inserted replaced
290:43c3b2bf3e32 291:6165554cbfe9
    33 typedef void (*post_TPDO_t)(void);
    33 typedef void (*post_TPDO_t)(void);
    34 void _post_TPDO(void);
    34 void _post_TPDO(void);
    35 
    35 
    36 /** transmit a SYNC message and trigger sync TPDOs
    36 /** transmit a SYNC message and trigger sync TPDOs
    37  */
    37  */
    38 UNS8 sendSYNC (CO_Data* d, UNS32 cob_id);
    38 UNS8 sendSYNC (CO_Data* d);
    39 /** transmit a SYNC message on CAN bus
    39 /** transmit a SYNC message on CAN bus
    40  */
    40  */
    41 UNS8 sendSYNCMessage(CO_Data* d, UNS32 cob_id);
    41 UNS8 sendSYNCMessage(CO_Data* d);
    42 
    42 
    43 /** This function is called when the node is receiving a SYNC message (cob-id = 0x80).
    43 /** This function is called when the node is receiving a SYNC message (cob-id = 0x80).
    44  *  - check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing).
    44  *  - check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing).
    45  *  - Get the SYNC cobId by reading the dictionary index 1005, check it does correspond to the received cobId
    45  *  - Get the SYNC cobId by reading the dictionary index 1005, check it does correspond to the received cobId
    46  *  - Trigger sync TPDO emission 
    46  *  - Trigger sync TPDO emission