These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers cdcuser.h Source File

cdcuser.h

00001 /*----------------------------------------------------------------------------
00002  *      U S B  -  K e r n e l
00003  *----------------------------------------------------------------------------
00004  *      Name:    cdcuser.h
00005  *      Purpose: USB Communication Device Class User module Definitions
00006  *      Version: V1.10
00007  *----------------------------------------------------------------------------
00008  *      This software is supplied "AS IS" without any warranties, express,
00009  *      implied or statutory, including but not limited to the implied
00010  *      warranties of fitness for purpose, satisfactory quality and
00011  *      noninfringement. Keil extends you a royalty-free right to reproduce
00012  *      and distribute executable files created using this software for use
00013  *      on NXP Semiconductors LPC microcontroller devices only. Nothing else 
00014  *      gives you the right to use this software.
00015  *
00016  * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.
00017  *---------------------------------------------------------------------------*/
00018 
00019 #ifndef __CDCUSER_H__
00020 #define __CDCUSER_H__
00021 
00022 /* CDC buffer handling */
00023 extern int CDC_RdOutBuf        (char *buffer, const int *length);
00024 extern     CDC_WrOutBuf        (const char *buffer, int *length);
00025 extern     CDC_OutBufAvailChar (int *availChar);
00026 
00027 
00028 /* CDC Data In/Out Endpoint Address */
00029 #define CDC_DEP_IN       0x82
00030 #define CDC_DEP_OUT      0x02
00031 
00032 /* CDC Communication In Endpoint Address */
00033 #define CDC_CEP_IN       0x81
00034 
00035 /* CDC Requests Callback Functions */
00036 extern uint32_t CDC_SendEncapsulatedCommand  (void);
00037 extern uint32_t CDC_GetEncapsulatedResponse  (void);
00038 extern uint32_t CDC_SetCommFeature           (unsigned short wFeatureSelector);
00039 extern uint32_t CDC_GetCommFeature           (unsigned short wFeatureSelector);
00040 extern uint32_t CDC_ClearCommFeature         (unsigned short wFeatureSelector);
00041 extern uint32_t CDC_GetLineCoding            (void);
00042 extern uint32_t CDC_SetLineCoding            (void);
00043 extern uint32_t CDC_SetControlLineState      (unsigned short wControlSignalBitmap);
00044 extern uint32_t CDC_SendBreak                (unsigned short wDurationOfBreak);
00045 
00046 /* CDC Bulk Callback Functions */
00047 extern void CDC_BulkIn                   (void);
00048 extern void CDC_BulkOut                  (void);
00049 
00050 /* CDC Notification Callback Function */
00051 extern void CDC_NotificationIn           (void);
00052 
00053 /* CDC Initializtion Function */
00054 extern void CDC_Init (char portNum);
00055 
00056 /* CDC prepare the SERAIAL_STATE */
00057 extern unsigned short CDC_GetSerialState (void);
00058 
00059 /* flow control */
00060 extern unsigned short CDC_DepInEmpty;         // DataEndPoint IN empty
00061 
00062 #endif  /* __CDCUSER_H__ */
00063