]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/ThirdParty/LPCOpen/LPCUSBLib/Drivers/USB/Core/PipeStream.h
Add extra debug comment into list.c.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / ThirdParty / LPCOpen / LPCUSBLib / Drivers / USB / Core / PipeStream.h
1 /*\r
2  * @brief Pipe data stream transmission and reception management\r
3  *\r
4  * @note\r
5  * Copyright(C) NXP Semiconductors, 2012\r
6  * Copyright(C) Dean Camera, 2011, 2012\r
7  * All rights reserved.\r
8  *\r
9  * @par\r
10  * Software that is described herein is for illustrative purposes only\r
11  * which provides customers with programming information regarding the\r
12  * LPC products.  This software is supplied "AS IS" without any warranties of\r
13  * any kind, and NXP Semiconductors and its licensor disclaim any and\r
14  * all warranties, express or implied, including all implied warranties of\r
15  * merchantability, fitness for a particular purpose and non-infringement of\r
16  * intellectual property rights.  NXP Semiconductors assumes no responsibility\r
17  * or liability for the use of the software, conveys no license or rights under any\r
18  * patent, copyright, mask work right, or any other intellectual property rights in\r
19  * or to any products. NXP Semiconductors reserves the right to make changes\r
20  * in the software without notification. NXP Semiconductors also makes no\r
21  * representation or warranty that such application will be suitable for the\r
22  * specified use without further testing or modification.\r
23  *\r
24  * @par\r
25  * Permission to use, copy, modify, and distribute this software and its\r
26  * documentation is hereby granted, under NXP Semiconductors' and its\r
27  * licensor's relevant copyrights in the software, without fee, provided that it\r
28  * is used in conjunction with NXP Semiconductors microcontrollers.  This\r
29  * copyright, permission, and disclaimer notice must appear in all copies of\r
30  * this code.\r
31  */\r
32 \r
33 /** @ingroup Group_PipeRW  \r
34  *  @defgroup Group_PipeStreamRW Read/Write of Multi-Byte Streams\r
35  *  @brief Pipe data stream transmission and reception management.\r
36  *\r
37  *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
38  *  and to pipes.\r
39  *\r
40  *  @{\r
41  */\r
42 \r
43 #ifndef __PIPE_STREAM_H__\r
44 #define __PIPE_STREAM_H__\r
45 \r
46         /* Includes: */\r
47                 #include "../../../Common/Common.h"\r
48                 #include "USBMode.h"\r
49                 \r
50         /* Enable C linkage for C++ Compilers: */\r
51                 #if defined(__cplusplus)\r
52                         extern "C" {\r
53                 #endif\r
54 \r
55         /* Preprocessor Checks: */\r
56                 #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
57                         #error Do not include this file directly. Include lpcroot/libraries/LPCUSBlib/Drivers/USB/USB.h instead.\r
58                 #endif\r
59                 \r
60         /* Public Interface - May be used in end-application: */\r
61                 /* Enums: */\r
62                         /** Enum for the possible error return codes of the Pipe_*_Stream_* functions. */\r
63                         enum Pipe_Stream_RW_ErrorCodes_t\r
64                         {\r
65                                 PIPE_RWSTREAM_NoError            = 0, /**< Command completed successfully, no error. */\r
66                                 PIPE_RWSTREAM_PipeStalled        = 1, /**< The device stalled the pipe during the transfer. */          \r
67                                 PIPE_RWSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during\r
68                                                                    *   the transfer.\r
69                                                                    */           \r
70                                 PIPE_RWSTREAM_Timeout            = 3, /**< The device failed to accept or send the next packet\r
71                                                                        *   within the software timeout period set by the\r
72                                                                        *   @ref USB_STREAM_TIMEOUT_MS macro.\r
73                                                                        */\r
74                                 PIPE_RWSTREAM_IncompleteTransfer = 4, /**< Indicates that the pipe bank became full/empty before the\r
75                                                                        *   complete contents of the stream could be transferred.\r
76                                                                        */\r
77                         };\r
78 \r
79                 #include "USBTask.h"\r
80                 /* Function Prototypes: */\r
81                 /** \name Stream functions for null data */\r
82                 //@{\r
83                 /**\r
84                  * @brief  Reads and discards the given number of bytes from the pipe, discarding fully read packets from the host\r
85                  *  as needed. The last packet is not automatically discarded once the remaining bytes has been read; the\r
86                  *  user is responsible for manually discarding the last packet from the device via the @ref Pipe_ClearIN() macro.\r
87                  *\r
88                  *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or\r
89                  *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer\r
90                  *  will instead be performed as a series of chunks. Each time the pipe bank becomes empty while there is still data\r
91                  *  to process (and after the current packet has been acknowledged) the BytesProcessed location will be updated with\r
92                  *  the total number of bytes processed in the stream, and the function will exit with an error code of\r
93                  *  @ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to\r
94                  *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed\r
95                  *  value reaches the total transfer length.\r
96                  *\r
97                  *  <b>Single Stream Transfer Example:</b>\r
98                  *  \code\r
99                  *  uint8_t ErrorCode;\r
100                  *\r
101                  *  if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)\r
102                  *  {\r
103                  *       // Stream failed to complete - check ErrorCode here\r
104                  *  }\r
105                  *  \endcode\r
106                  *\r
107                  *  <b>Partial Stream Transfers Example:</b>\r
108                  *  \code\r
109                  *  uint8_t  ErrorCode;\r
110                  *  uint16_t BytesProcessed;\r
111                  *\r
112                  *  BytesProcessed = 0;\r
113                  *  while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
114                  *  {\r
115                  *      // Stream not yet complete - do other actions here, abort if required\r
116                  *  }\r
117                  *\r
118                  *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
119                  *  {\r
120                  *      // Stream failed to complete - check ErrorCode here\r
121                  *  }\r
122                  *  \endcode\r
123                  *\r
124                  *  @note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
125                  *        having to explicitly change the data direction with a call to @ref Pipe_SetPipeToken().\r
126                  *\r
127                  * @param       corenum         : USB port number\r
128                  * @param       Length          :                       Number of bytes to discard via the currently selected pipe\r
129                  * @param       BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
130                  *                          updated, \c NULL if the entire stream should be processed at once.\r
131                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
132 \r
133                  */\r
134                 uint8_t Pipe_Discard_Stream(const uint8_t corenum,\r
135                                                                         uint16_t Length,\r
136                                                                         uint16_t *const BytesProcessed) /*ATTR_DEPRECATED*/;\r
137 \r
138                 /**\r
139                  * @brief  Writes a given number of zeroed bytes to the pipe, sending full pipe packets from the host to the device\r
140                  *  as needed. The last packet is not automatically sent once the remaining bytes has been written; the\r
141                  *  user is responsible for manually discarding the last packet from the device via the @ref Pipe_ClearOUT() macro.\r
142                  *\r
143                  *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or\r
144                  *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer\r
145                  *  will instead be performed as a series of chunks. Each time the pipe bank becomes full while there is still data\r
146                  *  to process (and after the current packet transmission has been initiated) the BytesProcessed location will be\r
147                  *  updated with the total number of bytes processed in the stream, and the function will exit with an error code of\r
148                  *  @ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to\r
149                  *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed\r
150                  *  value reaches the total transfer length.\r
151                  *\r
152                  *  <b>Single Stream Transfer Example:</b>\r
153                  *  \code\r
154                  *  uint8_t ErrorCode;\r
155                  *\r
156                  *  if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)\r
157                  *  {\r
158                  *       // Stream failed to complete - check ErrorCode here\r
159                  *  }\r
160                  *  \endcode\r
161                  *\r
162                  *  <b>Partial Stream Transfers Example:</b>\r
163                  *  \code\r
164                  *  uint8_t  ErrorCode;\r
165                  *  uint16_t BytesProcessed;\r
166                  *\r
167                  *  BytesProcessed = 0;\r
168                  *  while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
169                  *  {\r
170                  *      // Stream not yet complete - do other actions here, abort if required\r
171                  *  }\r
172                  *\r
173                  *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
174                  *  {\r
175                  *      // Stream failed to complete - check ErrorCode here\r
176                  *  }\r
177                  *  \endcode\r
178                  *\r
179                  *  @note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
180                  *        having to explicitly change the data direction with a call to @ref Pipe_SetPipeToken().\r
181                  *\r
182                  * @param       corenum         : USB port number\r
183                  * @param       Length          : Number of zero bytes to write via the currently selected pipe\r
184                  * @param       BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
185                  *                          updated, \c NULL if the entire stream should be processed at once.\r
186                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
187                  */\r
188                 uint8_t Pipe_Null_Stream(const uint8_t corenum,\r
189                                                                  uint16_t Length,\r
190                                                                  uint16_t *const BytesProcessed);\r
191 \r
192                 //@}\r
193 \r
194                 /** \name Stream functions for RAM source/destination data */\r
195                 //@{\r
196                 /**\r
197                  * @brief  Writes the given number of bytes to the pipe from the given buffer in little endian,\r
198                  *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
199                  *  the user is responsible for manually sending the last written packet to the host via the\r
200                  *  @ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is\r
201                  *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
202                  *\r
203                  *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
204                  *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
205                  *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
206                  *  the pipe bank becomes full while there is still data to process (and after the current\r
207                  *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
208                  *  total number of bytes processed in the stream, and the function will exit with an error code of\r
209                  *  @ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
210                  *  in the user code - to continue the transfer, call the function again with identical parameters\r
211                  *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
212                  *\r
213                  *  <b>Single Stream Transfer Example:</b>\r
214                  *  \code\r
215                  *  uint8_t DataStream[512];\r
216                  *  uint8_t ErrorCode;\r
217                  *\r
218                  *  if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),\r
219                  *                                        NULL)) != PIPE_RWSTREAM_NoError)\r
220                  *  {\r
221                  *       // Stream failed to complete - check ErrorCode here\r
222                  *  }\r
223                  *  \endcode\r
224                  *\r
225                  *  <b>Partial Stream Transfers Example:</b>\r
226                  *  \code\r
227                  *  uint8_t  DataStream[512];\r
228                  *  uint8_t  ErrorCode;\r
229                  *  uint16_t BytesProcessed;\r
230                  *\r
231                  *  BytesProcessed = 0;\r
232                  *  while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),\r
233                  *                                           &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
234                  *  {\r
235                  *      // Stream not yet complete - do other actions here, abort if required\r
236                  *  }\r
237                  *\r
238                  *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
239                  *  {\r
240                  *      // Stream failed to complete - check ErrorCode here\r
241                  *  }\r
242                  *  \endcode\r
243                  *\r
244                  *  @note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
245                  *        having to explicitly change the data direction with a call to @ref Pipe_SetPipeToken().\r
246                  *\r
247                  * @param       corenum         : USB port number\r
248                  * @param       Buffer          : Pointer to the source data buffer to read from\r
249                  * @param       Length          : Number of bytes to read for the currently selected pipe into the buffer\r
250                  * @param       BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
251                  *                          updated, \c NULL if the entire stream should be written at once.\r
252                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
253                  */\r
254                 uint8_t Pipe_Write_Stream_LE(const uint8_t corenum,\r
255                                                                          const void *const Buffer,\r
256                                                                          uint16_t Length,\r
257                                                                          uint16_t *const BytesProcessed);\r
258 \r
259                 /**\r
260                  * @brief  Writes the given number of bytes to the pipe from the given buffer in big endian,\r
261                  *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
262                  *  the user is responsible for manually sending the last written packet to the host via the\r
263                  *  @ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is\r
264                  *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
265                  *\r
266                  *  @note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
267                  *        having to explicitly change the data direction with a call to @ref Pipe_SetPipeToken().\r
268                  *\r
269                  * @param  Buffer :         Pointer to the source data buffer to read from\r
270                  * @param  Length :                     Number of bytes to read for the currently selected pipe into the buffer\r
271                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
272                  *                          updated, \c NULL if the entire stream should be written at once.\r
273                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
274                  */\r
275                 uint8_t Pipe_Write_Stream_BE(const void *const Buffer,\r
276                                                                          uint16_t Length,\r
277                                                                          uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
278                         "Function is not implemented yet");\r
279 \r
280                 /**\r
281                  * @brief  Reads the given number of bytes from the pipe into the given buffer in little endian,\r
282                  *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
283                  *  the user is responsible for manually sending the last written packet to the host via the\r
284                  *  @ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is\r
285                  *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
286                  *\r
287                  *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
288                  *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
289                  *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
290                  *  the pipe bank becomes empty while there is still data to process (and after the current\r
291                  *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
292                  *  of bytes processed in the stream, and the function will exit with an error code of\r
293                  *  @ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
294                  *  in the user code - to continue the transfer, call the function again with identical parameters\r
295                  *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
296                  *\r
297                  *  <b>Single Stream Transfer Example:</b>\r
298                  *  \code\r
299                  *  uint8_t DataStream[512];\r
300                  *  uint8_t ErrorCode;\r
301                  *\r
302                  *  if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),\r
303                  *                                       NULL)) != PIPE_RWSTREAM_NoError)\r
304                  *  {\r
305                  *       // Stream failed to complete - check ErrorCode here\r
306                  *  }\r
307                  *  \endcode\r
308                  *\r
309                  *  <b>Partial Stream Transfers Example:</b>\r
310                  *  \code\r
311                  *  uint8_t  DataStream[512];\r
312                  *  uint8_t  ErrorCode;\r
313                  *  uint16_t BytesProcessed;\r
314                  *\r
315                  *  BytesProcessed = 0;\r
316                  *  while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),\r
317                  *                                          &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
318                  *  {\r
319                  *      // Stream not yet complete - do other actions here, abort if required\r
320                  *  }\r
321                  *\r
322                  *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
323                  *  {\r
324                  *      // Stream failed to complete - check ErrorCode here\r
325                  *  }\r
326                  *  \endcode\r
327                  *\r
328                  *  @note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
329                  *        having to explicitly change the data direction with a call to @ref Pipe_SetPipeToken().\r
330                  *\r
331                  * @param       corenum         : USB port number\r
332                  * @param       Buffer          : Pointer to the source data buffer to write to\r
333                  * @param       Length          : Number of bytes to read for the currently selected pipe to read from\r
334                  * @param       BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
335                  *                          updated, \c NULL if the entire stream should be read at once.\r
336                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
337                  */\r
338                 uint8_t Pipe_Read_Stream_LE(const uint8_t corenum,\r
339                                                                         void *const Buffer,\r
340                                                                         uint16_t Length,\r
341                                                                         uint16_t *const BytesProcessed);\r
342 \r
343                 /**\r
344                  * @brief  Reads the given number of bytes from the pipe into the given buffer in big endian,\r
345                  *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
346                  *  the user is responsible for manually sending the last written packet to the host via the\r
347                  *  @ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is\r
348                  *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
349                  *\r
350                  *  @note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
351                  *        having to explicitly change the data direction with a call to @ref Pipe_SetPipeToken().\r
352                  *\r
353                  * @param  Buffer :         Pointer to the source data buffer to write to\r
354                  * @param  Length :                     Number of bytes to read for the currently selected pipe to read from\r
355                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
356                  *                          updated, \c NULL if the entire stream should be read at once.\r
357                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
358                  */\r
359                 uint8_t Pipe_Read_Stream_BE(void *const Buffer,\r
360                                                                         uint16_t Length,\r
361                                                                         uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
362                         "Function is not implemented yet");\r
363                 //@}\r
364 \r
365                 /** \name Stream functions for EEPROM source/destination data */\r
366                 //@{\r
367                 /**\r
368                  * @brief  Pipe Write EEPROM Stream Little Endian\r
369                  * @param  Buffer :         Pointer to the source data buffer to read from\r
370                  * @param  Length :                     Number of bytes to read for the currently selected pipe into the buffer\r
371                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
372                  *                          updated, \c NULL if the entire stream should be written at once.\r
373                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
374                  */\r
375                 uint8_t Pipe_Write_EStream_LE(const void *const Buffer,\r
376                                                                           uint16_t Length,\r
377                                                                           uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
378                         "Function is not implemented yet");\r
379 \r
380                 /**\r
381                  * @brief  Pipe Write EEPROM Stream Big Endian\r
382                  * @param  Buffer :         Pointer to the source data buffer to read from\r
383                  * @param  Length :                     Number of bytes to read for the currently selected pipe into the buffer\r
384                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
385                  *                          updated, \c NULL if the entire stream should be written at once.\r
386                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
387                  */\r
388                 uint8_t Pipe_Write_EStream_BE(const void *const Buffer,\r
389                                                                           uint16_t Length,\r
390                                                                           uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
391                         "Function is not implemented yet");\r
392 \r
393                 /**\r
394                  * @brief  Pipe Read EEPROM Stream Little Endian\r
395                  * @param  Buffer :         Pointer to the source data buffer to write to\r
396                  * @param  Length :                     Number of bytes to read for the currently selected pipe to read from\r
397                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
398                  *                          updated, \c NULL if the entire stream should be read at once.\r
399                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
400                  */\r
401                 uint8_t Pipe_Read_EStream_LE(void *const Buffer,\r
402                                                                          uint16_t Length,\r
403                                                                          uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
404                         "Function is not implemented yet");\r
405 \r
406                 /**\r
407                  * @brief  Pipe Read EEPROM Stream Big Endian\r
408                  * @param  Buffer :         Pointer to the source data buffer to write to\r
409                  * @param  Length :                     Number of bytes to read for the currently selected pipe to read from\r
410                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
411                  *                          updated, \c NULL if the entire stream should be read at once.\r
412                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
413                  */\r
414                 uint8_t Pipe_Read_EStream_BE(void *const Buffer,\r
415                                                                          uint16_t Length,\r
416                                                                          uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
417                         "Function is not implemented yet");\r
418 \r
419                 //@}\r
420 \r
421                 /** \name Stream functions for PROGMEM source/destination data */\r
422                 //@{\r
423                 /**\r
424                  * @brief  Pipe Write FLASH Stream Little Endian\r
425                  * @param  Buffer :         Pointer to the source data buffer to read from\r
426                  * @param  Length :                     Number of bytes to read for the currently selected pipe into the buffer\r
427                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
428                  *                          updated, \c NULL if the entire stream should be written at once.\r
429                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
430                  */\r
431                 uint8_t Pipe_Write_PStream_LE(const void *const Buffer,\r
432                                                                           uint16_t Length,\r
433                                                                           uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
434                         "Function is not implemented yet");\r
435 \r
436                 /**\r
437                  * @brief  Pipe Write FLASH Stream Big Endian\r
438                  * @param  Buffer :         Pointer to the source data buffer to read from\r
439                  * @param  Length :                     Number of bytes to read for the currently selected pipe into the buffer\r
440                  * @param  BytesProcessed : Pointer to a location where the total number of bytes already processed should\r
441                  *                          updated, \c NULL if the entire stream should be written at once.\r
442                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
443                  */\r
444                 uint8_t Pipe_Write_PStream_BE(const void *const Buffer,\r
445                                                                           uint16_t Length,\r
446                                                                           uint16_t *const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1) ATTR_ERROR(\r
447                         "Function is not implemented yet");\r
448                         \r
449                 /**\r
450                  * @brief  Transfer a stream of data to/from USB bus\r
451                  * @param  corenum :            streaming USB core number\r
452                  * @param  buffer :         Pointer to the data buffer to read from or write to\r
453                  * @param  transferlength :     Number of bytes to transfer\r
454                  * @param  packetsize :         Size in byte of each packet in stream\r
455                  * @return A value from the @ref Pipe_Stream_RW_ErrorCodes_t enum\r
456                  */\r
457                  uint8_t Pipe_Streaming(uint8_t corenum, uint8_t* const buffer, uint32_t const transferlength, uint16_t const packetsize);\r
458                  \r
459                 //@}\r
460 \r
461         /* Disable C linkage for C++ Compilers: */\r
462                 #if defined(__cplusplus)\r
463                         }\r
464                 #endif\r
465         \r
466 #endif\r
467 \r
468 /** @} */\r
469 \r