arduino / arduino/ArduinoCore-API

Trouble with static buffer sizes within the RingBuffer libray

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

説明

(Arduino 1.6.18.1)

- Serial communication:

If serial data are read and the attached device does not support any flow control (like most devices that you can buy) the CPU must be in receive mode all over the time. The data received are buffered in a static preallocated 128 byte buffer SAM) within the Arduino library.

The user application must periodical check if there are data and read them and must do it fast enough, before buffer overflow.

If you do for example SD-card-i/o, the SD-card may awake from sleep mode and that cost a few 100ms, you can quickly get an overflow of the serial buffer.

The only chance to overcome this situation is to align the serial buffer size to your application. If there is no flow control on receive, one cannot use a fixed size for all projects.

Please implement a simple method, that the user can set the size of the buffer from within the project (AVR, SAM, and SAMD(?)).

Currently one must modify (SAM): "Ringbuffer.h" => "#define SERIAL_BUFFER_SIZE xxxxx".

(This topic is currently in discussion within the Arduino group.)

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

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

調査の方向性

まず Ringbuffer.h と issue で言及されている SERIAL_BUFFER_SIZE の定義を確認し、次に Arduino ライブラリが AVR、SAM、SAMD でバッファーをどのように扱っているかを比較します。ライブラリを編集せずにプロジェクトでサイズを設定する方法を定義し、影響を受けるプラットフォームで選択したサイズが適用されることを確認します。

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

評価

技術スタック
arduino, cpp
領域
embedded-iot
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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