Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | * |
| 20 | * File: control.h |
| 21 | * |
| 22 | * Purpose: |
| 23 | * |
| 24 | * Author: Jerry Chen |
| 25 | * |
| 26 | * Date: Apr. 5, 2004 |
| 27 | * |
| 28 | */ |
| 29 | |
| 30 | |
| 31 | #ifndef __CONTROL_H__ |
| 32 | #define __CONTROL_H__ |
| 33 | |
| 34 | #if !defined(__TTYPE_H__) |
| 35 | #include "ttype.h" |
| 36 | #endif |
| 37 | #if !defined(__DEVICE_H__) |
| 38 | #include "device.h" |
| 39 | #endif |
| 40 | #if !defined(__USBPIPE_H__) |
| 41 | #include "usbpipe.h" |
| 42 | #endif |
| 43 | |
| 44 | |
| 45 | |
| 46 | /*--------------------- Export Definitions -------------------------*/ |
| 47 | |
| 48 | |
| 49 | #define CONTROLnsRequestOut( Device,Request,Value,Index,Length,Buffer) \ |
| 50 | PIPEnsControlOut( Device,Request,Value,Index,Length,Buffer) |
| 51 | |
| 52 | #define CONTROLnsRequestOutAsyn( Device,Request,Value,Index,Length,Buffer) \ |
| 53 | PIPEnsControlOutAsyn( Device,Request,Value,Index,Length,Buffer) |
| 54 | |
| 55 | #define CONTROLnsRequestIn( Device,Request,Value,Index,Length,Buffer) \ |
| 56 | PIPEnsControlIn( Device,Request,Value,Index,Length,Buffer) |
| 57 | |
| 58 | |
| 59 | /*--------------------- Export Classes ----------------------------*/ |
| 60 | |
| 61 | /*--------------------- Export Variables --------------------------*/ |
| 62 | |
| 63 | /*--------------------- Export Functions --------------------------*/ |
| 64 | #ifdef __cplusplus |
| 65 | extern "C" { /* Assume C declarations for C++ */ |
| 66 | #endif /* __cplusplus */ |
| 67 | |
| 68 | |
| 69 | void ControlvWriteByte( |
| 70 | IN PSDevice pDevice, |
| 71 | IN BYTE byRegType, |
| 72 | IN BYTE byRegOfs, |
| 73 | IN BYTE byData |
| 74 | ); |
| 75 | |
| 76 | |
| 77 | void ControlvReadByte( |
| 78 | IN PSDevice pDevice, |
| 79 | IN BYTE byRegType, |
| 80 | IN BYTE byRegOfs, |
| 81 | IN PBYTE pbyData |
| 82 | ); |
| 83 | |
| 84 | |
| 85 | void ControlvMaskByte( |
| 86 | IN PSDevice pDevice, |
| 87 | IN BYTE byRegType, |
| 88 | IN BYTE byRegOfs, |
| 89 | IN BYTE byMask, |
| 90 | IN BYTE byData |
| 91 | ); |
| 92 | |
| 93 | #ifdef __cplusplus |
| 94 | } /* End of extern "C" { */ |
| 95 | #endif /* __cplusplus */ |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | #endif // __RCV_H__ |
| 101 | |
| 102 | |
| 103 | |