2 * This file is part of INAV
4 * INAV free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * INAV is distributed in the hope that it
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
26 #include <common/time.h>
28 #include "config/parameter_group.h"
30 #include <telemetry/smartport.h>
32 #if defined(USE_SMARTPORT_MASTER)
37 } smartportMasterConfig_t
;
39 PG_DECLARE(smartportMasterConfig_t
, smartportMasterConfig
);
69 bool smartportMasterInit(void);
70 void smartportMasterHandle(timeUs_t currentTimeUs
);
72 bool smartportMasterPhyIDIsActive(uint8_t phyID
);
73 int8_t smartportMasterStripPhyIDCheckBits(uint8_t phyID
);
75 // Returns latest received SmartPort payload for phyID
76 bool smartportMasterGetSensorPayload(uint8_t phyID
, smartPortPayload_t
*payload
);
79 bool smartportMasterForward(uint8_t phyID
, smartPortPayload_t
*payload
);
80 bool smartportMasterHasForwardResponse(uint8_t phyID
);
81 bool smartportMasterNextForwardResponse(uint8_t phyID
, smartPortPayload_t
*payload
);
83 // Returns latest Cells data or NULL if the data is too old
84 cellsData_t
*smartportMasterGetCellsData(void);
85 vs600Data_t
*smartportMasterGetVS600Data(void);
87 #endif /* USE_SMARTPORT_MASTER */