Description
Currently this library only works on certain boards, what about making it work on other boards too?
Since communication between MCU and NINA-W102 is carried out via a serial interface, I think in principle it is possible.
I think this would be useful when building a custom board connecting an arbitrary MCU to a W102 flashed with arduino/nina-fw.
I don't know details of this library so I apologize if I'm wrong, but for example, how about using a user-defined serial object if none of #if
macros below match?
ArduinoBLE/src/utility/HCIUartTransport.cpp
Lines 24 to 40 in 9263b3a
Example:
// Line 38~
#elif defined(SerialBLE)
#define SerialHCI SerialBLE
#else
#error "..."
#endif
SerialBLE
is user-defined macro.
Define in sketch file.
// Sketch
#define SerialBLE Serial2
void setup() {}
void loop() {}
Alternatively, you may specify SerialHCI
directly from sketch file without using a user-defined macro.
// Line 38~
#elif defined(SerialHCI)
// Already defined by user.
#else
#error "..."
#endif
// Sketch
# define SerialHCI Serial2
void setup() {}
void loop() {}