[En-Nut-Discussion] RFC: CAN Bus driver buffer handling

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Aug 4 15:25:43 CEST 2009

Hi all,

I'm currently writing a CAN bus driver for the SAM7x and try to reuse
the same API the other platforms (ATMega with SJA1000 / AT90CAN) use.

I noticed that both mentioned drivers implement their own buffer
structure for rx / tx buffering. Both are based on the same concept.

I'd better like a common concept for can bus buffering and would like to
implement a can bus buffer api in dev/can_dev.c which might be used
commonly by all drivers. I'd add a rx and tx buffer pointer to the
CANINFO struct.

This concept would also allow to have multiple can bus drivers in one

Any comments?



PS: I could adapt sja1000.c accordingly. But atcan.c (AT90CAN driver)
directly includes the buffer handling into the interrupt routine so I'd
like to ask henrik to adapt his driver.

|                                                             |
| Embedded-IT                                                 |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |

More information about the En-Nut-Discussion mailing list