#include <AP_Radio_cypress.h>
|
enum | {
STATE_RECV,
STATE_BIND,
STATE_AUTOBIND,
STATE_SEND_TELEM,
STATE_SEND_TELEM_WAIT,
STATE_SEND_FCC
} |
|
enum | dsm_protocol {
DSM_NONE = 0,
DSM_DSM2_1 = 0x01,
DSM_DSM2_2 = 0x02,
DSM_DSMX_1 = 0xA2,
DSM_DSMX_2 = 0xB2
} |
|
enum | dsm2_sync { DSM2_SYNC_A,
DSM2_SYNC_B,
DSM2_OK
} |
|
|
void | radio_init (void) |
|
void | dump_registers (uint8_t n) |
|
void | force_initial_state (void) |
|
void | set_channel (uint8_t channel) |
|
uint8_t | read_status_debounced (uint8_t adr) |
|
uint8_t | read_register (uint8_t reg) |
|
void | write_register (uint8_t reg, uint8_t value) |
|
void | write_multiple (uint8_t reg, uint8_t n, const uint8_t *data) |
|
void | radio_set_config (const struct config *config, uint8_t size) |
|
void | start_receive (void) |
|
void | irq_handler (void) |
|
void | irq_handler_recv (uint8_t rx_status) |
|
void | irq_timeout (void) |
|
void | print_debug_info (void) |
|
void | dsm_set_channel (uint8_t channel, bool is_dsm2, uint8_t sop_col, uint8_t data_col, uint16_t crc_seed) |
|
void | dsm_generate_channels_dsmx (uint8_t mfg_id[4], uint8_t channels[23]) |
|
void | dsm_setup_transfer_dsmx (void) |
|
void | dsm_choose_channel (void) |
|
void | map_stick_mode (uint16_t *channels) |
|
bool | parse_dsm_channels (const uint8_t *data) |
|
void | process_packet (const uint8_t *pkt, uint8_t len) |
|
void | process_bind (const uint8_t *pkt, uint8_t len) |
|
void | load_bind_info (void) |
|
void | save_bind_info (void) |
|
bool | is_DSM2 (void) |
|
void | transmit16 (const uint8_t data[16]) |
|
void | send_telem_packet (void) |
|
void | irq_handler_send (uint8_t tx_status) |
|
void | send_FCC_test_packet (void) |
|
void | check_fw_ack (void) |
|
void | dsm2_start_sync (void) |
|
void | check_double_bind (void) |
|
void | setup_timeout (uint32_t timeout_ms) |
|
Definition at line 36 of file AP_Radio_cypress.h.
◆ anonymous enum
Enumerator |
---|
STATE_RECV | |
STATE_BIND | |
STATE_AUTOBIND | |
STATE_SEND_TELEM | |
STATE_SEND_TELEM_WAIT | |
STATE_SEND_FCC | |
Definition at line 98 of file AP_Radio_cypress.h.
◆ dsm2_sync
◆ dsm_protocol
Enumerator |
---|
DSM_NONE | |
DSM_DSM2_1 | |
DSM_DSM2_2 | |
DSM_DSMX_1 | |
DSM_DSMX_2 | |
Definition at line 157 of file AP_Radio_cypress.h.
◆ AP_Radio_cypress()
AP_Radio_cypress::AP_Radio_cypress |
( |
AP_Radio & |
radio | ) |
|
◆ check_double_bind()
void AP_Radio_cypress::check_double_bind |
( |
void |
| ) |
|
|
private |
◆ check_fw_ack()
void AP_Radio_cypress::check_fw_ack |
( |
void |
| ) |
|
|
private |
◆ dsm2_start_sync()
void AP_Radio_cypress::dsm2_start_sync |
( |
void |
| ) |
|
|
private |
◆ dsm_choose_channel()
void AP_Radio_cypress::dsm_choose_channel |
( |
void |
| ) |
|
|
private |
◆ dsm_generate_channels_dsmx()
void AP_Radio_cypress::dsm_generate_channels_dsmx |
( |
uint8_t |
mfg_id[4], |
|
|
uint8_t |
channels[23] |
|
) |
| |
|
private |
◆ dsm_set_channel()
void AP_Radio_cypress::dsm_set_channel |
( |
uint8_t |
channel, |
|
|
bool |
is_dsm2, |
|
|
uint8_t |
sop_col, |
|
|
uint8_t |
data_col, |
|
|
uint16_t |
crc_seed |
|
) |
| |
|
private |
◆ dsm_setup_transfer_dsmx()
void AP_Radio_cypress::dsm_setup_transfer_dsmx |
( |
void |
| ) |
|
|
private |
◆ dump_registers()
void AP_Radio_cypress::dump_registers |
( |
uint8_t |
n | ) |
|
|
private |
◆ force_initial_state()
void AP_Radio_cypress::force_initial_state |
( |
void |
| ) |
|
|
private |
◆ get_stats()
◆ get_tx_version()
uint32_t AP_Radio_cypress::get_tx_version |
( |
void |
| ) |
|
|
inlineoverridevirtual |
◆ handle_data_packet()
void AP_Radio_cypress::handle_data_packet |
( |
mavlink_channel_t |
chan, |
|
|
const mavlink_data96_t & |
m |
|
) |
| |
|
overridevirtual |
◆ init()
bool AP_Radio_cypress::init |
( |
void |
| ) |
|
|
overridevirtual |
◆ irq_handler()
void AP_Radio_cypress::irq_handler |
( |
void |
| ) |
|
|
private |
◆ irq_handler_recv()
void AP_Radio_cypress::irq_handler_recv |
( |
uint8_t |
rx_status | ) |
|
|
private |
◆ irq_handler_send()
void AP_Radio_cypress::irq_handler_send |
( |
uint8_t |
tx_status | ) |
|
|
private |
◆ irq_radio_trampoline()
static int AP_Radio_cypress::irq_radio_trampoline |
( |
int |
irq, |
|
|
void * |
context |
|
) |
| |
|
staticprivate |
◆ irq_timeout()
void AP_Radio_cypress::irq_timeout |
( |
void |
| ) |
|
|
private |
◆ irq_timeout_trampoline()
static int AP_Radio_cypress::irq_timeout_trampoline |
( |
int |
irq, |
|
|
void * |
context |
|
) |
| |
|
staticprivate |
◆ is_DSM2()
bool AP_Radio_cypress::is_DSM2 |
( |
void |
| ) |
|
|
private |
◆ last_recv_us()
uint32_t AP_Radio_cypress::last_recv_us |
( |
void |
| ) |
|
|
overridevirtual |
◆ load_bind_info()
void AP_Radio_cypress::load_bind_info |
( |
void |
| ) |
|
|
private |
◆ map_stick_mode()
void AP_Radio_cypress::map_stick_mode |
( |
uint16_t * |
channels | ) |
|
|
private |
◆ num_channels()
uint8_t AP_Radio_cypress::num_channels |
( |
void |
| ) |
|
|
overridevirtual |
◆ parse_dsm_channels()
bool AP_Radio_cypress::parse_dsm_channels |
( |
const uint8_t * |
data | ) |
|
|
private |
◆ print_debug_info()
void AP_Radio_cypress::print_debug_info |
( |
void |
| ) |
|
|
private |
◆ process_bind()
void AP_Radio_cypress::process_bind |
( |
const uint8_t * |
pkt, |
|
|
uint8_t |
len |
|
) |
| |
|
private |
◆ process_packet()
void AP_Radio_cypress::process_packet |
( |
const uint8_t * |
pkt, |
|
|
uint8_t |
len |
|
) |
| |
|
private |
◆ radio_init()
void AP_Radio_cypress::radio_init |
( |
void |
| ) |
|
|
private |
◆ radio_set_config()
void AP_Radio_cypress::radio_set_config |
( |
const struct config * |
config, |
|
|
uint8_t |
size |
|
) |
| |
|
private |
◆ read()
uint16_t AP_Radio_cypress::read |
( |
uint8_t |
chan | ) |
|
|
overridevirtual |
◆ read_register()
uint8_t AP_Radio_cypress::read_register |
( |
uint8_t |
reg | ) |
|
|
private |
◆ read_status_debounced()
uint8_t AP_Radio_cypress::read_status_debounced |
( |
uint8_t |
adr | ) |
|
|
private |
◆ reset()
bool AP_Radio_cypress::reset |
( |
void |
| ) |
|
|
overridevirtual |
◆ save_bind_info()
void AP_Radio_cypress::save_bind_info |
( |
void |
| ) |
|
|
private |
◆ send()
bool AP_Radio_cypress::send |
( |
const uint8_t * |
pkt, |
|
|
uint16_t |
len |
|
) |
| |
|
overridevirtual |
◆ send_FCC_test_packet()
void AP_Radio_cypress::send_FCC_test_packet |
( |
void |
| ) |
|
|
private |
◆ send_telem_packet()
void AP_Radio_cypress::send_telem_packet |
( |
void |
| ) |
|
|
private |
◆ set_channel()
void AP_Radio_cypress::set_channel |
( |
uint8_t |
channel | ) |
|
|
private |
◆ set_wifi_channel()
void AP_Radio_cypress::set_wifi_channel |
( |
uint8_t |
channel | ) |
|
|
inlinevirtual |
◆ setup_timeout()
void AP_Radio_cypress::setup_timeout |
( |
uint32_t |
timeout_ms | ) |
|
|
private |
◆ start_receive()
void AP_Radio_cypress::start_receive |
( |
void |
| ) |
|
|
private |
◆ start_recv_bind()
void AP_Radio_cypress::start_recv_bind |
( |
void |
| ) |
|
|
overridevirtual |
◆ transmit16()
void AP_Radio_cypress::transmit16 |
( |
const uint8_t |
data[16] | ) |
|
|
private |
◆ update()
void AP_Radio_cypress::update |
( |
void |
| ) |
|
|
overridevirtual |
◆ write_multiple()
void AP_Radio_cypress::write_multiple |
( |
uint8_t |
reg, |
|
|
uint8_t |
n, |
|
|
const uint8_t * |
data |
|
) |
| |
|
private |
◆ write_register()
void AP_Radio_cypress::write_register |
( |
uint8_t |
reg, |
|
|
uint8_t |
value |
|
) |
| |
|
private |
◆ acked
uint32_t AP_Radio_cypress::acked |
◆ bind_magic
const uint16_t AP_Radio_cypress::bind_magic = 0x43F6 |
|
staticprivate |
◆ chan
mavlink_channel_t AP_Radio_cypress::chan |
◆ channels
uint8_t AP_Radio_cypress::channels[23] |
◆ counter
uint8_t AP_Radio_cypress::counter |
◆ crc_errors
uint32_t AP_Radio_cypress::crc_errors |
◆ crc_seed
uint16_t AP_Radio_cypress::crc_seed |
◆ current_channel
uint8_t AP_Radio_cypress::current_channel |
◆ current_rf_channel
uint8_t AP_Radio_cypress::current_rf_channel |
◆ cyrf_bind_config
const config AP_Radio_cypress::cyrf_bind_config[] |
|
staticprivate |
◆ cyrf_config
const config AP_Radio_cypress::cyrf_config[] |
|
staticprivate |
◆ cyrf_transfer_config
const config AP_Radio_cypress::cyrf_transfer_config[] |
|
staticprivate |
◆ data_col
uint8_t AP_Radio_cypress::data_col |
◆ dev
◆ dsm
struct { ... } AP_Radio_cypress::dsm |
◆ forced_channel
int8_t AP_Radio_cypress::forced_channel = -1 |
◆ fw_type
◆ fwupload
struct { ... } AP_Radio_cypress::fwupload |
◆ have_tx_pps
bool AP_Radio_cypress::have_tx_pps |
◆ irq_sem
sem_t AP_Radio_cypress::irq_sem |
|
private |
◆ last_autobind_send
uint32_t AP_Radio_cypress::last_autobind_send |
◆ last_chan_change_us
uint32_t AP_Radio_cypress::last_chan_change_us |
◆ last_data_code
uint8_t AP_Radio_cypress::last_data_code[16] |
◆ last_debug_print_ms
uint32_t AP_Radio_cypress::last_debug_print_ms |
|
private |
◆ last_discrc
bool AP_Radio_cypress::last_discrc |
◆ last_parse_us
uint32_t AP_Radio_cypress::last_parse_us |
◆ last_recv_chan
uint32_t AP_Radio_cypress::last_recv_chan |
◆ last_recv_us
uint32_t AP_Radio_cypress::last_recv_us |
◆ last_sop_code
uint8_t AP_Radio_cypress::last_sop_code[8] |
◆ last_stats
◆ last_transmit_power
uint8_t AP_Radio_cypress::last_transmit_power |
◆ len
uint8_t AP_Radio_cypress::len |
◆ length
uint32_t AP_Radio_cypress::length |
◆ max_channels
const uint8_t AP_Radio_cypress::max_channels = 16 |
|
staticprivate |
◆ mfg_id
uint8_t AP_Radio_cypress::mfg_id[4] |
◆ need_ack
bool AP_Radio_cypress::need_ack |
◆ need_bind_save
bool AP_Radio_cypress::need_bind_save |
◆ num_channels
uint16_t AP_Radio_cypress::num_channels |
◆ offset
uint32_t AP_Radio_cypress::offset |
◆ pending_data
uint8_t AP_Radio_cypress::pending_data[92] |
◆ pkt_time1
uint16_t AP_Radio_cypress::pkt_time1 = 3000 |
◆ pkt_time2
uint16_t AP_Radio_cypress::pkt_time2 = 7000 |
◆ pn_bind
const uint8_t AP_Radio_cypress::pn_bind[] |
|
staticprivate |
◆ pn_codes
const uint8_t AP_Radio_cypress::pn_codes[5][9][8] |
|
staticprivate |
◆ protocol
◆ pwm_channels
◆ radio_instance
◆ receive_start_us
uint32_t AP_Radio_cypress::receive_start_us |
◆ receive_timeout_msec
uint32_t AP_Radio_cypress::receive_timeout_msec |
◆ rssi
float AP_Radio_cypress::rssi |
◆ sem
◆ send_count
uint32_t AP_Radio_cypress::send_count |
◆ send_irq_count
uint32_t AP_Radio_cypress::send_irq_count |
◆ sequence
uint8_t AP_Radio_cypress::sequence |
◆ sop_col
uint8_t AP_Radio_cypress::sop_col |
◆ state
enum { ... } AP_Radio_cypress::state |
◆ stats
◆ sync
◆ t_status
◆ telem_send_count
uint32_t AP_Radio_cypress::telem_send_count |
◆ tx_bl_version
uint8_t AP_Radio_cypress::tx_bl_version |
◆ tx_firmware_day
uint8_t AP_Radio_cypress::tx_firmware_day |
◆ tx_firmware_month
uint8_t AP_Radio_cypress::tx_firmware_month |
◆ tx_firmware_year
uint8_t AP_Radio_cypress::tx_firmware_year |
◆ tx_pps
uint8_t AP_Radio_cypress::tx_pps |
◆ tx_rssi
uint8_t AP_Radio_cypress::tx_rssi |
◆ wait_call
struct hrt_call AP_Radio_cypress::wait_call |
|
private |
The documentation for this class was generated from the following file: