I developam developing a device with Ethernet shield (with Wiznet W5100) and NRF24L01+. Here I need to use Soft SPI due to a bug in the Wiznet chip. Next I developam developing a different device with NRF24L01+ only. Here I want to use hardware SPI (Besidesbesides other things it already contains a socket for NRF24L01+ connected to the default Arduino SPI pins).
It is very inconvenient to enable/disable #define SOFTSPI
in RF24_config.h
every time I want to work on the other device.
Is there a way how to choose the SPI type used by RF24 library in the application?
My current solution is to make a copy of RF24 to RF24_SoftSpi and RF24Network to RF24Network_SoftSpi. EnabledI enabled SOFTSPI in "_SoftSpi" versions (+ renamerenamed all files, fixfixed includes and #ifndef statements in headers to avoid ambiguous errors).
Then in an application I just include RF24_SoftSpi instead of RF24 and RF24Network_SoftSpi instead of RF24Network to use software SPI.
With this workaround it is difficult to make updates to "_SoftSpi" libraries when a new feature is released.
Do you know of any better solution?
I develop a device with Ethernet shield (with Wiznet W5100) and NRF24L01+. Here I need to use Soft SPI due to a bug in Wiznet chip. Next I develop a different device with NRF24L01+ only. Here I want to use hardware SPI (Besides other things it already contains socket for NRF24L01+ connected to default Arduino SPI pins).
It is very inconvenient to enable/disable #define SOFTSPI
in RF24_config.h
every time I want to work on the other device.
Is there a way how to choose SPI type used by RF24 library in application?
My current solution is to make copy of RF24 to RF24_SoftSpi and RF24Network to RF24Network_SoftSpi. Enabled SOFTSPI in "_SoftSpi" versions (+ rename all files, fix includes and #ifndef statements in headers to avoid ambiguous errors).
Then in an application I just include RF24_SoftSpi instead of RF24 and RF24Network_SoftSpi instead of RF24Network to use software SPI.
With this workaround it is difficult to make updates to "_SoftSpi" libraries when a new feature is released.
Do you know any better solution?
I am developing a device with Ethernet shield (with Wiznet W5100) and NRF24L01+. I need to use Soft SPI due to a bug in the Wiznet chip. Next I am developing a different device with NRF24L01+ only. I want to use hardware SPI (besides other things it already contains a socket for NRF24L01+ connected to the default Arduino SPI pins).
It is very inconvenient to enable/disable #define SOFTSPI
in RF24_config.h
every time I want to work on the other device.
Is there a way how to choose the SPI type used by RF24 library in the application?
My current solution is to make a copy of RF24 to RF24_SoftSpi and RF24Network to RF24Network_SoftSpi. I enabled SOFTSPI in "_SoftSpi" versions (+ renamed all files, fixed includes and #ifndef statements in headers to avoid ambiguous errors).
Then in an application I just include RF24_SoftSpi instead of RF24 and RF24Network_SoftSpi instead of RF24Network to use software SPI.
With this workaround it is difficult to make updates to "_SoftSpi" libraries when a new feature is released.
Do you know of any better solution?
How to choose SPI type used by RF24 library from application?
I develop a device with Ethernet shield (with Wiznet W5100) and NRF24L01+. Here I need to use Soft SPI due to a bug in Wiznet chip. Next I develop a different device with NRF24L01+ only. Here I want to use hardware SPI (Besides other things it already contains socket for NRF24L01+ connected to default Arduino SPI pins).
It is very inconvenient to enable/disable #define SOFTSPI
in RF24_config.h
every time I want to work on the other device.
Is there a way how to choose SPI type used by RF24 library in application?
My current solution is to make copy of RF24 to RF24_SoftSpi and RF24Network to RF24Network_SoftSpi. Enabled SOFTSPI in "_SoftSpi" versions (+ rename all files, fix includes and #ifndef statements in headers to avoid ambiguous errors).
Then in an application I just include RF24_SoftSpi instead of RF24 and RF24Network_SoftSpi instead of RF24Network to use software SPI.
With this workaround it is difficult to make updates to "_SoftSpi" libraries when a new feature is released.
Do you know any better solution?