firmware/usb_compile_time_validation.h
author root@rika
Thu, 23 Apr 2009 20:55:41 +0200
changeset 33 7a0c4b0354ba
parent 2 2f55e5dd591d
permissions -rw-r--r--
updated documentation
     1 /*********************************************************************
     2  *
     3  *                Microchip USB C18 Firmware Version 1.0
     4  *
     5  *********************************************************************
     6  * FileName:        usb_compile_time_validation.h
     7  * Dependencies:    See INCLUDES section below
     8  * Processor:       PIC18
     9  * Compiler:        C18 2.30.01+
    10  * Company:         Microchip Technology, Inc.
    11  *
    12  * Software License Agreement
    13  *
    14  * The software supplied herewith by Microchip Technology Incorporated
    15  * (the “Company”) for its PICmicro® Microcontroller is intended and
    16  * supplied to you, the Company’s customer, for use solely and
    17  * exclusively on Microchip PICmicro Microcontroller products. The
    18  * software is owned by the Company and/or its supplier, and is
    19  * protected under applicable copyright laws. All rights are reserved.
    20  * Any use in violation of the foregoing restrictions may subject the
    21  * user to criminal sanctions under applicable laws, as well as to
    22  * civil liability for the breach of the terms and conditions of this
    23  * license.
    24  *
    25  * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
    26  * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
    27  * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
    28  * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
    29  * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
    30  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
    31  *
    32  * Author               Date        Comment
    33  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    34  * Rawin Rojvanit       7/10/04     Original.
    35  ********************************************************************/
    36 
    37 #ifndef USB_COMPILE_TIME_VALIDATION_H
    38 #define USB_COMPILE_TIME_VALIDATION_H
    39 
    40 /** I N C L U D E S *************************************************/
    41 #include "typedefs.h"
    42 #include "usb.h"
    43 
    44 /** U S B  V A L I D A T I O N **************************************/
    45 
    46 #if (EP0_BUFF_SIZE != 8) && (EP0_BUFF_SIZE != 16) && \\
    47     (EP0_BUFF_SIZE != 32) && (EP0_BUFF_SIZE != 64)
    48 #error(Invalid buffer size for endpoint 0,check "usbcfg.h")
    49 #endif
    50 
    51 #if defined(HID_INT_OUT_EP_SIZE)
    52     #if (HID_INT_OUT_EP_SIZE > 64)
    53         #error(HID Out endpoint size cannot be bigger than 64, check "usbcfg.h")
    54     #endif
    55 #endif
    56 
    57 #ifdef HID_INT_IN_EP_SIZE
    58     #if (HID_INT_IN_EP_SIZE > 64)
    59         #error(HID In endpoint size cannot be bigger than 64, check "usbcfg.h")
    60     #endif
    61 #endif
    62 
    63 #endif //USB_COMPILE_TIME_VALIDATION_H