]> git.sur5r.net Git - freertos/blob
1386d459cb993d1b5bea8787496254f0c976fad1
[freertos] /
1 /*\r
2  * @brief Host mode driver for the library USB Audio 1.0 Class driver\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_USBClassAudio\r
34  *  @defgroup Group_USBClassAudioHost Audio 1.0 Class Host Mode Driver\r
35  *\r
36  *  @section Sec_Dependencies Module Source Dependencies\r
37  *  The following files must be built with any user project that uses this module:\r
38  *    - LPCUSBlib/Drivers/USB/Class/Host/Audio.c <i>(Makefile source module name: LPCUSBlib_SRC_USBCLASS)</i>\r
39  *\r
40  *  @section Sec_ModDescription Module Description\r
41  *  Host Mode USB Class driver framework interface, for the Audio 1.0 USB Class driver.\r
42  *\r
43  *  @{\r
44  */\r
45 \r
46 #ifndef __AUDIO_CLASS_HOST_H__\r
47 #define __AUDIO_CLASS_HOST_H__\r
48 \r
49         /* Includes: */\r
50                 #include "../../USB.h"\r
51                 #include "../Common/AudioClassCommon.h"\r
52 \r
53         /* Enable C linkage for C++ Compilers: */\r
54                 #if defined(__cplusplus)\r
55                         extern "C" {\r
56                 #endif\r
57 \r
58         /* Preprocessor Checks: */\r
59                 #if !defined(__INCLUDE_FROM_AUDIO_DRIVER)\r
60                         #error Do not include this file directly. Include LPCUSBlib/Drivers/USB.h instead.\r
61                 #endif\r
62 \r
63         /* Public Interface - May be used in end-application: */\r
64                 /* Type Defines: */\r
65                         /** @brief Audio Class Host Mode Configuration and State Structure.\r
66                          *\r
67                          *  Class state structure. An instance of this structure should be made within the user application,\r
68                          *  and passed to each of the Audio class driver functions as the \c AudioInterfaceInfo parameter. This\r
69                          *  stores each Audio interface's configuration and state information.\r
70                          */\r
71                         typedef struct\r
72                         {\r
73                                 struct\r
74                                 {\r
75                                         uint8_t  DataINPipeNumber; /**< Pipe number of the Audio interface's IN data pipe. If this interface should not\r
76                                                                     *   bind to an IN endpoint, this may be set to 0 to disable audio input streaming for\r
77                                                                     *   this driver instance.\r
78                                                                     */\r
79                                         uint8_t  DataOUTPipeNumber; /**< Pipe number of the Audio interface's OUT data pipe. If this interface should not\r
80                                                                     *   bind to an OUT endpoint, this may be set to 0 to disable audio output streaming for\r
81                                                                     *   this driver instance.\r
82                                                                     */\r
83                                         uint8_t  PortNumber;            /**< Port number that this interface is running.                        */                              \r
84                                 } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
85                                            *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
86                                            */\r
87                                 struct\r
88                                 {\r
89                                         bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid\r
90                                                         *   after @ref Audio_Host_ConfigurePipes() is called and the Host state machine is in the\r
91                                                         *   Configured state.\r
92                                                         */\r
93                                         uint8_t ControlInterfaceNumber; /**< Interface index of the Audio Control interface within the attached device. */\r
94                                         uint8_t StreamingInterfaceNumber; /**< Interface index of the Audio Streaming interface within the attached device. */\r
95                                         \r
96                                         uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */\r
97 \r
98                                         uint16_t DataINPipeSize; /**< Size in bytes of the Audio interface's IN data pipe. */\r
99                                         uint16_t DataOUTPipeSize;  /**< Size in bytes of the Audio interface's OUT data pipe. */\r
100                                 } State; /**< State data for the USB class interface within the device. All elements in this section\r
101                                                   *   <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
102                                                   *   the interface is enumerated.\r
103                                                   */\r
104                         } USB_ClassInfo_Audio_Host_t;\r
105 \r
106                 /* Enums: */\r
107                         /** Enum for the possible error codes returned by the @ref Audio_Host_ConfigurePipes() function. */\r
108                         enum AUDIO_Host_EnumerationFailure_ErrorCodes_t\r
109                         {\r
110                                 AUDIO_ENUMERROR_NoError                    = 0, /**< Configuration Descriptor was processed successfully. */\r
111                                 AUDIO_ENUMERROR_InvalidConfigDescriptor    = 1, /**< The device returned an invalid Configuration Descriptor. */\r
112                                 AUDIO_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible AUDIO interface was not found in the device's Configuration Descriptor. */\r
113                                 AUDIO_ENUMERROR_PipeConfigurationFailed    = 3, /**< One or more pipes for the specified interface could not be configured correctly. */\r
114                         };\r
115 \r
116                 /* Function Prototypes: */\r
117                         /** \r
118                         * @brief Host interface configuration routine, to configure a given Audio host interface instance using the Configuration\r
119                          *  Descriptor read from an attached USB device. This function automatically updates the given Audio Host instance's\r
120                          *  state values and configures the pipes required to communicate with the interface if it is found within the\r
121                          *  device. This should be called once after the stack has enumerated the attached device, while the host state\r
122                          *  machine is in the Addressed state.\r
123                          *\r
124                          *  @param AudioInterfaceInfo     : Pointer to a structure containing an Audio Class host configuration and state.\r
125                          *  @param ConfigDescriptorSize   : Length of the attached device's Configuration Descriptor.\r
126                          *  @param DeviceConfigDescriptor : Pointer to a buffer containing the attached device's Configuration Descriptor.\r
127                          *\r
128                          *  @return A value from the @ref AUDIO_Host_EnumerationFailure_ErrorCodes_t enum.\r
129                          */\r
130                         uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
131                                                           uint16_t ConfigDescriptorSize,\r
132                                                           void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);\r
133 \r
134                         /** \r
135                         * @brief Starts or stops the audio streaming for the given configured Audio Host interface, allowing for audio samples to be\r
136                          *  send and/or received.\r
137                          *\r
138                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class host configuration and state.\r
139                          *  @param EnableStreaming    : Boolean true to enable streaming of the specified interface, false to disable\r
140                          *\r
141                          *  @return A value from the @ref USB_Host_SendControlErrorCodes_t enum.\r
142                          */\r
143                         uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
144                                                               const bool EnableStreaming) ATTR_NON_NULL_PTR_ARG(1);\r
145 \r
146                         /** @brief Gets or sets the specified property of a streaming audio class endpoint that is bound to a pipe in the given\r
147                          *  class instance.\r
148                          *\r
149                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class host configuration and state.\r
150                          *  @param DataPipeIndex      : Index of the data pipe whose bound endpoint is to be altered.\r
151                          *  @param EndpointProperty   : Property of the endpoint to get or set, a value from @ref Audio_ClassRequests_t.\r
152                          *  @param EndpointControl    : Parameter of the endpoint to get or set, a value from @ref Audio_EndpointControls_t.\r
153                          *  @param DataLength         : For SET operations, the length of the parameter data to set. For GET operations, the maximum\r
154                          *                                     length of the retrieved data.\r
155                          *  @param Data               : Pointer to a location where the parameter data is stored for SET operations, or where\r
156                          *                                     the retrieved data is to be stored for GET operations.\r
157                          *\r
158                          *  @return A value from the @ref USB_Host_SendControlErrorCodes_t enum.\r
159                          */\r
160                         uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
161                                                                   const uint8_t DataPipeIndex,\r
162                                                                   const uint8_t EndpointProperty,\r
163                                                                   const uint8_t EndpointControl,\r
164                                                                   const uint16_t DataLength,\r
165                                                                   void* const Data) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);\r
166 \r
167                 /* Inline Functions: */\r
168                         /** @brief General management task for a given Audio host class interface, required for the correct operation of\r
169                          *  the interface. This should be called frequently in the main program loop, before the master USB management task\r
170                          *  @ref USB_USBTask().\r
171                          *\r
172                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class host configuration and state.\r
173                          *      @return Nothing\r
174                          */\r
175                         static inline void Audio_Host_USBTask(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
176                                                               ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
177                         static inline void Audio_Host_USBTask(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
178                         {\r
179                                 (void)AudioInterfaceInfo;\r
180                         }\r
181 \r
182                         /** @brief Determines if the given audio interface is ready for a sample to be read from it, and selects the streaming\r
183                          *  IN pipe ready for reading.\r
184                          *\r
185                          *  @pre This function must only be called when the Host state machine is in the @ref HOST_STATE_Configured state or\r
186                          *       the call will fail.\r
187                          *\r
188                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
189                          *\r
190                          *  @return Boolean \c true if the given Audio interface has a sample to be read, \c false otherwise.\r
191                          */\r
192                         static inline bool Audio_Host_IsSampleReceived(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
193                                                                        ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
194                         static inline bool Audio_Host_IsSampleReceived(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
195                         {\r
196                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
197                                 bool SampleReceived = false;\r
198 \r
199                                 if ((USB_HostState[portnum] != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))\r
200                                   return false;\r
201 \r
202                                 Pipe_SelectPipe(portnum,AudioInterfaceInfo->Config.DataINPipeNumber);\r
203                                 Pipe_Unfreeze();\r
204                                 SampleReceived = Pipe_IsINReceived(portnum);\r
205                                 Pipe_Freeze();\r
206 \r
207                                 return SampleReceived;\r
208                         }\r
209 \r
210                         /** @brief Determines if the given audio interface is ready to accept the next sample to be written to it, and selects\r
211                          *  the streaming OUT pipe ready for writing.\r
212                          *\r
213                          *  @pre This function must only be called when the Host state machine is in the @ref HOST_STATE_Configured state or\r
214                          *       the call will fail.\r
215                          *\r
216                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
217                          *\r
218                          *  @return Boolean \c true if the given Audio interface is ready to accept the next sample, \c false otherwise.\r
219                          */\r
220                         static inline bool Audio_Host_IsReadyForNextSample(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
221                                                                            ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
222                         static inline bool Audio_Host_IsReadyForNextSample(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
223                         {\r
224                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
225 \r
226                                 if ((USB_HostState[portnum] != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))\r
227                                   return false;\r
228 \r
229                                 Pipe_SelectPipe(portnum,AudioInterfaceInfo->Config.DataOUTPipeNumber);\r
230                                 return Pipe_IsOUTReady(portnum);\r
231                         }\r
232 \r
233                         /** @brief Reads the next 8-bit audio sample from the current audio interface.\r
234                          *\r
235                          *  @pre This should be preceded immediately by a call to the @ref Audio_Host_IsSampleReceived() function to ensure\r
236                          *       that the correct pipe is selected and ready for data.\r
237                          *\r
238                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
239                          *\r
240                          *  @return  Signed 8-bit audio sample from the audio interface.\r
241                          */\r
242                         static inline int8_t Audio_Host_ReadSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
243                                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
244                         static inline int8_t Audio_Host_ReadSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
245                         {\r
246                                 int8_t Sample;\r
247                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
248 \r
249                                 (void)AudioInterfaceInfo;\r
250 \r
251                                 Sample = Pipe_Read_8(portnum);\r
252 \r
253                                 if (!(Pipe_BytesInPipe(portnum)))\r
254                                 {\r
255                                         Pipe_Unfreeze();\r
256                                         Pipe_ClearIN(portnum);\r
257                                         Pipe_Freeze();\r
258                                 }\r
259 \r
260                                 return Sample;\r
261                         }\r
262 \r
263                         /** @brief Reads the next 16-bit audio sample from the current audio interface.\r
264                          *\r
265                          *  @pre This should be preceded immediately by a call to the @ref Audio_Host_IsSampleReceived() function to ensure\r
266                          *       that the correct pipe is selected and ready for data.\r
267                          *\r
268                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
269                          *\r
270                          *  @return  Signed 16-bit audio sample from the audio interface.\r
271                          */\r
272                         static inline int16_t Audio_Host_ReadSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
273                                                                       ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
274                         static inline int16_t Audio_Host_ReadSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
275                         {\r
276                                 int16_t Sample;\r
277                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
278                                 (void)AudioInterfaceInfo;\r
279 \r
280                                 Sample = (int16_t)Pipe_Read_16_LE(portnum);\r
281 \r
282                                 if (!(Pipe_BytesInPipe(portnum)))\r
283                                 {\r
284                                         Pipe_Unfreeze();\r
285                                         Pipe_ClearIN(portnum);\r
286                                         Pipe_Freeze();\r
287                                 }\r
288 \r
289                                 return Sample;\r
290                         }\r
291 \r
292                         /** @brief Reads the next 24-bit audio sample from the current audio interface.\r
293                          *\r
294                          *  @pre This should be preceded immediately by a call to the @ref Audio_Host_IsSampleReceived() function to ensure\r
295                          *       that the correct pipe is selected and ready for data.\r
296                          *\r
297                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
298                          *\r
299                          *  @return Signed 24-bit audio sample from the audio interface.\r
300                          */\r
301                         static inline int32_t Audio_Host_ReadSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
302                                                                       ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
303                         static inline int32_t Audio_Host_ReadSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)\r
304                         {\r
305                                 int32_t Sample;\r
306                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
307                                 (void)AudioInterfaceInfo;\r
308 \r
309                                 Sample = (((uint32_t)Pipe_Read_8(portnum) << 16)\r
310                                                         | Pipe_Read_16_LE(portnum));\r
311 \r
312                                 if (!(Pipe_BytesInPipe(portnum)))\r
313                                 {\r
314                                         Pipe_Unfreeze();\r
315                                         Pipe_ClearIN(portnum);\r
316                                         Pipe_Freeze();\r
317                                 }\r
318 \r
319                                 return Sample;\r
320                         }\r
321 \r
322                         /** @brief Writes the next 8-bit audio sample to the current audio interface.\r
323                          *\r
324                          *  @pre This should be preceded immediately by a call to the @ref Audio_Host_IsReadyForNextSample() function to\r
325                          *       ensure that the correct pipe is selected and ready for data.\r
326                          *\r
327                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
328                          *  @param Sample             : Signed 8-bit audio sample.\r
329                          *      @return Nothing\r
330                          */\r
331                         static inline void Audio_Host_WriteSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
332                                                                    const int8_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
333                         static inline void Audio_Host_WriteSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
334                                                                    const int8_t Sample)\r
335                         {\r
336                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
337 \r
338                                 (void)AudioInterfaceInfo;\r
339 \r
340                                 Pipe_Write_8(portnum,Sample);\r
341 \r
342                                 if (!(Pipe_IsReadWriteAllowed(portnum)))\r
343                                 {\r
344                                         Pipe_Unfreeze();\r
345                                         Pipe_ClearOUT(portnum);\r
346                                         Pipe_WaitUntilReady(portnum);\r
347                                         Pipe_Freeze();\r
348                                 }\r
349                         }\r
350 \r
351                         /** @brief Writes the next 16-bit audio sample to the current audio interface.\r
352                          *\r
353                          *  @pre This should be preceded immediately by a call to the @ref Audio_Host_IsReadyForNextSample() function to\r
354                          *       ensure that the correct pipe is selected and ready for data.\r
355                          *\r
356                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
357                          *  @param Sample             : Signed 16-bit audio sample.\r
358                          *      @return Nothing\r
359                          */\r
360                         static inline void Audio_Host_WriteSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
361                                                                     const int16_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
362                         static inline void Audio_Host_WriteSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
363                                                                     const int16_t Sample)\r
364                         {\r
365                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
366 \r
367                                 (void)AudioInterfaceInfo;\r
368                         \r
369                                 Pipe_Write_16_LE(portnum,Sample);\r
370 \r
371                                 if (!(Pipe_IsReadWriteAllowed(portnum)))\r
372                                 {\r
373                                         Pipe_Unfreeze();\r
374                                         Pipe_ClearOUT(portnum);\r
375                                         Pipe_WaitUntilReady(portnum);\r
376                                         Pipe_Freeze();\r
377                                 }\r
378                         }\r
379 \r
380                         /** @brief Writes the next 24-bit audio sample to the current audio interface.\r
381                          *\r
382                          *  @pre This should be preceded immediately by a call to the @ref Audio_Host_IsReadyForNextSample() function to\r
383                          *       ensure that the correct pipe is selected and ready for data.\r
384                          *\r
385                          *  @param AudioInterfaceInfo : Pointer to a structure containing an Audio Class configuration and state.\r
386                          *  @param Sample             : Signed 24-bit audio sample.\r
387                          *      @return Nothing\r
388                          */\r
389                         static inline void Audio_Host_WriteSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
390                                                                     const int32_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
391                         static inline void Audio_Host_WriteSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
392                                                                     const int32_t Sample)\r
393                         {\r
394                                 uint8_t portnum = AudioInterfaceInfo->Config.PortNumber;\r
395 \r
396                                 (void)AudioInterfaceInfo;\r
397 \r
398                                 Pipe_Write_16_LE(portnum,Sample);\r
399                                 Pipe_Write_8(portnum,Sample >> 16);\r
400 \r
401                                 if (!(Pipe_IsReadWriteAllowed(portnum)))\r
402                                 {\r
403                                         Pipe_Unfreeze();\r
404                                         Pipe_ClearOUT(portnum);\r
405                                         Pipe_WaitUntilReady(portnum);\r
406                                         Pipe_Freeze();\r
407                                 }\r
408                         }\r
409                         \r
410         /* Private Interface - For use in library only: */\r
411         #if !defined(__DOXYGEN__)\r
412                 /* Function Prototypes: */\r
413                         #if defined(__INCLUDE_FROM_AUDIO_HOST_C)\r
414                                 static uint8_t DCOMP_Audio_Host_NextAudioControlInterface(void* CurrentDescriptor)\r
415                                                                                           ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);\r
416                                 static uint8_t DCOMP_Audio_Host_NextAudioStreamInterface(void* CurrentDescriptor)\r
417                                                                                          ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);\r
418                                 static uint8_t DCOMP_Audio_Host_NextAudioInterfaceDataEndpoint(void* CurrentDescriptor)\r
419                                                                                                ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);\r
420                         #endif\r
421         #endif\r
422 \r
423         /* Disable C linkage for C++ Compilers: */\r
424                 #if defined(__cplusplus)\r
425                         }\r
426                 #endif\r
427 \r
428 #endif\r
429 \r
430 /** @} */\r
431 \r