Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
spektrum_soft_bind_ap.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  */
28 #include "led.h"
29 
30 #include "mcu.h"
32 #include "mcu_periph/sys_time_arch.h"
33 
34 #include "mcu_periph/gpio.h"
35 
37 
38 }
39 
42 #ifndef INTER_MCU_AP
44 #else
46 #endif
47 
49 }
50 
51 #ifndef INTER_MCU_AP
52 void send_spektrum_bind(void) {
53  //power cycle the spektrum
54 #if defined(RADIO_CONTROL_LED)
55  LED_OFF(RADIO_CONTROL_LED);
56 #endif
57 
59  sys_time_usleep(100000);
61 #if defined(RADIO_CONTROL_LED)
62  LED_ON(RADIO_CONTROL_LED);
63 #endif
64 
65  //put to bind mode
66  RADIO_CONTROL_BIND_IMPL_FUNC(); //basically = radio_control_spektrum_try_bind()
67 
69 
70 }
71 #endif
#define RADIO_CONTROL_POWER_OFF
Definition: opa_ftd_1.0.h:152
#define LED_OFF(i)
Definition: led_hw.h:51
Some architecture independent helper functions for GPIOs.
#define RADIO_CONTROL_POWER_PORT
Definition: opa_ftd_1.0.h:149
bool bind_soft_value
#define RADIO_CONTROL_POWER_PIN
Definition: opa_ftd_1.0.h:150
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
Definition: sys_time_arch.c:95
uint16_t val[TCOUPLE_NB]
void intermcu_send_spektrum_bind(void)
Definition: intermcu_ap.c:129
#define RADIO_CONTROL_POWER_ON
Definition: opa_ftd_1.0.h:151
Rotorcraft Inter-MCU on the autopilot.
void spektrum_soft_bind_click(bool val)
void send_spektrum_bind(void)
Arch independent mcu ( Micro Controller Unit ) utilities.
void spektrum_soft_bind_init(void)
void SpektrumUartInit(void)
arch independent LED (Light Emitting Diodes) API
#define LED_ON(i)
Definition: led_hw.h:50