Don't use fixed size integer types in the public header
authorAntonio Ospite <ospite@studenti.unina.it>
Wed, 25 Jan 2012 14:50:41 +0000 (15:50 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Wed, 25 Jan 2012 14:57:30 +0000 (15:57 +0100)
The rationale behind this is that a user of the library is interested in
the meaning of the data passed, not on its storage size.

src/am7xxx.h
src/picoproj.c

index 39e12e3..e30057b 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef __AM7XXX_H
 #define __AM7XXX_H
 
 #ifndef __AM7XXX_H
 #define __AM7XXX_H
 
-#include <stdint.h>
 #include <libusb-1.0/libusb.h>
 
 #ifdef __cplusplus
 #include <libusb-1.0/libusb.h>
 
 #ifdef __cplusplus
@@ -55,7 +54,7 @@ int am7xxx_send_image(am7xxx_device dev,
                      am7xxx_image_format format,
                      unsigned int width,
                      unsigned int height,
                      am7xxx_image_format format,
                      unsigned int width,
                      unsigned int height,
-                     uint8_t *image,
+                     unsigned char *image,
                      unsigned int size);
 
 /*
                      unsigned int size);
 
 /*
index 8d511b9..f8eb5bc 100644 (file)
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
        int format = AM7XXX_IMAGE_FORMAT_JPEG;
        int width = 800;
        int height = 480;
        int format = AM7XXX_IMAGE_FORMAT_JPEG;
        int width = 800;
        int height = 480;
-       uint8_t *image;
+       unsigned char *image;
        unsigned int size;
        unsigned int native_width;
        unsigned int native_height;
        unsigned int size;
        unsigned int native_width;
        unsigned int native_height;