Skip to content

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

@ag88

Description

@ag88

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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy