diff --git a/Porting-to-non-Arduino-Platforms.md b/Porting-to-non-Arduino-Platforms.md index 5a4580e..e375156 100644 --- a/Porting-to-non-Arduino-Platforms.md +++ b/Porting-to-non-Arduino-Platforms.md @@ -21,4 +21,19 @@ void wrap_HAL_GPIO_WritePin(uint32_t pin, GPIO_PinState value) { } ``` -This has to be done for all Arduino functions listed on the page [Custom Build Configuration](https://github.com/jgromes/RadioLib/wiki/Custom-Build-Configuration). \ No newline at end of file +This has to be done for all Arduino functions listed on the page [Custom Build Configuration](https://github.com/jgromes/RadioLib/wiki/Custom-Build-Configuration). + +Once done, the last thing left to do is to initialize all callbacks defined in the `noarduino.h` file. The callbacks themselves are generated by RadioLib - the user only has to call the initalizing functions: + +```c++ +SX1278 radio = new Module(1, 2, 3, 4); + +(...) +radio.setCb_digitalRead(::wrap_HAL_GPIO_ReadPin); +radio.setCb_digitalWrite(::wrap_HAL_GPIO_WritePin); +// etc. for all the callbacks +(...) + +// we can go now! +radio.begin(); +``` \ No newline at end of file