wifi test
Dependencies: X_NUCLEO_IKS01A2 mbed-http
easy-connect/stm-spirit1-rf-driver/source/libs/spirit1/SPIRIT1_Library/Inc/SPIRIT_DirectRF.h@0:24d3eb812fd4, 2018-09-05 (annotated)
- Committer:
- JMF
- Date:
- Wed Sep 05 14:28:24 2018 +0000
- Revision:
- 0:24d3eb812fd4
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| JMF | 0:24d3eb812fd4 | 1 | /** |
| JMF | 0:24d3eb812fd4 | 2 | ****************************************************************************** |
| JMF | 0:24d3eb812fd4 | 3 | * @file SPIRIT_DirectRF.h |
| JMF | 0:24d3eb812fd4 | 4 | * @author VMA division - AMS |
| JMF | 0:24d3eb812fd4 | 5 | * @version 3.2.2 |
| JMF | 0:24d3eb812fd4 | 6 | * @date 08-July-2015 |
| JMF | 0:24d3eb812fd4 | 7 | * @brief Configuration and management of SPIRIT direct transmission / receive modes. |
| JMF | 0:24d3eb812fd4 | 8 | * @details |
| JMF | 0:24d3eb812fd4 | 9 | * |
| JMF | 0:24d3eb812fd4 | 10 | * This module contains functions to manage the direct Tx/Rx mode. |
| JMF | 0:24d3eb812fd4 | 11 | * The user can choose the way to send data to Spirit through the |
| JMF | 0:24d3eb812fd4 | 12 | * enumerative types <i>@ref DirectTx</i>/<i>@ref DirectRx</i>. |
| JMF | 0:24d3eb812fd4 | 13 | * |
| JMF | 0:24d3eb812fd4 | 14 | * @attention |
| JMF | 0:24d3eb812fd4 | 15 | * |
| JMF | 0:24d3eb812fd4 | 16 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
| JMF | 0:24d3eb812fd4 | 17 | * |
| JMF | 0:24d3eb812fd4 | 18 | * Redistribution and use in source and binary forms, with or without modification, |
| JMF | 0:24d3eb812fd4 | 19 | * are permitted provided that the following conditions are met: |
| JMF | 0:24d3eb812fd4 | 20 | * 1. Redistributions of source code must retain the above copyright notice, |
| JMF | 0:24d3eb812fd4 | 21 | * this list of conditions and the following disclaimer. |
| JMF | 0:24d3eb812fd4 | 22 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| JMF | 0:24d3eb812fd4 | 23 | * this list of conditions and the following disclaimer in the documentation |
| JMF | 0:24d3eb812fd4 | 24 | * and/or other materials provided with the distribution. |
| JMF | 0:24d3eb812fd4 | 25 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| JMF | 0:24d3eb812fd4 | 26 | * may be used to endorse or promote products derived from this software |
| JMF | 0:24d3eb812fd4 | 27 | * without specific prior written permission. |
| JMF | 0:24d3eb812fd4 | 28 | * |
| JMF | 0:24d3eb812fd4 | 29 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| JMF | 0:24d3eb812fd4 | 30 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| JMF | 0:24d3eb812fd4 | 31 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| JMF | 0:24d3eb812fd4 | 32 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| JMF | 0:24d3eb812fd4 | 33 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| JMF | 0:24d3eb812fd4 | 34 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| JMF | 0:24d3eb812fd4 | 35 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| JMF | 0:24d3eb812fd4 | 36 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| JMF | 0:24d3eb812fd4 | 37 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| JMF | 0:24d3eb812fd4 | 38 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| JMF | 0:24d3eb812fd4 | 39 | * |
| JMF | 0:24d3eb812fd4 | 40 | ****************************************************************************** |
| JMF | 0:24d3eb812fd4 | 41 | */ |
| JMF | 0:24d3eb812fd4 | 42 | |
| JMF | 0:24d3eb812fd4 | 43 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| JMF | 0:24d3eb812fd4 | 44 | #ifndef __SPIRIT1_DIRECT_RF_H |
| JMF | 0:24d3eb812fd4 | 45 | #define __SPIRIT1_DIRECT_RF_H |
| JMF | 0:24d3eb812fd4 | 46 | |
| JMF | 0:24d3eb812fd4 | 47 | /* Includes ------------------------------------------------------------------*/ |
| JMF | 0:24d3eb812fd4 | 48 | |
| JMF | 0:24d3eb812fd4 | 49 | #include "SPIRIT_Regs.h" |
| JMF | 0:24d3eb812fd4 | 50 | #include "SPIRIT_Types.h" |
| JMF | 0:24d3eb812fd4 | 51 | |
| JMF | 0:24d3eb812fd4 | 52 | |
| JMF | 0:24d3eb812fd4 | 53 | |
| JMF | 0:24d3eb812fd4 | 54 | #ifdef __cplusplus |
| JMF | 0:24d3eb812fd4 | 55 | extern "C" { |
| JMF | 0:24d3eb812fd4 | 56 | #endif |
| JMF | 0:24d3eb812fd4 | 57 | |
| JMF | 0:24d3eb812fd4 | 58 | |
| JMF | 0:24d3eb812fd4 | 59 | /** |
| JMF | 0:24d3eb812fd4 | 60 | * @addtogroup SPIRIT_Libraries |
| JMF | 0:24d3eb812fd4 | 61 | * @{ |
| JMF | 0:24d3eb812fd4 | 62 | */ |
| JMF | 0:24d3eb812fd4 | 63 | |
| JMF | 0:24d3eb812fd4 | 64 | |
| JMF | 0:24d3eb812fd4 | 65 | /** |
| JMF | 0:24d3eb812fd4 | 66 | * @defgroup SPIRIT_DirectRf Direct RF |
| JMF | 0:24d3eb812fd4 | 67 | * @brief Configuration and management of SPIRIT direct transmission / receive modes. |
| JMF | 0:24d3eb812fd4 | 68 | * @details See the file <i>@ref SPIRIT_DirectRF.h</i> for more details. |
| JMF | 0:24d3eb812fd4 | 69 | * @{ |
| JMF | 0:24d3eb812fd4 | 70 | */ |
| JMF | 0:24d3eb812fd4 | 71 | |
| JMF | 0:24d3eb812fd4 | 72 | /** |
| JMF | 0:24d3eb812fd4 | 73 | * @defgroup DirectRf_Exported_Types Direct RF Exported Types |
| JMF | 0:24d3eb812fd4 | 74 | * @{ |
| JMF | 0:24d3eb812fd4 | 75 | */ |
| JMF | 0:24d3eb812fd4 | 76 | |
| JMF | 0:24d3eb812fd4 | 77 | /** |
| JMF | 0:24d3eb812fd4 | 78 | * @brief Direct transmission mode enumeration for SPIRIT. |
| JMF | 0:24d3eb812fd4 | 79 | */ |
| JMF | 0:24d3eb812fd4 | 80 | typedef enum |
| JMF | 0:24d3eb812fd4 | 81 | { |
| JMF | 0:24d3eb812fd4 | 82 | NORMAL_TX_MODE = 0x00, /*!< Normal mode, no direct transmission is used */ |
| JMF | 0:24d3eb812fd4 | 83 | DIRECT_TX_FIFO_MODE = 0x04, /*!< Source is FIFO: payload bits are continuously read from the TX FIFO */ |
| JMF | 0:24d3eb812fd4 | 84 | DIRECT_TX_GPIO_MODE = 0x08, /*!< Source is GPIO: payload bits are continuously read from one of the GPIO ports and transmitted without any processing */ |
| JMF | 0:24d3eb812fd4 | 85 | PN9_TX_MODE = 0x0C /*!< A pseudorandom binary sequence is generated internally */ |
| JMF | 0:24d3eb812fd4 | 86 | }DirectTx; |
| JMF | 0:24d3eb812fd4 | 87 | |
| JMF | 0:24d3eb812fd4 | 88 | #define IS_DIRECT_TX(MODE) (((MODE) == NORMAL_TX_MODE) || \ |
| JMF | 0:24d3eb812fd4 | 89 | ((MODE) == DIRECT_TX_FIFO_MODE) || \ |
| JMF | 0:24d3eb812fd4 | 90 | ((MODE) == DIRECT_TX_GPIO_MODE) || \ |
| JMF | 0:24d3eb812fd4 | 91 | ((MODE) == PN9_TX_MODE)) |
| JMF | 0:24d3eb812fd4 | 92 | |
| JMF | 0:24d3eb812fd4 | 93 | /** |
| JMF | 0:24d3eb812fd4 | 94 | * @brief Direct receive mode enumeration for SPIRIT. |
| JMF | 0:24d3eb812fd4 | 95 | */ |
| JMF | 0:24d3eb812fd4 | 96 | typedef enum |
| JMF | 0:24d3eb812fd4 | 97 | { |
| JMF | 0:24d3eb812fd4 | 98 | NORMAL_RX_MODE = 0x00, /*!< Normal mode, no direct reception is used */ |
| JMF | 0:24d3eb812fd4 | 99 | DIRECT_RX_FIFO_MODE = 0x10, /*!< Destination is FIFO: payload bits are continuously written to the RX FIFO and not subjected to any processing*/ |
| JMF | 0:24d3eb812fd4 | 100 | DIRECT_RX_GPIO_MODE = 0x20 /*!< Destination is GPIO: payload bits are continuously written to one of the GPIO ports and not subjected to any processing*/ |
| JMF | 0:24d3eb812fd4 | 101 | }DirectRx; |
| JMF | 0:24d3eb812fd4 | 102 | |
| JMF | 0:24d3eb812fd4 | 103 | #define IS_DIRECT_RX(MODE) (((MODE) == NORMAL_RX_MODE) || \ |
| JMF | 0:24d3eb812fd4 | 104 | ((MODE) == DIRECT_RX_FIFO_MODE) || \ |
| JMF | 0:24d3eb812fd4 | 105 | ((MODE) == DIRECT_RX_GPIO_MODE)) |
| JMF | 0:24d3eb812fd4 | 106 | |
| JMF | 0:24d3eb812fd4 | 107 | |
| JMF | 0:24d3eb812fd4 | 108 | /** |
| JMF | 0:24d3eb812fd4 | 109 | *@} |
| JMF | 0:24d3eb812fd4 | 110 | */ |
| JMF | 0:24d3eb812fd4 | 111 | |
| JMF | 0:24d3eb812fd4 | 112 | |
| JMF | 0:24d3eb812fd4 | 113 | /** |
| JMF | 0:24d3eb812fd4 | 114 | * @defgroup DirectRf_Exported_Constants Direct RF Exported Constants |
| JMF | 0:24d3eb812fd4 | 115 | * @{ |
| JMF | 0:24d3eb812fd4 | 116 | */ |
| JMF | 0:24d3eb812fd4 | 117 | |
| JMF | 0:24d3eb812fd4 | 118 | |
| JMF | 0:24d3eb812fd4 | 119 | /** |
| JMF | 0:24d3eb812fd4 | 120 | *@} |
| JMF | 0:24d3eb812fd4 | 121 | */ |
| JMF | 0:24d3eb812fd4 | 122 | |
| JMF | 0:24d3eb812fd4 | 123 | |
| JMF | 0:24d3eb812fd4 | 124 | /** |
| JMF | 0:24d3eb812fd4 | 125 | * @defgroup DirectRf_Exported_Macros Direct RF Exported Macros |
| JMF | 0:24d3eb812fd4 | 126 | * @{ |
| JMF | 0:24d3eb812fd4 | 127 | */ |
| JMF | 0:24d3eb812fd4 | 128 | |
| JMF | 0:24d3eb812fd4 | 129 | |
| JMF | 0:24d3eb812fd4 | 130 | /** |
| JMF | 0:24d3eb812fd4 | 131 | *@} |
| JMF | 0:24d3eb812fd4 | 132 | */ |
| JMF | 0:24d3eb812fd4 | 133 | |
| JMF | 0:24d3eb812fd4 | 134 | |
| JMF | 0:24d3eb812fd4 | 135 | /** |
| JMF | 0:24d3eb812fd4 | 136 | * @defgroup DirectRf_Exported_Functions Direct RF Exported Functions |
| JMF | 0:24d3eb812fd4 | 137 | * @{ |
| JMF | 0:24d3eb812fd4 | 138 | */ |
| JMF | 0:24d3eb812fd4 | 139 | |
| JMF | 0:24d3eb812fd4 | 140 | void SpiritDirectRfSetRxMode(DirectRx xDirectRx); |
| JMF | 0:24d3eb812fd4 | 141 | DirectRx SpiritDirectRfGetRxMode(void); |
| JMF | 0:24d3eb812fd4 | 142 | void SpiritDirectRfSetTxMode(DirectTx xDirectTx); |
| JMF | 0:24d3eb812fd4 | 143 | DirectTx SpiritDirectRfGetTxMode(void); |
| JMF | 0:24d3eb812fd4 | 144 | |
| JMF | 0:24d3eb812fd4 | 145 | /** |
| JMF | 0:24d3eb812fd4 | 146 | *@} |
| JMF | 0:24d3eb812fd4 | 147 | */ |
| JMF | 0:24d3eb812fd4 | 148 | |
| JMF | 0:24d3eb812fd4 | 149 | /** |
| JMF | 0:24d3eb812fd4 | 150 | *@} |
| JMF | 0:24d3eb812fd4 | 151 | */ |
| JMF | 0:24d3eb812fd4 | 152 | |
| JMF | 0:24d3eb812fd4 | 153 | |
| JMF | 0:24d3eb812fd4 | 154 | /** |
| JMF | 0:24d3eb812fd4 | 155 | *@} |
| JMF | 0:24d3eb812fd4 | 156 | */ |
| JMF | 0:24d3eb812fd4 | 157 | |
| JMF | 0:24d3eb812fd4 | 158 | |
| JMF | 0:24d3eb812fd4 | 159 | #ifdef __cplusplus |
| JMF | 0:24d3eb812fd4 | 160 | } |
| JMF | 0:24d3eb812fd4 | 161 | #endif |
| JMF | 0:24d3eb812fd4 | 162 | |
| JMF | 0:24d3eb812fd4 | 163 | #endif |
| JMF | 0:24d3eb812fd4 | 164 | |
| JMF | 0:24d3eb812fd4 | 165 | /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/ |