Closed andybrown668 closed 7 years ago
Hi, @andybrown668! Thank you for pleasant words regarding this lib :) Give me few days and I will come back with extended answer. Frankly, I never try to cross comply this lib (and made all this stuff few years ago), so give me some time to reproduce this issue, with the approach you describe.
@andybrown668, thanks again for pointing issue in C-code! Your changes proposed merged to the library.
Hi, thanks for the lib - works great! here's a patch to get rid of compiler warnings - I see these when cross-compiling to arm with CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=6 go build
----------------------------------- dht.go.h ----------------------------------- index 6cda1e0..fc05c70 100644 @@ -7,6 +7,7 @@
include
include
include
+#include
// GPIO direction: receive either output data to specific GPIO pin.
define IN 0
@@ -52,7 +53,9 @@ static int gpio_export(int port, Pin pin) { } (pin).pin = port; bytes_written = snprintf(buffer, BUFFER_MAX, "%d", (*pin).pin);
} close(fd);
define DIRECTION_MAX 35
@@ -92,7 +95,9 @@ static int gpio_unexport(Pin *pin) { }
bytes_written = snprintf(buffer, BUFFER_MAX, "%d", (*pin).pin);