X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/ce9505f94bf87d40caeed0b0452e39f95ed521b1..9a1b084e56fae7b3a42d15a4e0fc4bc1352d46f8:/lincan/src/sja1000.c diff --git a/lincan/src/sja1000.c b/lincan/src/sja1000.c index d43de2f..de3ab20 100644 --- a/lincan/src/sja1000.c +++ b/lincan/src/sja1000.c @@ -305,6 +305,19 @@ int sja1000_stop_chip(struct canchip_t *chip) return 0; } +int sja1000_attach_to_chip(struct canchip_t *chip) +{ + return 0; +} + +int sja1000_release_chip(struct canchip_t *chip) +{ + sja1000_stop_chip(chip); + can_write_reg(chip,sjaCR_RR,SJACR); + + return 0; +} + int sja1000_remote_request(struct canchip_t *chip, struct msgobj_t *obj) { CANMSG("sja1000_remote_request not implemented\n"); @@ -497,10 +510,12 @@ int sja1000_register(struct chipspecops_t *chipspecops) chipspecops->enable_configuration = sja1000_enable_configuration; chipspecops->disable_configuration = sja1000_disable_configuration; chipspecops->set_btregs = sja1000_set_btregs; + chipspecops->attach_to_chip=sja1000_attach_to_chip; + chipspecops->release_chip=sja1000_release_chip; chipspecops->start_chip = sja1000_start_chip; chipspecops->stop_chip = sja1000_stop_chip; chipspecops->irq_handler = sja1000_irq_handler; - chipspecops->irq_handler = NULL; + chipspecops->irq_accept = NULL; return 0; }