X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/1b6d7503d59302cc11198b5cbb001c19a45abc9e..fc52afd2db4b338e8ca30467f475cba1f1e40ebd:/lincan/src/i82527.c 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;