Vergil Cola
/
MQTTGateway2
Fork of my original MQTTGateway
easy-connect/stm-spirit1-rf-driver/source/libs/spirit1/SPIRIT1_Library/Inc/SPIRIT_LinearFifo.h@0:a1734fe1ec4b, 2017-04-08 (annotated)
- Committer:
- vpcola
- Date:
- Sat Apr 08 14:43:14 2017 +0000
- Revision:
- 0:a1734fe1ec4b
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vpcola | 0:a1734fe1ec4b | 1 | /** |
vpcola | 0:a1734fe1ec4b | 2 | ****************************************************************************** |
vpcola | 0:a1734fe1ec4b | 3 | * @file SPIRIT_LinearFifo.h |
vpcola | 0:a1734fe1ec4b | 4 | * @author VMA division - AMS |
vpcola | 0:a1734fe1ec4b | 5 | * @version 3.2.2 |
vpcola | 0:a1734fe1ec4b | 6 | * @date 08-July-2015 |
vpcola | 0:a1734fe1ec4b | 7 | * @brief Configuration and management of SPIRIT Fifo. |
vpcola | 0:a1734fe1ec4b | 8 | * @details |
vpcola | 0:a1734fe1ec4b | 9 | * |
vpcola | 0:a1734fe1ec4b | 10 | * @attention |
vpcola | 0:a1734fe1ec4b | 11 | * |
vpcola | 0:a1734fe1ec4b | 12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
vpcola | 0:a1734fe1ec4b | 13 | * |
vpcola | 0:a1734fe1ec4b | 14 | * Redistribution and use in source and binary forms, with or without modification, |
vpcola | 0:a1734fe1ec4b | 15 | * are permitted provided that the following conditions are met: |
vpcola | 0:a1734fe1ec4b | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
vpcola | 0:a1734fe1ec4b | 17 | * this list of conditions and the following disclaimer. |
vpcola | 0:a1734fe1ec4b | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
vpcola | 0:a1734fe1ec4b | 19 | * this list of conditions and the following disclaimer in the documentation |
vpcola | 0:a1734fe1ec4b | 20 | * and/or other materials provided with the distribution. |
vpcola | 0:a1734fe1ec4b | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
vpcola | 0:a1734fe1ec4b | 22 | * may be used to endorse or promote products derived from this software |
vpcola | 0:a1734fe1ec4b | 23 | * without specific prior written permission. |
vpcola | 0:a1734fe1ec4b | 24 | * |
vpcola | 0:a1734fe1ec4b | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
vpcola | 0:a1734fe1ec4b | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
vpcola | 0:a1734fe1ec4b | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
vpcola | 0:a1734fe1ec4b | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
vpcola | 0:a1734fe1ec4b | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
vpcola | 0:a1734fe1ec4b | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
vpcola | 0:a1734fe1ec4b | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
vpcola | 0:a1734fe1ec4b | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
vpcola | 0:a1734fe1ec4b | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
vpcola | 0:a1734fe1ec4b | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
vpcola | 0:a1734fe1ec4b | 35 | * |
vpcola | 0:a1734fe1ec4b | 36 | ****************************************************************************** |
vpcola | 0:a1734fe1ec4b | 37 | */ |
vpcola | 0:a1734fe1ec4b | 38 | |
vpcola | 0:a1734fe1ec4b | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
vpcola | 0:a1734fe1ec4b | 40 | #ifndef __SPIRIT_LINEAR_FIFO_H |
vpcola | 0:a1734fe1ec4b | 41 | #define __SPIRIT_LINEAR_FIFO_H |
vpcola | 0:a1734fe1ec4b | 42 | |
vpcola | 0:a1734fe1ec4b | 43 | |
vpcola | 0:a1734fe1ec4b | 44 | /* Includes ------------------------------------------------------------------*/ |
vpcola | 0:a1734fe1ec4b | 45 | |
vpcola | 0:a1734fe1ec4b | 46 | #include "SPIRIT_Regs.h" |
vpcola | 0:a1734fe1ec4b | 47 | #include "SPIRIT_Types.h" |
vpcola | 0:a1734fe1ec4b | 48 | |
vpcola | 0:a1734fe1ec4b | 49 | |
vpcola | 0:a1734fe1ec4b | 50 | #ifdef __cplusplus |
vpcola | 0:a1734fe1ec4b | 51 | extern "C" { |
vpcola | 0:a1734fe1ec4b | 52 | #endif |
vpcola | 0:a1734fe1ec4b | 53 | |
vpcola | 0:a1734fe1ec4b | 54 | |
vpcola | 0:a1734fe1ec4b | 55 | /** |
vpcola | 0:a1734fe1ec4b | 56 | * @addtogroup SPIRIT_Libraries |
vpcola | 0:a1734fe1ec4b | 57 | * @{ |
vpcola | 0:a1734fe1ec4b | 58 | */ |
vpcola | 0:a1734fe1ec4b | 59 | |
vpcola | 0:a1734fe1ec4b | 60 | |
vpcola | 0:a1734fe1ec4b | 61 | /** |
vpcola | 0:a1734fe1ec4b | 62 | * @defgroup SPIRIT_LinearFifo Linear FIFO |
vpcola | 0:a1734fe1ec4b | 63 | * @brief Configuration and management of SPIRIT FIFO. |
vpcola | 0:a1734fe1ec4b | 64 | * @details See the file <i>@ref SPIRIT_LinearFifo.h</i> for more details. |
vpcola | 0:a1734fe1ec4b | 65 | * @{ |
vpcola | 0:a1734fe1ec4b | 66 | */ |
vpcola | 0:a1734fe1ec4b | 67 | |
vpcola | 0:a1734fe1ec4b | 68 | /** |
vpcola | 0:a1734fe1ec4b | 69 | * @defgroup LinearFifo_Exported_Types Linear FIFO Exported Types |
vpcola | 0:a1734fe1ec4b | 70 | * @{ |
vpcola | 0:a1734fe1ec4b | 71 | */ |
vpcola | 0:a1734fe1ec4b | 72 | |
vpcola | 0:a1734fe1ec4b | 73 | |
vpcola | 0:a1734fe1ec4b | 74 | /** |
vpcola | 0:a1734fe1ec4b | 75 | * @} |
vpcola | 0:a1734fe1ec4b | 76 | */ |
vpcola | 0:a1734fe1ec4b | 77 | |
vpcola | 0:a1734fe1ec4b | 78 | |
vpcola | 0:a1734fe1ec4b | 79 | /** |
vpcola | 0:a1734fe1ec4b | 80 | * @defgroup LinearFifo_Exported_Constants Linear FIFO Exported Constants |
vpcola | 0:a1734fe1ec4b | 81 | * @{ |
vpcola | 0:a1734fe1ec4b | 82 | */ |
vpcola | 0:a1734fe1ec4b | 83 | #define IS_FIFO_THR(VAL) (VAL<=96) |
vpcola | 0:a1734fe1ec4b | 84 | |
vpcola | 0:a1734fe1ec4b | 85 | /** |
vpcola | 0:a1734fe1ec4b | 86 | * @} |
vpcola | 0:a1734fe1ec4b | 87 | */ |
vpcola | 0:a1734fe1ec4b | 88 | |
vpcola | 0:a1734fe1ec4b | 89 | |
vpcola | 0:a1734fe1ec4b | 90 | /** |
vpcola | 0:a1734fe1ec4b | 91 | * @defgroup LinearFifo_Exported_Macros Linear FIFO Exported Macros |
vpcola | 0:a1734fe1ec4b | 92 | * @{ |
vpcola | 0:a1734fe1ec4b | 93 | */ |
vpcola | 0:a1734fe1ec4b | 94 | |
vpcola | 0:a1734fe1ec4b | 95 | |
vpcola | 0:a1734fe1ec4b | 96 | /** |
vpcola | 0:a1734fe1ec4b | 97 | * @} |
vpcola | 0:a1734fe1ec4b | 98 | */ |
vpcola | 0:a1734fe1ec4b | 99 | |
vpcola | 0:a1734fe1ec4b | 100 | |
vpcola | 0:a1734fe1ec4b | 101 | /** |
vpcola | 0:a1734fe1ec4b | 102 | * @defgroup LinearFifo_Exported_Functions Linear FIFO Exported Functions |
vpcola | 0:a1734fe1ec4b | 103 | * @{ |
vpcola | 0:a1734fe1ec4b | 104 | */ |
vpcola | 0:a1734fe1ec4b | 105 | |
vpcola | 0:a1734fe1ec4b | 106 | uint8_t SpiritLinearFifoReadNumElementsRxFifo(void); |
vpcola | 0:a1734fe1ec4b | 107 | uint8_t SpiritLinearFifoReadNumElementsTxFifo(void); |
vpcola | 0:a1734fe1ec4b | 108 | void SpiritLinearFifoSetAlmostFullThresholdRx(uint8_t cThrRxFifo); |
vpcola | 0:a1734fe1ec4b | 109 | uint8_t SpiritLinearFifoGetAlmostFullThresholdRx(void); |
vpcola | 0:a1734fe1ec4b | 110 | void SpiritLinearFifoSetAlmostEmptyThresholdRx(uint8_t cThrRxFifo); |
vpcola | 0:a1734fe1ec4b | 111 | uint8_t SpiritLinearFifoGetAlmostEmptyThresholdRx(void); |
vpcola | 0:a1734fe1ec4b | 112 | void SpiritLinearFifoSetAlmostFullThresholdTx(uint8_t cThrTxFifo); |
vpcola | 0:a1734fe1ec4b | 113 | uint8_t SpiritLinearFifoGetAlmostFullThresholdTx(void); |
vpcola | 0:a1734fe1ec4b | 114 | void SpiritLinearFifoSetAlmostEmptyThresholdTx(uint8_t cThrTxFifo); |
vpcola | 0:a1734fe1ec4b | 115 | uint8_t SpiritLinearFifoGetAlmostEmptyThresholdTx(void); |
vpcola | 0:a1734fe1ec4b | 116 | |
vpcola | 0:a1734fe1ec4b | 117 | /** |
vpcola | 0:a1734fe1ec4b | 118 | * @} |
vpcola | 0:a1734fe1ec4b | 119 | */ |
vpcola | 0:a1734fe1ec4b | 120 | |
vpcola | 0:a1734fe1ec4b | 121 | /** |
vpcola | 0:a1734fe1ec4b | 122 | * @} |
vpcola | 0:a1734fe1ec4b | 123 | */ |
vpcola | 0:a1734fe1ec4b | 124 | |
vpcola | 0:a1734fe1ec4b | 125 | |
vpcola | 0:a1734fe1ec4b | 126 | /** |
vpcola | 0:a1734fe1ec4b | 127 | * @} |
vpcola | 0:a1734fe1ec4b | 128 | */ |
vpcola | 0:a1734fe1ec4b | 129 | |
vpcola | 0:a1734fe1ec4b | 130 | #ifdef __cplusplus |
vpcola | 0:a1734fe1ec4b | 131 | } |
vpcola | 0:a1734fe1ec4b | 132 | #endif |
vpcola | 0:a1734fe1ec4b | 133 | |
vpcola | 0:a1734fe1ec4b | 134 | #endif |
vpcola | 0:a1734fe1ec4b | 135 | |
vpcola | 0:a1734fe1ec4b | 136 | /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/ |