Added support for WNC M14A2A Cellular LTE Data Module.

Dependencies:   WNC14A2AInterface

Dependents:   http-example-wnc http-example-wnc-modified

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers XcvrSpi.h Source File

XcvrSpi.h

Go to the documentation of this file.
00001 /*!
00002 * Copyright (c) 2015, Freescale Semiconductor, Inc.
00003 * All rights reserved.
00004 *
00005 * \file XcvrSpi.h
00006 *
00007 * Redistribution and use in source and binary forms, with or without modification,
00008 * are permitted provided that the following conditions are met:
00009 *
00010 * o Redistributions of source code must retain the above copyright notice, this list
00011 *   of conditions and the following disclaimer.
00012 *
00013 * o Redistributions in binary form must reproduce the above copyright notice, this
00014 *   list of conditions and the following disclaimer in the documentation and/or
00015 *   other materials provided with the distribution.
00016 *
00017 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
00018 *   contributors may be used to endorse or promote products derived from this
00019 *   software without specific prior written permission.
00020 *
00021 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00022 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00023 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00024 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
00025 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00026 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00027 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00028 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00029 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 */
00032 
00033 #ifndef __XCVR_SPI_H__
00034 #define __XCVR_SPI_H__
00035 
00036 
00037 /*****************************************************************************
00038  *                               INCLUDED HEADERS                            *
00039  *---------------------------------------------------------------------------*
00040  * Add to this section all the headers that this module needs to include.    *
00041  * Note that it is not a good practice to include header files into header   *
00042  * files, so use this section only if there is no other better solution.     *
00043  *---------------------------------------------------------------------------*
00044  *****************************************************************************/
00045  
00046 
00047 /*****************************************************************************
00048  *                             PUBLIC MACROS                                 *
00049  *---------------------------------------------------------------------------*
00050  * Add to this section all the access macros, registers mappings, bit access *
00051  * macros, masks, flags etc ...
00052  *---------------------------------------------------------------------------*
00053  *****************************************************************************/
00054 #define gXcvrSpiInstance_c              0
00055 
00056 /*****************************************************************************
00057  *                            PUBLIC FUNCTIONS                               *
00058  *---------------------------------------------------------------------------*
00059  * Add to this section all the global functions prototype preceded (as a     *
00060  * good practice) by the keyword 'extern'                                    *
00061  *---------------------------------------------------------------------------*
00062  *****************************************************************************/
00063 
00064 #if defined(__cplusplus)
00065 extern "C" {
00066 #endif /* __cplusplus */
00067 
00068 void RF_RST_Set(int state);
00069 void RF_CS_Set(int state);
00070 void RF_IRQ_Init(void);
00071 void RF_IRQ_Disable(void);
00072 void RF_IRQ_Enable(void);
00073 uint8_t RF_isIRQ_Pending(void);
00074 
00075 void gXcvrAssertCS_d(void);
00076 void gXcvrDeassertCS_d(void);
00077 
00078 void xcvr_spi_init(uint32_t instance);
00079 void xcvr_spi_configure_speed(uint32_t instance, uint32_t freq);
00080 void xcvr_spi_transfer(uint32_t instance,
00081                          uint8_t * sendBuffer,
00082                          uint8_t * receiveBuffer,
00083                          uint32_t transferByteCount);
00084                          
00085 #if defined(__cplusplus)
00086 }
00087 #endif /* __cplusplus */
00088 
00089 #endif /* __XCVR_SPI_H__ */