diff options
author | cbdev <cb@cbcdn.com> | 2023-08-24 02:07:28 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2023-08-24 02:07:28 +0200 |
commit | 4067c12e4d714eca7dfe84417a3ecbb227cb85f3 (patch) | |
tree | 3d77dbb058442d9b371d7b140e217edf13132c55 | |
parent | 55ba12aad7a9e368345e327f55ec5ddae4dbdb74 (diff) | |
download | libyhy-4067c12e4d714eca7dfe84417a3ecbb227cb85f3.tar.gz libyhy-4067c12e4d714eca7dfe84417a3ecbb227cb85f3.tar.bz2 libyhy-4067c12e4d714eca7dfe84417a3ecbb227cb85f3.zip |
-rw-r--r-- | libyhy.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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; |