]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add debug int and hex
authorBastian Dehn <hhaalo@arcor.de>
Fri, 16 Feb 2024 15:56:05 +0000 (16:56 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 16 Feb 2024 15:56:05 +0000 (16:56 +0100)
src/kds_s2000w_debug.c
src/kds_s2000w_debug.h

index 713f82ced41fc5e3abbe7d7e6273d17620324d09..c94466d74d0ff592f2c3334fe592cd2fc4c3b437 100644 (file)
@@ -6,3 +6,15 @@ void debug_printf(int level, const char* message)
        if (level <= LOGLEVEL)
                printf("%s\n", message);
 }
+
+void debug_printf_int(int level, const char* message, int value)
+{
+       if (level <= LOGLEVEL)
+               printf("%s: %i\n", message, value);
+}
+
+void debug_printf_hex(int level, const char* message, char value)
+{
+       if (level <= LOGLEVEL)
+               printf("%s: %hhx\n", message, value);
+}
\ No newline at end of file
index c00d6771d5208d59def1cdc048c726c5432fad90..20e0594270892afe1cd2d4aa963fb0b9639e707c 100644 (file)
@@ -12,4 +12,6 @@
 #define LOGLEVEL DEBUG
 
 void debug_printf(int level, const char* message);
+void debug_printf_int(int level, const char* message, int value);
+void debug_printf_hex(int level, const char* message, char value);
 #endif
\ No newline at end of file