Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
spektrum_soft_bind_fbw.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) Kevin van Hecke
3
*
4
* This file is part of paparazzi
5
*
6
* paparazzi is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2, or (at your option)
9
* any later version.
10
*
11
* paparazzi is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with paparazzi; see the file COPYING. If not, see
18
* <http://www.gnu.org/licenses/>.
19
*/
26
#include "
modules/spektrum_soft_bind/spektrum_soft_bind_fbw.h
"
27
#include "
subsystems/intermcu/intermcu_fbw.h
"
28
#include "
mcu.h
"
29
#include "
subsystems/radio_control.h
"
30
#include "mcu_periph/sys_time_arch.h"
31
32
#include "
mcu_periph/gpio.h
"
33
34
void
spektrum_soft_bind_init
(
void
)
35
{
36
37
}
38
39
void
received_spektrum_soft_bind
(
void
)
40
{
41
42
//power cycle the spektrum
43
RADIO_CONTROL_POWER_OFF
(
RADIO_CONTROL_POWER_PORT
,
RADIO_CONTROL_POWER_PIN
);
44
sys_time_usleep
(100000);
45
RADIO_CONTROL_POWER_ON
(
RADIO_CONTROL_POWER_PORT
,
RADIO_CONTROL_POWER_PIN
);
46
47
//put to bind mode
48
RADIO_CONTROL_BIND_IMPL_FUNC();
//basically = radio_control_spektrum_try_bind()
49
50
SpektrumUartInit();
51
52
}
radio_control.h
sys_time_usleep
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
Definition:
sys_time_arch.c:95
intermcu_fbw.h
Rotorcraft Inter-MCU on FlyByWire.
RADIO_CONTROL_POWER_OFF
#define RADIO_CONTROL_POWER_OFF
Definition:
opa_ftd_1.0.h:152
spektrum_soft_bind_init
void spektrum_soft_bind_init(void)
Definition:
spektrum_soft_bind_fbw.c:34
RADIO_CONTROL_POWER_ON
#define RADIO_CONTROL_POWER_ON
Definition:
opa_ftd_1.0.h:151
mcu.h
Arch independent mcu ( Micro Controller Unit ) utilities.
received_spektrum_soft_bind
void received_spektrum_soft_bind(void)
Definition:
spektrum_soft_bind_fbw.c:39
RADIO_CONTROL_POWER_PIN
#define RADIO_CONTROL_POWER_PIN
Definition:
opa_ftd_1.0.h:150
gpio.h
RADIO_CONTROL_POWER_PORT
#define RADIO_CONTROL_POWER_PORT
Definition:
opa_ftd_1.0.h:149
spektrum_soft_bind_fbw.h
sw
airborne
modules
spektrum_soft_bind
spektrum_soft_bind_fbw.c
Generated on Tue Feb 1 2022 13:51:16 for Paparazzi UAS by
1.8.17