arduino / arduino/ArduinoCore-API

VirtualPins

未关闭
#79 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
306
派生
150
PR 合并指标
30 天内没有已合并 PR

描述

Hi!

I have and enhancement proposal to do small changes in the wiring_digital file and pins_arduino pin mapping, fully preserving compatibility, virtualizing the pins concept and do media (SPI,I2C, etc..) abstraction.
With minimal impact on existing function performance. The existing checks can work on an extended pin map and only adding an if, comparing pin number with a constant to existing functions (digital read/write).

In case of mapping to a virtual pin then the "content" is sent over an SPI or I2C (according to the map).

with this changes, libraries like LiquidCristal wouldn't have to be rewritten to control the same LCD's wired over SPI or I2C.

There are a LOT of advantages beside the mentioned one, but just for that I thinks it worth the effort considering the minimal impact it has.

I've done the implementation and some tests, available here for testing/appreciation:

https://github.com/neu-rah/VirtualPins

but I wish to put it here for discussion first and to get some advice on how should I proceed.

1. do a pull request with the changes to the arduino environment.
2. implement an alternative core and board that use virtual pins by duplicating some of the existing boards and pointing them to the alternative core.

waiting for feedback.

thanks.

_P.S. this was once done (in bad timing, to and older IDE) but now I'm available again and ported it to 1.8.3_

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查 wiring_digital 文件和 pins_arduino 引脚映射,然后将提议的行为与链接的 VirtualPins 仓库中的实现和测试进行比较。当现有引脚 API 保持兼容、虚拟映射可以通过 SPI 或 I2C 传输内容,并且证明对性能的影响最小化时,该提议即告完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
api, embedded-iot
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。