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