RT-AICHIP-sample
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 */
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 
uint32_t CDC_SendBreak(unsigned short wDurationOfBreak)
Definition: cdcuser.c:270
void CDC_Init(void)
Definition: cdcuser.c:124
unsigned short CDC_DepInEmpty
Definition: cdcuser.c:36
int CDC_OutBufAvailChar(int *availChar)
Definition: cdcuser.c:109
int CDC_RdOutBuf(char *buffer, const int *length)
Definition: cdcuser.c:68
uint32_t CDC_SetControlLineState(unsigned short wControlSignalBitmap)
Definition: cdcuser.c:255
void CDC_NotificationIn(void)
Definition: cdcuser.c:346
uint32_t CDC_GetCommFeature(unsigned short wFeatureSelector)
Definition: cdcuser.c:183
unsigned short CDC_GetSerialState(void)
Definition: cdcuser.c:325
uint32_t CDC_GetEncapsulatedResponse(void)
Definition: cdcuser.c:157
uint32_t CDC_SetLineCoding(void)
Definition: cdcuser.c:209
uint32_t CDC_GetLineCoding(void)
Definition: cdcuser.c:235
uint32_t CDC_SetCommFeature(unsigned short wFeatureSelector)
Definition: cdcuser.c:170
void CDC_BulkIn(void)
Definition: cdcuser.c:282
int CDC_WrOutBuf(const char *buffer, int *length)
Definition: cdcuser.c:88
uint32_t CDC_SendEncapsulatedCommand(void)
Definition: cdcuser.c:145
uint32_t CDC_ClearCommFeature(unsigned short wFeatureSelector)
Definition: cdcuser.c:196
unsigned int uint32_t
Definition: type.h:29
void CDC_BulkOut(void)
Definition: cdcuser.c:306