Comments (1)
OK, so AvailableForWrite
is an Arduino call that says how much space there is in its internal buffer. If your platform only has 39 bytes then a 60 byte frame isn't going to fit and if you lie to MIN and say there's space then the Arduino buffer will overflow. I'm not sure how Arduino will handle overflows, though. So what you could do is create your own buffering scheme on top.
How it could work is that you create your own FIFO code in software, with a static buffer, and then report back to MIN not the space in the Arduino buffer but the space in your software FIFO (there's code in MIN to do a simple FIFO you could base it on - a power-of-2 sized FIFO can be implemented quite easily). Then in periodic polling function you check to see how much space there is in the Arduino buffer (using AvailableForWrite
and move up to that much out of your software FIFO into the Arduino software.
from min.
Related Issues (20)
- MIN protocol not working properly on TI MCUs but works on STM HOT 2
- Escape 0x03 (CTRL-C)
- Question regarding the signal layer json HOT 2
- Question: Is Data-Streaming Supported? HOT 2
- Ability to calculate CRC in HW HOT 1
- Time-based frame-delimiting HOT 4
- A Rust library for MIN. HOT 1
- Any port for C#? HOT 2
- STM32Cube USB VCP HOT 9
- Review Comments
- Received spurious ACK HOT 2
- Testing MIN with serial monitor HOT 2
- How to include in C++ project? HOT 1
- Possible bug in the code
- Multiple Ports HOT 2
- Memory conflict: Multiple MIN ports access the same payloads_ring_buffer HOT 2
- Time variable not initialized in transport_fifo_reset HOT 1
- Python package
- What is the best practice for calling min_poll HOT 4
- Python host vs target C implementations
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 min.