|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Radio control spektrum interface. More...
Include dependency graph for spektrum.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | spektrum_sat_t |
| struct | spektrum_t |
Macros | |
| #define | SPEKTRUM_SATELLITES_NB 2 |
| #define | SPEKTRUM_FRAME_LEN 16 |
| 16 bytes in a standard frame | |
| #define | SPEKTRUM_CHANNELS_PER_FRAME 7 |
| Maximum amount of RC channels per frame. | |
| #define | SPEKTRUM_MAX_FRAMES 2 |
| Maximum amount of RC frames containing different channels. | |
| #define | SPEKTRUM_MAX_CHANNELS (SPEKTRUM_CHANNELS_PER_FRAME * SPEKTRUM_MAX_FRAMES) |
| #define | SPEKTRUM_MIN_FRAME_SPACE 7 |
| Minum amount of time between frames (7ms), in fact either 11 or 22 ms. | |
Functions | |
| void | spektrum_init (void) |
| Main Radio initialization. | |
| void | spektrum_event (void) |
| Checks if there is one valid satellite and sets the radio_control structure. | |
| void | spektrum_try_bind (void) |
Radio control spektrum interface.
Definition in file spektrum.h.
| struct spektrum_sat_t |
Definition at line 48 of file spektrum.h.
| Data Fields | ||
|---|---|---|
| uint8_t | buf[SPEKTRUM_FRAME_LEN] | input buffer |
| uint8_t | idx | input buffer index |
| uint8_t | lost_frame_cnt | Amount of RC frames lost. |
| uint32_t | timer | Timer to keep track of the UART synchronisation. |
| bool | valid | True when we received a packet else false. |
| int16_t | values[SPEKTRUM_MAX_CHANNELS] | RC channel values. |
| struct spektrum_t |
Definition at line 58 of file spektrum.h.
Collaboration diagram for spektrum_t:| Data Fields | ||
|---|---|---|
| struct spektrum_sat_t | satellites[SPEKTRUM_SATELLITES_NB] | All the satellites connected. |
| int8_t | signs[SPEKTRUM_NB_CHANNEL] | Signs for the RC channels. |
| uint8_t | tx_type | Transmitter type encoded (see wiki) |
| bool | valid | True when we received a packet else false. |
| #define SPEKTRUM_CHANNELS_PER_FRAME 7 |
Maximum amount of RC channels per frame.
Definition at line 42 of file spektrum.h.
| #define SPEKTRUM_FRAME_LEN 16 |
16 bytes in a standard frame
Definition at line 41 of file spektrum.h.
| #define SPEKTRUM_MAX_CHANNELS (SPEKTRUM_CHANNELS_PER_FRAME * SPEKTRUM_MAX_FRAMES) |
Definition at line 44 of file spektrum.h.
| #define SPEKTRUM_MAX_FRAMES 2 |
Maximum amount of RC frames containing different channels.
Definition at line 43 of file spektrum.h.
| #define SPEKTRUM_MIN_FRAME_SPACE 7 |
Minum amount of time between frames (7ms), in fact either 11 or 22 ms.
Definition at line 45 of file spektrum.h.
| #define SPEKTRUM_SATELLITES_NB 2 |
Definition at line 38 of file spektrum.h.
Checks if there is one valid satellite and sets the radio_control structure.
Definition at line 44 of file spektrum_arch.c.
References foo, RadioControl::frame_cpt, MAX_PPRZ, RadioControl::nb_channel, radio_control, RADIO_CONTROL_SPEKTRUM_ID, RC_OK, spektrum_t::satellites, spektrum_t::signs, spektrum, spektrum_available, SPEKTRUM_SATELLITES_NB, spektrum_uart_check(), RadioControl::status, RadioControl::time_since_last_frame, spektrum_sat_t::valid, spektrum_t::valid, RadioControl::values, and spektrum_sat_t::values.
Here is the call graph for this function:Main Radio initialization.
Definition at line 39 of file spektrum_arch.c.
References gpio_setup_output(), RadioControl::nb_channel, radio_control, RC_POLARITY_GPIO_PIN, RC_POLARITY_GPIO_PORT, RC_SET_POLARITY, spektrum_t::satellites, spektrum_t::signs, spektrum, spektrum_available, spektrum_init_sat(), SPEKTRUM_NB_CHANNEL, and spektrum_signs.
Here is the call graph for this function:Definition at line 55 of file spektrum_arch.c.
References gpio_get(), gpio_setup_input_pulldown(), gpio_setup_input_pullup(), spektrum_bind(), SPEKTRUM_BIND_PIN, SPEKTRUM_BIND_PIN_PORT, and sys_time_usleep().
Here is the call graph for this function: