From 69b0996faf05eb7e78a0a8144bdc3187aa5a44a0 Mon Sep 17 00:00:00 2001 From: Rainer Kordmaa Date: Tue, 5 Mar 2024 23:29:35 +0200 Subject: [PATCH] logger string from unsigned char* to char* --- src/ethercat_src.h | 2 +- src/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ethercat_src.h b/src/ethercat_src.h index 7c85c1a..3d73703 100644 --- a/src/ethercat_src.h +++ b/src/ethercat_src.h @@ -9,7 +9,7 @@ typedef u_int8_t *(*int8var_call_back) (int); typedef u_int16_t *(*int16var_call_back) (int); typedef u_int32_t *(*int32var_call_back) (int); typedef u_int64_t *(*int64var_call_back) (int); -typedef void (*type_logger_callback) (unsigned char*); +typedef void (*type_logger_callback) (char*); // Setup before realtime int ethercat_configure(char *paramsfile, type_logger_callback); diff --git a/src/main.c b/src/main.c index 82cd685..f1ccf60 100644 --- a/src/main.c +++ b/src/main.c @@ -41,7 +41,7 @@ uint32_t *dint_input_call_back(int a){ return &dwordvar; } uint32_t *dint_output_call_back(int a){ return &dwordvar; } uint64_t *lint_input_call_back(int a){ return &lwordvar; } uint64_t *lint_output_call_back(int a){ return &lwordvar; } -void logger_callbackf(unsigned char *msg){ printf("PLC log: %s", msg); } +void logger_callbackf(char *msg){ printf("PLC log: %s", msg); } //----------------------------------------------------------------------------- // Helper function - Makes the running thread sleep for the ammount of time