-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding SPI Arduino Core Library #13
Comments
Hi @rcalcover. I think you don't need Also think that the implementation for |
Hi Guys, Trying to setup testing for a project that includes an SPI CAN bus adapter (MCP2515), and the library for this (ACAN2515) obviously includes SPI.h, which currently throws an error |
my SPIFake seems to run now, currently working on adding some tests. last think I can not figure out is to pass SPISettings @FabioBatSilva any hint why this line fails? |
I think you were missing the class SPISettings {
private:
uint32_t clock;
uint8_t bitOrder;
uint8_t dataMode;
public:
SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) : clock(clock), bitOrder(bitOrder), dataMode(dataMode) {}
SPISettings() { SPISettings(4000000, MSBFIRST, SPI_MODE0); }
friend class SPIClass;
bool operator==(const SPISettings &other) const {
return (clock == other.clock) && (bitOrder == other.bitOrder) && (dataMode == other.dataMode);
}
}; |
Thanks everyone.. PR #37 got merged, will publish a new version next. |
Hi I am trying to add SPI Arduino Core library and contribute in ArduinoFake for the community.
I have followed the contribution guidelines and added SPI the same way as the
Print
since its quite similar to it. The issue was that I encountered an error that I was stuck onArduinoFake.h
:It showed when I added
_ArduinoFakeInstanceGetter2(SPIClass, SPIClass)
onArduinoFakeContext
.Maybe because SPI Class has static members? But I have removed the
static
modifier on the members of SPIClass but it did not fixed the problem.I have forked your repo to and made a branch to work on here is the link of my rcalcover#1
The text was updated successfully, but these errors were encountered: