arduino / arduino/ArduinoCore-API

SPI API add void transfer(const void *tx_buffer, void *rx_buffer, size_t count);

Đang mở
#243 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
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ả

### API component

SPI API

### Description

SPI API add
```
virtual void transfer(const void *tx_buffer, void *rx_buffer, size_t count);
```
[Expand SPI API and Functionality for High Speed Devices](https://github.com/arduino/ArduinoCore-API/discussions/189)

### Is this a breaking change?

Unlikely

### Additional information

This is really a missing API method, it doesn't make sense to have only a single buffer for both transmit and receive, as DMA hardware normally works in 2 buffers.
The plain old
https://github.com/arduino/ArduinoCore-API/blob/master/api/HardwareSPI.h#L112
```
virtual void transfer(void *buf, size_t count) = 0;
```
forces hacks such as:
- allocate a temporary buffer
- do the DMA transfers receiving into the temporary buffer
- copy that temporary buffer data back into the address pointed by *buf*
wasting both memory and cpu cycles

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 với api/HardwareSPI.h tại khai báo truyền hiện có với một bộ đệm, sau đó đọc cuộc thảo luận được liên kết để hiểu phạm vi dự kiến của SPI API. Truy vết các triển khai API và các đường dẫn xác minh bị ảnh hưởng trước khi thay đổi giao diện. Hoàn tất khi chữ ký truyền ảo hai bộ đệm được hỗ trợ nhất quán mà không cần workaround bộ đệm tạm thời.

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.