Make including am7xxx.h in C++ code safe
authorAntonio Ospite <ospite@studenti.unina.it>
Fri, 13 Jan 2012 12:37:32 +0000 (13:37 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Fri, 13 Jan 2012 12:37:32 +0000 (13:37 +0100)
src/am7xxx.h

index d8d69d7..e67ec9f 100644 (file)
 #include <stdint.h>
 #include <libusb-1.0/libusb.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef libusb_device_handle *am7xxx_device;
 
 typedef enum {
@@ -87,4 +91,8 @@ int am7xxx_send_image(am7xxx_device dev,
                      uint8_t *image,
                      unsigned int size);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __AM7XXX_H */