kopia lustrzana https://github.com/jgromes/RadioLib
Updated Porting to non Arduino Platforms (markdown)
rodzic
55d473e010
commit
497551e39d
|
@ -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
|
||||
(...)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue