arduino / arduino/ArduinoCore-API

Trouble with static buffer sizes within the RingBuffer libray

Abierto
#78 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
306
Forks
150
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

(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.)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza con Ringbuffer.h y la definición SERIAL_BUFFER_SIZE mencionada en la issue; después, compara cómo la biblioteca Arduino gestiona el búfer para AVR, SAM y SAMD. Define cómo debe establecer un proyecto el tamaño sin editar la biblioteca y verifica que el tamaño elegido se respete en las plataformas afectadas.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
arduino, cpp
Área
embedded-iot
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.