-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate the CAN.cpp file into the thingset Zephyr module #21
Comments
That's a good point and applies not only to the CAN part, but also to the serial interface. I've got quite a bit of code duplication between the BMS firmware and the Charge Controller firmware because they basically use the same can.cpp and serial.cpp files. Now that the ThingSet library works as a proper Zephyr module, this may be done with the help of some Kconfig defines. The interface to the application would be to provide the |
Hello Martin,
|
Can we hide away the CAN/ Serial/ ... specifics by an abstract communication port before moving to this? My adhoc suggestion:
|
Where would this header file live? In the application or in the module? The problem is that the data nodes are currently obtained from other application files via
No, a standby pin is currently not supported by the Zephyr CAN driver. I talked to the CAN maintainer (alexanderwachter) some time ago if it would make sense to include it in the driver, but I don't remember our conclusion anymore... |
@b0661 I agree, it makes sense to finalize the port abstraction first and then implement the CAN and serial directly based on that interface. You would also move the entire driver handling into this library, so that the implementation is Zephyr-specific, correct? So the ThingSet module could still be used outside Zephyr by calling the @cfoucher-laas See here for related discussion about port abstraction: LibreSolar/esp32-edge-firmware#29 |
What I meant with that part is that the data nodes should be part of the user code, but may rely on a module header. |
Yes, I would have the port abstraction and maybe some common port functions in generic TS and the specific port implementation in the Zephyr directory (probably under |
Yeah I meant that we are using (handling) the existing Zephyr drivers in the port implementations. ThingSet port is a good term. |
Added #22 "RFC: Add ThingSet communication support framework" as a prototype where can.cpp may be integrated as a communication port. |
Hello everyone, While integrating Serial.cpp to our code, we've realized that all the configuration of the serial and the can are actually on the KConfig of the Zephyr folder. It will also be necessary to migrate them to the KConfig of the module when they are to be integrated. Luiz |
I can think of two scenarios
In case 1. the ThingSet module might just configure the Zephyr driver instance to use for the ThingSet serial port. All other configurations can be done for and by the Zephyr driver instance. In case 2. you have to provide all configuration options within the ThingSet module. Does this cover your use case? |
Hello
Context of the issue
We are using your can.cpp api together with the Thingset Zephyr module. This means we have two Zephyr modules linked to thingset: one is the thingset module and the other is the can.cpp together with the datanodes.
Description of the issue
We have to integrate the can.cpp file into our code which is actually useful for anyone using the thingset Zephyr module with can. There's very little code that is specific to our hardware (like the standby pin). We think this code should be integrated into your thingset module.
Cheers
Luiz
The text was updated successfully, but these errors were encountered: