OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2006-2009 NVIDIA Corporation. |
| 3 * All rights reserved. |
| 4 * |
| 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: |
| 7 * |
| 8 * Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. |
| 10 * |
| 11 * Redistributions in binary form must reproduce the above copyright notice, |
| 12 * this list of conditions and the following disclaimer in the documentation |
| 13 * and/or other materials provided with the distribution. |
| 14 * |
| 15 * Neither the name of the NVIDIA Corporation nor the names of its contributors |
| 16 * may be used to endorse or promote products derived from this software |
| 17 * without specific prior written permission. |
| 18 * |
| 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 29 * POSSIBILITY OF SUCH DAMAGE. |
| 30 * |
| 31 */ |
| 32 |
| 33 /** |
| 34 * @file |
| 35 * <b>NVIDIA Tegra ODM Kit: |
| 36 * UART Adaptation Interface</b> |
| 37 * |
| 38 * @b Description: Defines the ODM adaptation interface for UART devices. |
| 39 * |
| 40 */ |
| 41 |
| 42 #ifndef INCLUDED_NVODM_UART_H |
| 43 #define INCLUDED_NVODM_UART_H |
| 44 |
| 45 #if defined(__cplusplus) |
| 46 extern "C" |
| 47 { |
| 48 #endif |
| 49 |
| 50 #include "nvodm_services.h" |
| 51 #include "nverror.h" |
| 52 |
| 53 /** |
| 54 * @defgroup nvodm_uart UART Adaptation Interface |
| 55 * |
| 56 * This is the UART ODM adaptation interface. |
| 57 * |
| 58 * @ingroup nvodm_adaptation |
| 59 * @{ |
| 60 */ |
| 61 |
| 62 /** |
| 63 * Defines an opaque handle that exists for each UART device in the |
| 64 * system, each of which is defined by the customer implementation. |
| 65 */ |
| 66 typedef struct NvOdmUartRec *NvOdmUartHandle; |
| 67 |
| 68 /** |
| 69 * Gets a handle to the UART device. |
| 70 * |
| 71 * @param Instance [IN] UART instance number |
| 72 * |
| 73 * @return A handle to the UART device. |
| 74 */ |
| 75 NvOdmUartHandle NvOdmUartOpen(NvU32 Instance); |
| 76 |
| 77 /** |
| 78 * Closes the UART handle. |
| 79 * |
| 80 * @param hOdmUart The UART handle to be closed. |
| 81 */ |
| 82 void NvOdmUartClose(NvOdmUartHandle hOdmUart); |
| 83 |
| 84 /** |
| 85 * Call this API whenever the UART device goes into suspend mode. |
| 86 * |
| 87 * @param hOdmUart The UART handle. |
| 88 */ |
| 89 NvBool NvOdmUartSuspend(NvOdmUartHandle hOdmUart); |
| 90 |
| 91 /** |
| 92 * Call this API whenever the UART device resumes from the suspend mode. |
| 93 * |
| 94 * @param hOdmUart The UART handle. |
| 95 */ |
| 96 NvBool NvOdmUartResume(NvOdmUartHandle hOdmUart); |
| 97 |
| 98 |
| 99 #if defined(__cplusplus) |
| 100 } |
| 101 #endif |
| 102 |
| 103 /** @} */ |
| 104 |
| 105 #endif // INCLUDED_NVODM_uart_H |
OLD | NEW |