* Written for new CAN driver version by Pavel Pisa - OCERA team member
* email:pisa@cmp.felk.cvut.cz
* This software is released under the GPL-License.
- * Version lincan-0.2 9 Jul 2003
+ * Version lincan-0.3 17 Jun 2004
*/
#include "../include/can.h"
if(cmd>=0) {
mod_timer(&obj->tx_timeout,
jiffies+virtual_bus_latency(obj));
- CANMSG("virtual: scheduled delivery\n");
+ DEBUGMSG("virtual: scheduled delivery\n");
} else
can_msgobj_clear_fl(obj,TX_LOCK);
struct msgobj_t *obj=(struct msgobj_t *)data;
if(obj->tx_slot) {
+ /* fill CAN message timestamp */
+ can_filltimestamp(&obj->tx_slot->msg.timestamp);
+
/* Deliver message to edges */
canque_filter_msg2edges(obj->qends, &obj->tx_slot->msg);
/* Free transmitted slot */
canque_free_outslot(obj->qends, obj->tx_qedge, obj->tx_slot);
obj->tx_slot=NULL;
- CANMSG("virtual: delayed delivery\n");
+ DEBUGMSG("virtual: delayed delivery\n");
}
can_msgobj_clear_fl(obj,TX_LOCK);
* @chip: pointer to chip state structure
* @obj: pointer to message object structure
*
+ * Function is responsible for initiating message transmition.
+ * It is responsible for clearing of object TX_REQUEST flag
+ *
* Return Value: negative value reports error.
* File: src/virtual.c
*/
struct canque_slot_t *slot;
int cmd;
+ can_msgobj_clear_fl(obj,TX_REQUEST);
+
#ifndef CAN_WITH_RTL
if(!virtual_bus_latency(obj)) {
#endif /*CAN_WITH_RTL*/
/* Ensure delivery of all ready slots */
while((cmd=canque_test_outslot(obj->qends, &qedge, &slot)) >= 0){
if(cmd==0) {
+ /* fill CAN message timestamp */
+ can_filltimestamp(&slot->msg.timestamp);
+
canque_filter_msg2edges(obj->qends, &slot->msg);
- CANMSG("virtual: direct delivery\n");
+ DEBUGMSG("virtual: direct delivery\n");
}
canque_free_outslot(obj->qends, qedge, slot);
}