Vybhav Kadaba
/
EV-PRO-MW1001_Development_updateFW
Bumped Mbed FW version to 01.20.0080
inc/admw_spi.h@72:35ea0b4e725b, 2020-04-24 (annotated)
- Committer:
- Vkadaba
- Date:
- Fri Apr 24 06:37:01 2020 +0000
- Revision:
- 72:35ea0b4e725b
- Parent:
- 13:97cb32670539
Added admw_SetExtVrefBufferMode functionality:; updated the config files ; Bumped the FW version to 1.20.0080
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Vkadaba | 5:0728bde67bdb | 1 | /* |
Vkadaba | 5:0728bde67bdb | 2 | Copyright 2019 (c) Analog Devices, Inc. |
Vkadaba | 5:0728bde67bdb | 3 | |
Vkadaba | 5:0728bde67bdb | 4 | All rights reserved. |
Vkadaba | 5:0728bde67bdb | 5 | |
Vkadaba | 5:0728bde67bdb | 6 | Redistribution and use in source and binary forms, with or without |
Vkadaba | 5:0728bde67bdb | 7 | modification, are permitted provided that the following conditions are met: |
Vkadaba | 5:0728bde67bdb | 8 | - Redistributions of source code must retain the above copyright |
Vkadaba | 5:0728bde67bdb | 9 | notice, this list of conditions and the following disclaimer. |
Vkadaba | 5:0728bde67bdb | 10 | - Redistributions in binary form must reproduce the above copyright |
Vkadaba | 5:0728bde67bdb | 11 | notice, this list of conditions and the following disclaimer in |
Vkadaba | 5:0728bde67bdb | 12 | the documentation and/or other materials provided with the |
Vkadaba | 5:0728bde67bdb | 13 | distribution. |
Vkadaba | 5:0728bde67bdb | 14 | - Neither the name of Analog Devices, Inc. nor the names of its |
Vkadaba | 5:0728bde67bdb | 15 | contributors may be used to endorse or promote products derived |
Vkadaba | 5:0728bde67bdb | 16 | from this software without specific prior written permission. |
Vkadaba | 5:0728bde67bdb | 17 | - The use of this software may or may not infringe the patent rights |
Vkadaba | 5:0728bde67bdb | 18 | of one or more patent holders. This license does not release you |
Vkadaba | 5:0728bde67bdb | 19 | from the requirement that you obtain separate licenses from these |
Vkadaba | 5:0728bde67bdb | 20 | patent holders to use this software. |
Vkadaba | 5:0728bde67bdb | 21 | - Use of the software either in source or binary form, must be run |
Vkadaba | 5:0728bde67bdb | 22 | on or directly connected to an Analog Devices Inc. component. |
Vkadaba | 5:0728bde67bdb | 23 | |
Vkadaba | 5:0728bde67bdb | 24 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
Vkadaba | 5:0728bde67bdb | 25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
Vkadaba | 5:0728bde67bdb | 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
Vkadaba | 5:0728bde67bdb | 27 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
Vkadaba | 5:0728bde67bdb | 28 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
Vkadaba | 5:0728bde67bdb | 29 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
Vkadaba | 5:0728bde67bdb | 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Vkadaba | 5:0728bde67bdb | 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Vkadaba | 5:0728bde67bdb | 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Vkadaba | 5:0728bde67bdb | 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Vkadaba | 5:0728bde67bdb | 34 | */ |
Vkadaba | 5:0728bde67bdb | 35 | |
Vkadaba | 5:0728bde67bdb | 36 | /*! |
Vkadaba | 5:0728bde67bdb | 37 | ****************************************************************************** |
Vkadaba | 5:0728bde67bdb | 38 | * @file: admw_spi.h |
Vkadaba | 5:0728bde67bdb | 39 | * @brief: ADMW OS-dependent wrapper layer for SPI interface |
Vkadaba | 5:0728bde67bdb | 40 | *----------------------------------------------------------------------------- |
Vkadaba | 5:0728bde67bdb | 41 | */ |
Vkadaba | 5:0728bde67bdb | 42 | |
Vkadaba | 5:0728bde67bdb | 43 | #ifndef __ADMW_SPI_H__ |
Vkadaba | 5:0728bde67bdb | 44 | #define __ADMW_SPI_H__ |
Vkadaba | 5:0728bde67bdb | 45 | |
Vkadaba | 5:0728bde67bdb | 46 | #include "inc/admw_types.h" |
Vkadaba | 5:0728bde67bdb | 47 | #include "inc/admw_platform.h" |
Vkadaba | 5:0728bde67bdb | 48 | |
Vkadaba | 5:0728bde67bdb | 49 | /*! @ingroup ADMW_Host */ |
Vkadaba | 5:0728bde67bdb | 50 | |
Vkadaba | 5:0728bde67bdb | 51 | /*! @addtogroup ADMW_Spi ADMW Host SPI interface functions |
Vkadaba | 5:0728bde67bdb | 52 | * @{ |
Vkadaba | 5:0728bde67bdb | 53 | */ |
Vkadaba | 5:0728bde67bdb | 54 | |
Vkadaba | 5:0728bde67bdb | 55 | /*! A handle used in all API functions to identify the SPI interface context */ |
Vkadaba | 5:0728bde67bdb | 56 | typedef void * ADMW_SPI_HANDLE; |
Vkadaba | 5:0728bde67bdb | 57 | |
Vkadaba | 5:0728bde67bdb | 58 | #ifdef __cplusplus |
Vkadaba | 5:0728bde67bdb | 59 | extern "C" |
Vkadaba | 5:0728bde67bdb | 60 | { |
Vkadaba | 5:0728bde67bdb | 61 | #endif |
Vkadaba | 5:0728bde67bdb | 62 | |
Vkadaba | 5:0728bde67bdb | 63 | /*! |
Vkadaba | 5:0728bde67bdb | 64 | * @brief Open the SPI interface and allocate resources |
Vkadaba | 5:0728bde67bdb | 65 | * |
Vkadaba | 5:0728bde67bdb | 66 | * @param[in] pConfig Pointer to platform-specific SPI interface details |
Vkadaba | 5:0728bde67bdb | 67 | * @param[out] phDevice Pointer to return a SPI interface context handle |
Vkadaba | 5:0728bde67bdb | 68 | * |
Vkadaba | 5:0728bde67bdb | 69 | * @return Status |
Vkadaba | 5:0728bde67bdb | 70 | * - #ADMW_SUCCESS Call completed successfully |
Vkadaba | 5:0728bde67bdb | 71 | * - #ADMW_NO_MEM Failed to allocate memory for interface context |
Vkadaba | 5:0728bde67bdb | 72 | */ |
Vkadaba | 5:0728bde67bdb | 73 | ADMW_RESULT admw_SpiOpen( |
Vkadaba | 5:0728bde67bdb | 74 | ADMW_PLATFORM_SPI_CONFIG * pConfig, |
Vkadaba | 5:0728bde67bdb | 75 | ADMW_SPI_HANDLE * phDevice); |
Vkadaba | 5:0728bde67bdb | 76 | |
Vkadaba | 5:0728bde67bdb | 77 | /*! |
Vkadaba | 5:0728bde67bdb | 78 | * @brief Close SPI interface and free resources |
Vkadaba | 5:0728bde67bdb | 79 | * |
Vkadaba | 5:0728bde67bdb | 80 | * @param[in] hDevice SPI interface context handle (@ref admw_SpiOpen) |
Vkadaba | 5:0728bde67bdb | 81 | */ |
Vkadaba | 5:0728bde67bdb | 82 | void admw_SpiClose( |
Vkadaba | 5:0728bde67bdb | 83 | ADMW_SPI_HANDLE hDevice); |
Vkadaba | 5:0728bde67bdb | 84 | |
Vkadaba | 5:0728bde67bdb | 85 | /*! |
Vkadaba | 5:0728bde67bdb | 86 | * @brief Transfer data to slave device |
Vkadaba | 5:0728bde67bdb | 87 | * |
Vkadaba | 5:0728bde67bdb | 88 | * @param[in] hDevice SPI interface context handle (@ref admw_SpiOpen) |
Vkadaba | 5:0728bde67bdb | 89 | * @param[in] pTxData Transmit data buffer, or NULL for read-only transfers |
Vkadaba | 5:0728bde67bdb | 90 | * @param[in] pRxData Receive data buffer, or NULL for write-only transfers |
Vkadaba | 5:0728bde67bdb | 91 | * @param[in] nLength Number of bytes to transfer |
Vkadaba | 5:0728bde67bdb | 92 | * @param[in] bCsHold Leave the chip-select asserted when the transfer is done |
Vkadaba | 5:0728bde67bdb | 93 | * |
Vkadaba | 5:0728bde67bdb | 94 | * @return Status |
Vkadaba | 5:0728bde67bdb | 95 | * - #ADMW_SUCCESS Call completed successfully |
Vkadaba | 5:0728bde67bdb | 96 | * - #ADMW_FAILURE Failed to complete SPI transfer |
Vkadaba | 5:0728bde67bdb | 97 | */ |
Vkadaba | 5:0728bde67bdb | 98 | ADMW_RESULT admw_SpiTransfer( |
Vkadaba | 5:0728bde67bdb | 99 | ADMW_SPI_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 100 | void * pTxData, |
Vkadaba | 5:0728bde67bdb | 101 | void * pRxData, |
Vkadaba | 5:0728bde67bdb | 102 | unsigned nLength, |
Vkadaba | 5:0728bde67bdb | 103 | bool bCsHold); |
Vkadaba | 5:0728bde67bdb | 104 | |
Vkadaba | 13:97cb32670539 | 105 | ADMW_RESULT admw_SpiReceive( |
Vkadaba | 13:97cb32670539 | 106 | ADMW_SPI_HANDLE hDevice, |
Vkadaba | 13:97cb32670539 | 107 | void *pTxData, |
Vkadaba | 13:97cb32670539 | 108 | void *pRxData, |
Vkadaba | 13:97cb32670539 | 109 | unsigned nLength, |
Vkadaba | 13:97cb32670539 | 110 | bool bCsHold); |
Vkadaba | 5:0728bde67bdb | 111 | #ifdef __cplusplus |
Vkadaba | 5:0728bde67bdb | 112 | } |
Vkadaba | 5:0728bde67bdb | 113 | #endif |
Vkadaba | 5:0728bde67bdb | 114 | |
Vkadaba | 5:0728bde67bdb | 115 | /*! |
Vkadaba | 5:0728bde67bdb | 116 | * @} |
Vkadaba | 5:0728bde67bdb | 117 | */ |
Vkadaba | 5:0728bde67bdb | 118 | |
Vkadaba | 5:0728bde67bdb | 119 | #endif /* __ADMW_API_H__ */ |