From: ppisa Date: Tue, 30 Aug 2005 22:42:33 +0000 (+0000) Subject: Fixed bug message objects indexing introduced by previous driver changes. X-Git-Tag: CLT_COMM_CAN-lincan-0_3_2~14 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/fc52afd2db4b338e8ca30467f475cba1f1e40ebd Fixed bug message objects indexing introduced by previous driver changes. This indicates, that i82527 requires more testing after 0.3.x driver changes. --- diff --git a/lincan/src/i82527.c b/lincan/src/i82527.c index 60096c5..5ef9d8f 100644 --- a/lincan/src/i82527.c +++ b/lincan/src/i82527.c @@ -248,7 +248,7 @@ int i82527_clear_objects(struct canchip_t *chip) DEBUGMSG("Cleared all message objects on chip\n"); - for (i=1; i<=15; i++) { + for (i=0; imax_objects; i++) { obj=chip->msgobj[i]; canobj_write_reg(chip,obj,(INTPD_RES|RXIE_RES|TXIE_RES|MVAL_RES),iMSGCTL0); canobj_write_reg(chip,obj,(NEWD_RES|MLST_RES|TXRQ_RES|RMPD_RES), iMSGCTL1); @@ -665,7 +665,7 @@ int i82527_irq_handler(int irq, struct canchip_t *chip) if (irq_register == 0x02) object = 14; - else if(irq_register < 14) + else if(irq_register <= 13+3) object = irq_register-3; else return CANCHIP_IRQ_NONE;