* 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"
* message queues.
* File: src/virtual.c
*/
-can_irqreturn_t virtual_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
+int virtual_irq_handler(int irq, struct chip_t *chip)
{
- return CAN_IRQ_HANDLED;
+ return CANCHIP_IRQ_HANDLED;
}
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 */
* @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);
DEBUGMSG("virtual: direct delivery\n");
}