Mistake on this page?
Report an issue in GitHub or email us
pal_radio.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Radio interface file.
6  *
7  * Copyright (c) 2018-2019 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 
25 #ifndef PAL_RADIO_H
26 #define PAL_RADIO_H
27 
28 #include "pal_types.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /*! \addtogroup PAL_RADIO
35  * \{ */
36 
37 /**************************************************************************************************
38  Function Declarations
39 **************************************************************************************************/
40 
41 /*************************************************************************************************/
42 /*!
43  * \brief Initialize RF path compensation.
44  */
45 /*************************************************************************************************/
46 void PalRadioInitPathComp(void);
47 
48 /*************************************************************************************************/
49 /*!
50  * \brief Get the actual Tx power at the antenna (expressed in 1dBm units).
51  *
52  * \param txPwr Tx power provided by the host (expressed in 1dBm units).
53  * \param compFlag Flag to apply Tx path compensation or not.
54  *
55  * \return Actual Tx power at the antenna (expressed in 1dBm units).
56  *
57  * Tx path compensation is only used for extended ADV header.
58  * Compensation is not considered when filling in HCI events.
59  */
60 /*************************************************************************************************/
61 int8_t PalRadioGetActualTxPower(int8_t txPwr, bool_t compFlag);
62 
63 /*************************************************************************************************/
64 /*!
65  * \brief Request an increase in power.
66  *
67  * \param reqPwr Requested Power.
68  * \param delta Delta
69  *
70  * \return TxPower to be set
71  *
72  * If increasing power: the controller will increase one step if possible.
73  * If decreasing power: the controller will only decrease to the ceiling step.
74  */
75 /*************************************************************************************************/
76 int8_t PalRadioIncreasePower(int8_t reqPwr, int8_t delta);
77 
78 /*************************************************************************************************/
79 /*!
80  * \brief Get the next acceptable power reduction step.
81  *
82  * \param txPwr Tx Power(expressed in 1dBm units).
83  *
84  * \return Lowest acceptable power reduction size.
85  *
86  */
87 /*************************************************************************************************/
88 int8_t PalRadioGetAcceptablePowerReduction(int8_t txPwr);
89 
90 /*************************************************************************************************/
91 /*!
92  * \brief Set RF path compensation.
93  *
94  * \param txPathComp RF transmit path compensation value (expressed in 0.1dBm units).
95  * \param rxPathComp RF receive path compensation value (expressed in 0.1dBm units).
96  *
97  * \return TRUE if successful, FALSE otherwise.
98  */
99 /*************************************************************************************************/
100 bool_t PalRadioWriteRfPathComp(int16_t txPathComp, int16_t rxPathComp);
101 
102 /*************************************************************************************************/
103 /*!
104  * \brief Get supported transmit power.
105  *
106  * \param pMinTxPwr Return buffer for minimum transmit power (expressed in 1dBm units).
107  * \param pMaxTxPwr Return buffer for maximum transmit power (expressed in 1dBm units).
108  */
109 /*************************************************************************************************/
110 void PalRadioGetSupTxPower(int8_t *pMinTxPwr, int8_t *pMaxTxPwr);
111 
112 /*************************************************************************************************/
113 /*!
114  * \brief Read RF path compensation.
115  *
116  * \param pTxPathComp Return buffer for RF transmit path compensation value (expressed in 0.1dBm units).
117  * \param pRxPathComp Return buffer for RF receive path compensation value (expressed in 0.1dBm units).
118  */
119 /*************************************************************************************************/
120 void PalRadioReadRfPathComp(int16_t *pTxPathComp, int16_t *pRxPathComp);
121 
122 /*************************************************************************************************/
123 /*!
124  * \brief Get receive RF path compensation.
125  *
126  * \return Transmit RF path compensation (in 1-dBm units).
127  */
128 /*************************************************************************************************/
129 int8_t PalRadioGetRxRfPathComp(void);
130 
131 /*! \} */ /* PAL_RADIO */
132 
133 #ifdef __cplusplus
134 };
135 #endif
136 
137 #endif /* PAL_RADIO_H */
int8_t PalRadioGetActualTxPower(int8_t txPwr, uint8_t compFlag)
Get the actual Tx power at the antenna (expressed in 1dBm units).
int8_t PalRadioGetRxRfPathComp(void)
Get receive RF path compensation.
void PalRadioGetSupTxPower(int8_t *pMinTxPwr, int8_t *pMaxTxPwr)
Get supported transmit power.
void PalRadioInitPathComp(void)
Initialize RF path compensation.
int8_t PalRadioGetAcceptablePowerReduction(int8_t txPwr)
Get the next acceptable power reduction step.
int8_t PalRadioIncreasePower(int8_t reqPwr, int8_t delta)
Request an increase in power.
void PalRadioReadRfPathComp(int16_t *pTxPathComp, int16_t *pRxPathComp)
Read RF path compensation.
Platform-independent data types.
uint8_t PalRadioWriteRfPathComp(int16_t txPathComp, int16_t rxPathComp)
Set RF path compensation.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.