From aec2e074d2839316310d66a6b18580eda9f3263e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Grome=C5=A1?= Date: Sun, 9 Apr 2023 22:39:13 +0200 Subject: [PATCH] Updated Porting to non Arduino Platforms (markdown) --- Porting-to-non-Arduino-Platforms.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Porting-to-non-Arduino-Platforms.md b/Porting-to-non-Arduino-Platforms.md index b5c187f..5a2f2eb 100644 --- a/Porting-to-non-Arduino-Platforms.md +++ b/Porting-to-non-Arduino-Platforms.md @@ -8,7 +8,12 @@ The `noarduino.h` file has to define all the platform macros shown in [Custom Bu // noarduino.h // forward declaration void wrap_HAL_GPIO_WritePin(uint8_t pin, uint8_t value); -#define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, wrap_HAL_GPIO_WritePin, uint32_t pin, GPIO_PinState value) + +// callback argument macro +// the first argument is the return type of the wrapper function +// the second argument is the name of the corresponding Arduino function +// all other arguments are the arguments of the wrapper function +#define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, uint32_t pin, GPIO_PinState value) // noarduino.c/cpp // now the implementation - pin number also includes the GPIOx port