arduino / arduino/ArduinoCore-API
VirtualPins
- Ngôn ngữ chính
- C++
- Star
- 306
- Fork
- 150
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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_
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng việc xem xét tệp wiring_digital và ánh xạ chân pins_arduino, sau đó so sánh hành vi được đề xuất với phần triển khai và các bài kiểm thử trong repository VirtualPins được liên kết. Đề xuất được xem là hoàn chỉnh khi các API chân hiện có vẫn tương thích, các ánh xạ ảo có thể truyền nội dung qua SPI hoặc I2C và chứng minh được rằng ảnh hưởng đến hiệu năng là tối thiểu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- api, embedded-iot
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100