summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libyhy.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libyhy.c b/libyhy.c
index 77fd89b..6ed51ac 100644
--- a/libyhy.c
+++ b/libyhy.c
@@ -9,6 +9,12 @@
#ifdef DEBUG
#include <stdio.h>
#define DBG(x) (x)
+ static void xxd(uint8_t* buf, size_t len){
+ size_t n;
+ for(n = 0; n < len; n++){
+ printf("%02X ", buf[n]);
+ }
+ }
#else
#define DBG(x)
#endif
@@ -97,13 +103,6 @@ enum /*_yhy_command*/ {
* uint8_t[4] data */
};
-static void xxd(uint8_t* buf, size_t len){
- size_t n;
- for(n = 0; n < len; n++){
- DBG(printf("%02X ", buf[n]));
- }
-}
-
static ssize_t yhy_send_command(int fd, uint16_t node, uint16_t cmd, uint8_t* payload, size_t len){
size_t n;
uint8_t checksum = 0x00;