]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/i82527.c
CPC-PCI second chip IRQ corrected. Message timestamp code added.
[lincan.git] / lincan / src / i82527.c
index 443124a6436987dd31636bcdd7f9d2350951ecbe..682374a39942d3fc191fdfbba5ccd1bdc47d68b2 100644 (file)
@@ -425,6 +425,9 @@ void i82527_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
        if(obj->tx_slot){
                /* Do local transmitted message distribution if enabled */
                if (processlocal){
+                       /* fill CAN message timestamp */
+                       can_filltimestamp(&obj->tx_slot->msg.timestamp);
+
                        obj->tx_slot->msg.flags |= MSG_LOCAL;
                        canque_filter_msg2edges(obj->qends, &obj->tx_slot->msg);
                }
@@ -514,6 +517,9 @@ void i82527_irq_read_handler(struct chip_t *chip, struct msgobj_t *obj, int objn
                }
                
 
+               /* fill CAN message timestamp */
+               can_filltimestamp(&obj->rx_msg.timestamp);
+
                canque_filter_msg2edges(obj->qends, &obj->rx_msg);
                
                if (msgctl1 & NEWD_SET)