Fork of my original MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:43:14 2017 +0000
Revision:
0:a1734fe1ec4b
Initial commit

Who changed what in which revision?

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