LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
EndpointStream.h
Go to the documentation of this file.
1 /*
2  * @brief Endpoint data stream transmission and reception management
3  *
4  * @note
5  * Copyright(C) NXP Semiconductors, 2012
6  * Copyright(C) Dean Camera, 2011, 2012
7  * All rights reserved.
8  *
9  * @par
10  * Software that is described herein is for illustrative purposes only
11  * which provides customers with programming information regarding the
12  * LPC products. This software is supplied "AS IS" without any warranties of
13  * any kind, and NXP Semiconductors and its licensor disclaim any and
14  * all warranties, express or implied, including all implied warranties of
15  * merchantability, fitness for a particular purpose and non-infringement of
16  * intellectual property rights. NXP Semiconductors assumes no responsibility
17  * or liability for the use of the software, conveys no license or rights under any
18  * patent, copyright, mask work right, or any other intellectual property rights in
19  * or to any products. NXP Semiconductors reserves the right to make changes
20  * in the software without notification. NXP Semiconductors also makes no
21  * representation or warranty that such application will be suitable for the
22  * specified use without further testing or modification.
23  *
24  * @par
25  * Permission to use, copy, modify, and distribute this software and its
26  * documentation is hereby granted, under NXP Semiconductors' and its
27  * licensor's relevant copyrights in the software, without fee, provided that it
28  * is used in conjunction with NXP Semiconductors microcontrollers. This
29  * copyright, permission, and disclaimer notice must appear in all copies of
30  * this code.
31  */
32 
43 #ifndef __ENDPOINT_STREAM_H__
44 #define __ENDPOINT_STREAM_H__
45 
46  /* Includes: */
47  #include "../../../Common/Common.h"
48  #include "USBMode.h"
49 
50  /* Enable C linkage for C++ Compilers: */
51  #if defined(__cplusplus)
52  extern "C" {
53  #endif
54 
55  /* Preprocessor Checks: */
56  #if !defined(__INCLUDE_FROM_USB_DRIVER)
57  #error Do not include this file directly. Include lpcroot/libraries/LPCUSBlib/Drivers/USB/USB.h instead.
58  #endif
59 
60  /* Public Interface - May be used in end-application: */
61  /* Enums: */
64  {
85  };
86 
89  {
99  };
100 
101  #include "../../../Common/Common.h"
102  #include "USBTask.h"
103 
104  /* Function Prototypes: */
162  uint8_t Endpoint_Discard_Stream(uint8_t corenum,
163  uint16_t Length,
164  uint16_t *const BytesProcessed);
165 
221  uint8_t Endpoint_Null_Stream(uint8_t corenum,
222  uint16_t Length,
223  uint16_t *const BytesProcessed);
224 
226 
229 
290  uint8_t Endpoint_Write_Stream_LE(uint8_t corenum,
291  const void *const Buffer,
292  uint16_t Length,
293  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(2);
294 
310  uint8_t Endpoint_Write_Stream_BE(uint8_t corenum,
311  const void *const Buffer,
312  uint16_t Length,
313  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(2);
314 
376  uint8_t Endpoint_Read_Stream_LE(uint8_t corenum,
377  void *const Buffer,
378  uint16_t Length,
379  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(2);
380 
395  uint8_t Endpoint_Read_Stream_BE(void *const Buffer,
396  uint16_t Length,
397  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
398 
419  uint8_t Endpoint_Write_Control_Stream_LE(uint8_t corenum, const void *const Buffer,
420  uint16_t Length) ATTR_NON_NULL_PTR_ARG(2);
421 
441  uint8_t Endpoint_Write_Control_Stream_BE(const void *const Buffer,
442  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
443 
464  uint8_t Endpoint_Read_Control_Stream_LE(uint8_t corenum, void *const Buffer,
465  uint16_t Length) ATTR_NON_NULL_PTR_ARG(2);
466 
486  uint8_t Endpoint_Read_Control_Stream_BE(void *const Buffer,
487  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
489 
500  uint8_t Endpoint_Write_EStream_LE(const void *const Buffer,
501  uint16_t Length,
502  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
503 
512  uint8_t Endpoint_Write_EStream_BE(const void *const Buffer,
513  uint16_t Length,
514  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
515 
524  uint8_t Endpoint_Read_EStream_LE(void *const Buffer,
525  uint16_t Length,
526  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
527 
536  uint8_t Endpoint_Read_EStream_BE(void *const Buffer,
537  uint16_t Length,
538  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
539 
557  uint8_t Endpoint_Write_Control_EStream_LE(const void *const Buffer,
558  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
559 
577  uint8_t Endpoint_Write_Control_EStream_BE(const void *const Buffer,
578  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
579 
597  uint8_t Endpoint_Read_Control_EStream_LE(void *const Buffer,
598  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
599 
617  uint8_t Endpoint_Read_Control_EStream_BE(void *const Buffer,
618  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
620 
623 
629  uint8_t Endpoint_Write_PStream_LE(const void *const Buffer,
630  uint16_t Length,
631  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
632 
641  uint8_t Endpoint_Write_PStream_BE(const void *const Buffer,
642  uint16_t Length,
643  uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
644 
651  uint8_t Endpoint_Write_Control_PStream_LE(const void *const Buffer,
652  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
653 
660  uint8_t Endpoint_Write_Control_PStream_BE(const void *const Buffer,
661  uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
663 
664  /* Disable C linkage for C++ Compilers: */
665  #if defined(__cplusplus)
666  }
667  #endif
668 
669 #endif
670