arduino / arduino/ArduinoCore-API

Public API to increase buffer sizes

Abierto
#115 0 comentarios 2 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

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.

Guía de contribución

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

Línea de trabajo

Comienza revisando HardwareSerial.h, la instancia privada de RingBuffer y el typedef; después, compara el trabajo basado en templates del pull request 298 de ArduinoCore-samd. El diseño debe proporcionar una API pública para configurar el tamaño del búfer, utilizable desde sketches y bibliotecas en todos los Arduino cores, con un comportamiento no-op en los cores que no puedan variar el tamaño de los búferes.

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

Evaluación

Stack tecnológico
cpp
Área
api, embedded-iot
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.