arduino / arduino/ArduinoCore-API
Public API to increase buffer sizes
- Ngôn ngữ chính
- C++
- Star
- 306
- Fork
- 150
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The need for Arduino sketches to increase buffer sizes, particularly for HardwareSerial and the Wire library, has been discussed many times.
A mail list thread on May 3-4, 2017 and subsequent github work on a branch on @facchinm's repository ultimately lead to making the RingBuffer class template based: https://github.com/arduino/ArduinoCore-samd/pull/298. While beautiful internally, this is not a public API. Inside HardwareSerial.h, the RingBuffer instance is private. The size is also hidden by a typedef, further obscuring the possibility of increasing the buffer, even from someone so bold as to edit the private class members.
A public API which can actually be used from Arduino sketches & libraries is needed. It needs to be implemented in all Arduino cores, with do-nothing functions in cores which doesn't support variable buffer size, so end users can actually use the public API in their sketches and share their source code with confidence it will at least compile on all other boards.
Previous conversations have involved overloading begin(), perhaps using special classes to represent buffers, and adding functions like addMemory(), addMemoryForWrite(), addStorageForWrite(), addMemoryForRead() to allow users to increase or replace buffer memory at runtime.
But previous work has always stalled far short of actually providing a public API which can actually be used throughout the Arduino ecosystem. A public API which people can actually use without editing the core library or Wire library really is needed.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách xem xét HardwareSerial.h, instance RingBuffer private và typedef, sau đó so sánh phần triển khai dựa trên template trong pull request 298 của ArduinoCore-samd. Thiết kế phải cung cấp một API public để cấu hình kích thước buffer, có thể sử dụng từ sketch và library trên tất cả Arduino core, với hành vi no-op trên các core không thể thay đổi kích thước buffer.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- api, embedded-iot
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100