Skip to content

Additional CAN trait for extended features #381

Open
@mlsvrts

Description

@mlsvrts

The current embedded-hal CAN trait seems to only support 'transmit' and 'receive', but commonly higher level applications will need support at least:

  • Opening and closing the node
  • Setting the baudrate

Additionally, it can be useful to have support for:

  • Reading the bus state flags
  • Putting the device into listen-only mode

For instance, consider the options supported by the linux can-utils slcand daemon: https://github.com/linux-can/can-utils/blob/master/slcand.c

I think that it would be reasonable to have some CanState trait, that supports open/close, alongside a CanSpeed trait that allows setting (+getting?) the device baudrate -- but I would be interested to hear other opinions/comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions