kopia lustrzana https://github.com/jgromes/RadioLib
Updated Porting to non Arduino Platforms (markdown)
rodzic
e4688e5e05
commit
d1a202ed8a
|
@ -22,3 +22,18 @@ 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).
|
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();
|
||||||
|
```
|
Ładowanie…
Reference in New Issue