RT-USB-9AXIS-00
cdcuser.h
1 /*----------------------------------------------------------------------------
2  * U S B - K e r n e l
3  *----------------------------------------------------------------------------
4  * Name: cdcuser.h
5  * Purpose: USB Communication Device Class User module Definitions
6  * Version: V1.10
7  *----------------------------------------------------------------------------
8  * This software is supplied "AS IS" without any warranties, express,
9  * implied or statutory, including but not limited to the implied
10  * warranties of fitness for purpose, satisfactory quality and
11  * noninfringement. Keil extends you a royalty-free right to reproduce
12  * and distribute executable files created using this software for use
13  * on NXP Semiconductors LPC microcontroller devices only. Nothing else
14  * gives you the right to use this software.
15  *
16  * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.
17  *---------------------------------------------------------------------------*/
18 
19 #ifndef __CDCUSER_H__
20 #define __CDCUSER_H__
21 
22 /* CDC buffer handling */
23 extern int CDC_RdOutBuf (char *buffer, const int *length);
24 extern int CDC_WrOutBuf (const char *buffer, int *length);
25 extern int CDC_OutBufAvailChar (int *availChar);
26 
27 
28 /* CDC Data In/Out Endpoint Address */
29 #define CDC_DEP_IN 0x83
30 #define CDC_DEP_OUT 0x03
31 
32 /* CDC Communication In Endpoint Address */
33 #define CDC_CEP_IN 0x81
34 
35 /* CDC Requests Callback Functions */
36 extern uint32_t CDC_SendEncapsulatedCommand (void);
37 extern uint32_t CDC_GetEncapsulatedResponse (void);
38 extern uint32_t CDC_SetCommFeature (unsigned short wFeatureSelector);
39 extern uint32_t CDC_GetCommFeature (unsigned short wFeatureSelector);
40 extern uint32_t CDC_ClearCommFeature (unsigned short wFeatureSelector);
41 extern uint32_t CDC_GetLineCoding (void);
42 extern uint32_t CDC_SetLineCoding (void);
43 extern uint32_t CDC_SetControlLineState (unsigned short wControlSignalBitmap);
44 extern uint32_t CDC_SendBreak (unsigned short wDurationOfBreak);
45 
46 /* CDC Bulk Callback Functions */
47 extern void CDC_BulkIn (void);
48 extern void CDC_BulkOut (void);
49 
50 /* CDC Notification Callback Function */
51 extern void CDC_NotificationIn (void);
52 
53 /* CDC Initializtion Function */
54 extern void CDC_Init (void);
55 
56 /* CDC prepare the SERAIAL_STATE */
57 extern unsigned short CDC_GetSerialState (void);
58 
59 /* flow control */
60 extern unsigned short CDC_DepInEmpty; // DataEndPoint IN empty
61 
62 #endif /* __CDCUSER_H__ */
63