wifi test

Dependencies:   X_NUCLEO_IKS01A2 mbed-http

Committer:
JMF
Date:
Wed Sep 05 14:28:24 2018 +0000
Revision:
0:24d3eb812fd4
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JMF 0:24d3eb812fd4 1 /*!
JMF 0:24d3eb812fd4 2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
JMF 0:24d3eb812fd4 3 * All rights reserved.
JMF 0:24d3eb812fd4 4 *
JMF 0:24d3eb812fd4 5 * \file XcvrSpi.h
JMF 0:24d3eb812fd4 6 *
JMF 0:24d3eb812fd4 7 * Redistribution and use in source and binary forms, with or without modification,
JMF 0:24d3eb812fd4 8 * are permitted provided that the following conditions are met:
JMF 0:24d3eb812fd4 9 *
JMF 0:24d3eb812fd4 10 * o Redistributions of source code must retain the above copyright notice, this list
JMF 0:24d3eb812fd4 11 * of conditions and the following disclaimer.
JMF 0:24d3eb812fd4 12 *
JMF 0:24d3eb812fd4 13 * o Redistributions in binary form must reproduce the above copyright notice, this
JMF 0:24d3eb812fd4 14 * list of conditions and the following disclaimer in the documentation and/or
JMF 0:24d3eb812fd4 15 * other materials provided with the distribution.
JMF 0:24d3eb812fd4 16 *
JMF 0:24d3eb812fd4 17 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
JMF 0:24d3eb812fd4 18 * contributors may be used to endorse or promote products derived from this
JMF 0:24d3eb812fd4 19 * software without specific prior written permission.
JMF 0:24d3eb812fd4 20 *
JMF 0:24d3eb812fd4 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
JMF 0:24d3eb812fd4 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
JMF 0:24d3eb812fd4 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
JMF 0:24d3eb812fd4 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
JMF 0:24d3eb812fd4 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
JMF 0:24d3eb812fd4 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
JMF 0:24d3eb812fd4 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
JMF 0:24d3eb812fd4 28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
JMF 0:24d3eb812fd4 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
JMF 0:24d3eb812fd4 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
JMF 0:24d3eb812fd4 31 */
JMF 0:24d3eb812fd4 32
JMF 0:24d3eb812fd4 33 #ifndef __XCVR_SPI_H__
JMF 0:24d3eb812fd4 34 #define __XCVR_SPI_H__
JMF 0:24d3eb812fd4 35
JMF 0:24d3eb812fd4 36
JMF 0:24d3eb812fd4 37 /*****************************************************************************
JMF 0:24d3eb812fd4 38 * INCLUDED HEADERS *
JMF 0:24d3eb812fd4 39 *---------------------------------------------------------------------------*
JMF 0:24d3eb812fd4 40 * Add to this section all the headers that this module needs to include. *
JMF 0:24d3eb812fd4 41 * Note that it is not a good practice to include header files into header *
JMF 0:24d3eb812fd4 42 * files, so use this section only if there is no other better solution. *
JMF 0:24d3eb812fd4 43 *---------------------------------------------------------------------------*
JMF 0:24d3eb812fd4 44 *****************************************************************************/
JMF 0:24d3eb812fd4 45
JMF 0:24d3eb812fd4 46
JMF 0:24d3eb812fd4 47 /*****************************************************************************
JMF 0:24d3eb812fd4 48 * PUBLIC MACROS *
JMF 0:24d3eb812fd4 49 *---------------------------------------------------------------------------*
JMF 0:24d3eb812fd4 50 * Add to this section all the access macros, registers mappings, bit access *
JMF 0:24d3eb812fd4 51 * macros, masks, flags etc ...
JMF 0:24d3eb812fd4 52 *---------------------------------------------------------------------------*
JMF 0:24d3eb812fd4 53 *****************************************************************************/
JMF 0:24d3eb812fd4 54 #define gXcvrSpiInstance_c 0
JMF 0:24d3eb812fd4 55
JMF 0:24d3eb812fd4 56 /*****************************************************************************
JMF 0:24d3eb812fd4 57 * PUBLIC FUNCTIONS *
JMF 0:24d3eb812fd4 58 *---------------------------------------------------------------------------*
JMF 0:24d3eb812fd4 59 * Add to this section all the global functions prototype preceded (as a *
JMF 0:24d3eb812fd4 60 * good practice) by the keyword 'extern' *
JMF 0:24d3eb812fd4 61 *---------------------------------------------------------------------------*
JMF 0:24d3eb812fd4 62 *****************************************************************************/
JMF 0:24d3eb812fd4 63
JMF 0:24d3eb812fd4 64 #if defined(__cplusplus)
JMF 0:24d3eb812fd4 65 extern "C" {
JMF 0:24d3eb812fd4 66 #endif /* __cplusplus */
JMF 0:24d3eb812fd4 67
JMF 0:24d3eb812fd4 68 void RF_RST_Set(int state);
JMF 0:24d3eb812fd4 69 void RF_CS_Set(int state);
JMF 0:24d3eb812fd4 70 void RF_IRQ_Init(void);
JMF 0:24d3eb812fd4 71 void RF_IRQ_Disable(void);
JMF 0:24d3eb812fd4 72 void RF_IRQ_Enable(void);
JMF 0:24d3eb812fd4 73 uint8_t RF_isIRQ_Pending(void);
JMF 0:24d3eb812fd4 74
JMF 0:24d3eb812fd4 75 void gXcvrAssertCS_d(void);
JMF 0:24d3eb812fd4 76 void gXcvrDeassertCS_d(void);
JMF 0:24d3eb812fd4 77
JMF 0:24d3eb812fd4 78 void xcvr_spi_init(uint32_t instance);
JMF 0:24d3eb812fd4 79 void xcvr_spi_configure_speed(uint32_t instance, uint32_t freq);
JMF 0:24d3eb812fd4 80 void xcvr_spi_transfer(uint32_t instance,
JMF 0:24d3eb812fd4 81 uint8_t * sendBuffer,
JMF 0:24d3eb812fd4 82 uint8_t * receiveBuffer,
JMF 0:24d3eb812fd4 83 uint32_t transferByteCount);
JMF 0:24d3eb812fd4 84
JMF 0:24d3eb812fd4 85 #if defined(__cplusplus)
JMF 0:24d3eb812fd4 86 }
JMF 0:24d3eb812fd4 87 #endif /* __cplusplus */
JMF 0:24d3eb812fd4 88
JMF 0:24d3eb812fd4 89 #endif /* __XCVR_SPI_H__ */