Coder Social home page Coder Social logo

Comments (4)

PowerBroker2 avatar PowerBroker2 commented on May 27, 2024

That part of the library is commented out because Arduino core developers are stupid and have different SPI APIs across different boards - making SPI data transfer libraries like this super difficult. Can post the entire error?

from serialtransfer.

AtherSaleem avatar AtherSaleem commented on May 27, 2024

Thanks for Response:

Command: sendSize = myTransfer.txObj(testStruct, sendSize);
Error: sendSize = no matching function for call to 'SPITransfer::txObj(STRUCT&, uint16_t&)'

Command: sendSize = myTransfer.txObj(arr, sendSize);
Error: invalid conversion from 'char*' to 'int' [-fpermissive]

I am using ESP32 Dev Kit C

from serialtransfer.

PowerBroker2 avatar PowerBroker2 commented on May 27, 2024

This error doesn't make sense considering the first argument for SPITransfer::txObj() is templated:

uint16_t SPITransfer::txObj(const T &val, const uint16_t &index=0, const uint16_t &len=sizeof(T))
Description:
------------
* Stuffs "len" number of bytes of an arbitrary object (byte, int,
float, double, struct, etc...) into the transmit buffer (txBuff)
starting at the index as specified by the argument "index"
Inputs:
-------
* const T &val - Pointer to the object to be copied to the
transmit buffer (txBuff)
* const uint16_t &index - Starting index of the object within the
transmit buffer (txBuff)
* const uint16_t &len - Number of bytes of the object "val" to transmit
Return:
-------
* uint16_t maxIndex - uint16_t maxIndex - Index of the transmit buffer (txBuff) that directly follows the bytes processed
by the calling of this member function
*//*
template <typename T>
uint16_t txObj(const T& val, const uint16_t& index = 0, const uint16_t& len = sizeof(T))
{
return packet.txObj(val, index, len);
}

I honestly don't know what's going wrong - perhaps someone on the Arduino forum would be of more help

from serialtransfer.

AtherSaleem avatar AtherSaleem commented on May 27, 2024

I just revisted .h and .cpp

There is some stuff like this:
Description:
------------
* Stuffs "len" number of bytes of an arbitrary object (byte, int,
float, double, struct, etc...) into the transmit buffer (txBuff)
starting at the index as specified by the argument "index"
Inputs:
-------

This seems to be Comment but not marked as comment.

This one:
*** const T &val - Pointer to the object to be copied to the**
Not sure what it is , declaration or Comment , may be this needs to be separated.

Had I been this expert to do myself, I would be developing libraries not using them , LoL

from serialtransfer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.