From 6d1019b77ea2b0b17d1cc9fa58473758e05dd368 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 14 Jun 2018 14:40:00 +0700 Subject: [PATCH] add decription for ada_callback --- cores/nRF5/utility/AdaCallback.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cores/nRF5/utility/AdaCallback.h b/cores/nRF5/utility/AdaCallback.h index b753fcc6..33676dc5 100644 --- a/cores/nRF5/utility/AdaCallback.h +++ b/cores/nRF5/utility/AdaCallback.h @@ -102,7 +102,18 @@ typedef void (*adacb_5arg_t) (uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); ada_callback_queue(cb_data);\ } while(0) +/** + * Schedule an function and parameters to be invoked in Ada Callback Task + * Macro can take at least 2 and at max 7 arguments + * - 1st arg : pointer data that need to be freed with free(pointer) after function is invoked + * - 2nd arg : function to be invoked + * - 3rd-7th arg : function argument, will be cast to uint32_t + */ #define ada_callback(... ) _cb_setup(false, __VA_ARGS__) + +/** + * Similar to ada_callback() but invoke in ISR-context + */ #define ada_callback_fromISR(... ) _cb_setup(true , __VA_ARGS__) void ada_callback_init(void);