Advertisement
Guest User

mpusbapi.h

a guest
Feb 23rd, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.36 KB | None | 0 0
  1. /*********************************************************************
  2.  *
  3.  *                  MPUSBAPI Library Version 1.00
  4.  *
  5.  *********************************************************************
  6.  * FileName:        mpusbapi.h
  7.  * Dependencies:    None
  8.  * Compiler:        C++
  9.  * Company:         Copyright (C) 2004 by Microchip Technology, Inc.
  10.  *
  11.  * Software License Agreement
  12.  *
  13.  * The software supplied herewith by Microchip Technology Incorporated
  14.  * (the “Company”) for its PICmicro® Microcontroller is intended and
  15.  * supplied to you, the Company’s customer, for use solely and
  16.  * exclusively on Microchip PICmicro Microcontroller products. The
  17.  * software is owned by the Company and/or its supplier, and is
  18.  * protected under applicable copyright laws. All rights are reserved.
  19.  * Any use in violation of the foregoing restrictions may subject the
  20.  * user to criminal sanctions under applicable laws, as well as to
  21.  * civil liability for the breach of the terms and conditions of this
  22.  * license.
  23.  *
  24.  * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
  25.  * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
  26.  * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  27.  * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
  28.  * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
  29.  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
  30.  *
  31.  * Author               Date        Comment
  32.  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33.  * Ross Fosler          9/2/04      Implemented MPUSBGetDeviceLink()
  34.  * Rawin Rojvanit       11/19/04    Original version 1.00 completed
  35.  ********************************************************************/
  36.  
  37. #ifndef _MPUSBAPI_H_
  38. #define _MPUSBAPI_H_
  39.  
  40. #define MPUSB_FAIL                  0
  41. #define MPUSB_SUCCESS               1
  42.  
  43. #define MP_WRITE                    0
  44. #define MP_READ                     1
  45.  
  46. // MAX_NUM_MPUSB_DEV is an abstract limitation.
  47. // It is very unlikely that a computer system will have more
  48. // then 127 USB devices attached to it. (single or multiple USB hosts)
  49. #define MAX_NUM_MPUSB_DEV           127
  50.  
  51. DWORD (*MPUSBGetDLLVersion)(void);
  52.  
  53. DWORD (*MPUSBGetDeviceCount)(PCHAR pVID_PID);
  54.  
  55. HANDLE (*MPUSBOpen)(DWORD instance,         // Input
  56.                  PCHAR pVID_PID,            // Input
  57.                  PCHAR pEP,                 // Input
  58.                  DWORD dwDir,               // Input
  59.                  DWORD dwReserved);         // Input <Future Use>
  60.  
  61. DWORD (*MPUSBRead)(HANDLE handle,           // Input
  62.                 PVOID pData,                // Output
  63.                 DWORD dwLen,                // Input
  64.                 PDWORD pLength,             // Output
  65.                 DWORD dwMilliseconds);      // Input
  66.  
  67. DWORD (*MPUSBWrite)(HANDLE handle,          // Input
  68.                  PVOID pData,               // Input
  69.                  DWORD dwLen,               // Input
  70.                  PDWORD pLength,            // Output
  71.                  DWORD dwMilliseconds);     // Input
  72.  
  73. DWORD (*MPUSBReadInt)(HANDLE handle,        // Input
  74.                    PVOID pData,             // Output
  75.                    DWORD dwLen,             // Input
  76.                    PDWORD pLength,          // Output
  77.                    DWORD dwMilliseconds);   // Input
  78.  
  79. BOOL (*MPUSBClose)(HANDLE handle);
  80.  
  81. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement