C candide Active Member Licensed User Jun 8, 2020 #1 in an arduino library i have: - in cpp file Arduino: B4X: void LoRaClass::dumpRegisters(Stream& out) { for (int i = 0; i < 128; i++) { out.print("0x"); out.print(i, HEX); out.print(": 0x"); out.println(readRegister(i), HEX); } } - in h file Arduino: B4X: void dumpRegisters(Stream& out); after B4X wrapper i think we should arrive at : B4X: void dumpRawdata(B4RStream* Out); or B4X: B4RStream* dumpRawdata(); how to make wrapper for this stream ? i didn't find example to help on this stream.... where i can find an example ? thanks for your help Last edited: Jun 8, 2020
in an arduino library i have: - in cpp file Arduino: B4X: void LoRaClass::dumpRegisters(Stream& out) { for (int i = 0; i < 128; i++) { out.print("0x"); out.print(i, HEX); out.print(": 0x"); out.println(readRegister(i), HEX); } } - in h file Arduino: B4X: void dumpRegisters(Stream& out); after B4X wrapper i think we should arrive at : B4X: void dumpRawdata(B4RStream* Out); or B4X: B4RStream* dumpRawdata(); how to make wrapper for this stream ? i didn't find example to help on this stream.... where i can find an example ? thanks for your help
Erel B4X founder Staff member Licensed User Longtime User Jun 8, 2020 #2 B4X: void dumpRawdata(B4RStream* Out); You should then pass Out->wrappedStream to the LoRaClass.