irq: Add a warning if the name is NULL
[simavr] / simavr / sim / avr_usb.h
index 609ffb6..17e5c0d 100644 (file)
        along with simavr.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef AVR_USB_H_
-#define AVR_USB_H_
+#ifndef __AVR_USB_H__
+#define __AVR_USB_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #include "sim_avr.h"
 
@@ -39,7 +43,7 @@ enum {
 
 struct avr_io_usb {
        uint8_t pipe;   //[in]
-       size_t  sz;             //[in/out]
+       uint32_t  sz;           //[in/out]
        uint8_t * buf;  //[in/out]
 };
 #define AVR_IOCTL_USB_NAK -2
@@ -63,4 +67,8 @@ typedef struct avr_usb_t {
 
 void avr_usb_init(avr_t * avr, avr_usb_t * port);
 
-#endif /* AVR_USB_H_ */
+#ifdef __cplusplus
+};
+#endif
+
+#endif /*__AVR_USB_H__*/