diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/dlt/dlt_user.h | 2 | ||||
-rw-r--r-- | include/dlt/dlt_user_macros.h | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index 8e676c6..f8691d7 100644 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -127,6 +127,8 @@ typedef struct { uint32_t service_id; int (*injection_callback)(uint32_t service_id, void *data, uint32_t length); + int (*injection_callback_with_id)(uint32_t service_id, void *data, uint32_t length, void *priv_data); + void *data; } DltUserInjectionCallback; typedef struct diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h index e1b1267..74dea64 100644 --- a/include/dlt/dlt_user_macros.h +++ b/include/dlt/dlt_user_macros.h @@ -165,6 +165,16 @@ (void)dlt_register_injection_callback(&(CONTEXT),SERVICEID, CALLBACK);} while(0) /** + * Register callback function called when injection message was received + * @param CONTEXT object containing information about one special logging context + * @param SERVICEID service id of the injection message + * @param CALLBACK function pointer to callback function + * @param PRIV_DATA data specific to context + */ +#define DLT_REGISTER_INJECTION_CALLBACK_WITH_ID(CONTEXT, SERVICEID, CALLBACK, PRIV_DATA) do{\ + (void)dlt_register_injection_callback_with_id(&(CONTEXT),SERVICEID, CALLBACK, PRIV_DATA);} while(0) + +/** * Register callback function called when log level of context was changed * @param CONTEXT object containing information about one special logging context * @param CALLBACK function pointer to callback function |