Comments (4)
Hi Nicolas.
Great to hear that you have success with the can driver.
You are right we never came by a situation where the driver needed to have multiple instances for can, but we have for the kiss interface.
So you might get some inspiration on how that interface is made for multiple instances.
We found an issue with the can driver just recently so make sure you are forking from the latest master version.
We are planning on giving the driver an overhaul after the summer break, so I guess around September we will be giving it a new look.
It would be great if you would make a head start on some of the changes.
The multi instance
Locking inside the driver
Asynchronous versus synchronous send calls
Better handling of errors in the hardware
And finally a version that can run without a task.
Best regards
Johan.
Den 06/07/2015 kl. 18.26 skrev nicob87 <[email protected]mailto:[email protected]>:
Hi!, I have implemented our drivers for your can interface, and it is working perfectly, but I have found an issue:
We have 2 can peripherals in our micro-controller, so we need to create 2 can interfaces, and route them independently to different destinations.
I think this is happening because all of your hardware nodes only have "one" interface of each type. And yo have never deal with this issue.
To fix this problem some modifications needs to be done:
-
User needs to be able to create several instances of an interface. Right now interface is just a global variable declared in csp_if_can.c. Each interface would have at list a different name "can0", "can1".
-
"can_send" function needs to receive as parameter a pointer to the interface. And also the tx_callback. Right now I see you are receiving the interface in the csp_can_tx function, but you don't use it for nothing!
-
csp_can_init function, maybe should be split into 2 functions, one to be called only once for initializing queues and rxtask, and other to be called once for each interface....
If you are ok, I can try to do some refactor to implement this modifications, and that way I will be more sure about all modifications involved in fixing this issue. And the I show you the results. I won't be able to test all the drivers! I will only modify the signature of them.
I would like to know what do you think about this. Maybe you are already working on this...
Best Regards! Nicolas.
Reply to this email directly or view it on GitHubhttps://github.com/GomSpace/libcsp/issues/52.
from libcsp.
Great, will let you know as soon as I have something to show.
from libcsp.
The multiple interface instances would be useful for all interfaces. I have opened a new issue to track the progress here: https://github.com/GomSpace/libcsp/issues/61. I'm closing this issue for now.
from libcsp.
Hi! I agree the right solution is to do a major refactor to all interfaces, instead of just modifying one. Unfortunately we have no time to try to do that, so for now we are already using my branch, I hope in the future be able to merge with your master again.
Thanks for all the reviews you have done to my pull request. It has been really helpful.
Regards! Nicolás.
from libcsp.
Related Issues (20)
- Add install target in CMake
- No example how to use UDP HOT 3
- Move csp_macro.h to src/
- buildall.py fails in container HOT 5
- socketcan write() errors in csp_can_tx_frame(): ENOBUFS vs EAGAIN HOT 2
- kiss: Add node_id parameter
- Remove dynamic memory allocations like malloc and calloc
- Can't use ZMQ interface on csp_server_client with cmake HOT 1
- What is the correct way to use kiss uart on freertos? HOT 1
- Add disclaimer about latest version
- No reliable data transmission with RDP and CRC32 HOT 4
- Build in debug mode with waf HOT 2
- Compiling the library for Raspberry Pi Pico HOT 11
- csp with UART HOT 7
- csp_init() hangs up in csp_malloc() HOT 11
- Fix CI failures HOT 1
- Test KISS interface with Linux pty on CI HOT 1
- RDP and CRC32 dropping/duplicating packets HOT 6
- Zephyr server-client example hangs up HOT 19
- Using the CSP on an Arduino SAMD21 board using FreeRTOS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcsp.