Updated Porting to non Arduino Platforms (markdown)

master
Jan Gromeš 2023-04-09 08:58:51 +02:00
rodzic 55d473e010
commit 497551e39d
1 zmienionych plików z 5 dodań i 3 usunięć

@ -26,11 +26,13 @@ This has to be done for all Arduino functions listed on the page [Custom Build C
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);
// some random NSS/IRQ/RST/GPIO pins
Module mod(1, 2, 3, 4);
SX1278 radio(&mod);
(...)
radio.setCb_digitalRead(::wrap_HAL_GPIO_ReadPin);
radio.setCb_digitalWrite(::wrap_HAL_GPIO_WritePin);
mod.setCb_digitalRead(::wrap_HAL_GPIO_ReadPin);
mod.setCb_digitalWrite(::wrap_HAL_GPIO_WritePin);
// etc. for all the callbacks
(...)