SerialTransfer
SerialTransfer copied to clipboard
Ver 3.1.3 SPI spi_tx_data -- 'SPITransfer' does not name a type;
Describe the bug Compile/Verify Error: 'SPITransfer' does not name a type; did you mean 'spiTransfer'?
To Reproduce Steps to reproduce the behavior:
- Expamle spi_tx_data
- Compile/Verify
Expected behavior Expample should compile without errors
Desktop (please complete the following information):
- Tried on both Arduino IDE (1.8.19 & 2.0.3) for windows
- Arduino IDE (2.0.3) Linux
- Seems Library Error
Edit: I tried to look at .h and .cpp and found Comment out codes. I un comment all of it, but still was unable to use library. Some procedures were still not found by the Compiler.
- Can I have a copy of working SPI Library
- Why the code is Commented?
-- I have used library for UART/Serial ports both Hard and Soft works perfectly, just getting this error while trying on SPI.
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?
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
This error doesn't make sense considering the first argument for SPITransfer::txObj() is templated:
https://github.com/PowerBroker2/SerialTransfer/blob/c596233371af2735c1a20be8f70f5e5ce30bb278/src/SPITransfer.h#L27-L49
I honestly don't know what's going wrong - perhaps someone on the Arduino forum would be of more help
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