arduino / arduino/ArduinoCore-API

Public API to increase buffer sizes

オープン
#115 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
306
フォーク
150
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず HardwareSerial.h、private な RingBuffer インスタンス、typedef を確認し、次に ArduinoCore-samd の pull request 298 にある template ベースの実装と比較してください。設計では、すべての Arduino core で sketch とライブラリから使用できる、バッファサイズ設定用の public API を提供する必要があります。バッファサイズを変更できない core では no-op の動作にしてください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
api, embedded-iot
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。