]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/sja1000.c
Added attach_to_chip() and release_chip() functions for each chip.
[lincan.git] / lincan / src / sja1000.c
index d43de2f176622cccb03281359f0d9840925803f6..71c7095adad847292cfa9f37cd14865eaa20061e 100644 (file)
@@ -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,6 +510,8 @@ 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;