27 #ifndef DATALINK_SUPERBITRF_H
28 #define DATALINK_SUPERBITRF_H
37 #define SUPERBITRF_BIND_RECV_TIME 10000
38 #define SUPERBITRF_SYNC_RECV_TIME 7000
39 #define SUPERBITRF_RECV_TIME 20000
40 #define SUPERBITRF_RECV_SHORT_TIME 6000
41 #define SUPERBITRF_DATARECV_TIME 10000
42 #define SUPERBITRF_DATARECVB_TIME 6000
70 #define IS_DSM2(x) (x == DSM_DSM2P || x == DSM_DSM2_1 || x == DSM_DSM2_2)
71 #define IS_DSMX(x) (!IS_DSM2(x))
73 #define SUPERBITRF_TX_BUFFER_SIZE 128
128 #define SuperbitRFCheckAndParse() { }
Driver for the cyrf6936 2.4GHz radio chip.
#define SUPERBITRF_TX_BUFFER_SIZE
Our own DSM2 Paparazzi protocol.
bool_t packet_loss
When we have packet loss last packet.
struct pprz_transport rx_transport
The receive transport.
bool_t rc_frame_available
When a RC frame is available.
uint32_t timing2
Time between second last receive in microseconds.
uint32_t timing1
Time between last receive in microseconds.
uint32_t irq_count
How many interrupts are made.
uint32_t timer
The timer in microseconds.
uint32_t tx_packet_count
How many packets are send(also the invalid)
uint8_t sop_col
The sop code column number calculated with the bind MFG id.
uint8_t tx_extract_idx
The transmit buffer extract index.
Some architecture independent helper functions for GPIOs.
uint32_t transfer_timeouts
The amount of timeouts during transfer.
uint8_t data_col
The data code column number calculated with the bind MFG id.
Handling of messages coming from ground and other A/Cs.
The original DSM2 protocol with 1 packet of data.
Building and parsing Paparazzi frames.
uint16_t crc_seed
The CRC seed that is calculated with the bind MFG id.
The chip is in transfer mode.
uint8_t tx_insert_idx
The transmit buffer insert index.
The chip is in binding mode.
The original DSMX protocol with 1 packet of data.
void superbitrf_init(void)
Initialize the superbitrf.
void superbitrf_set_mfg_id(uint32_t id)
The chip is initializing binding mode.
bool_t timer_overflow
When the timer overflows.
enum dsm_protocol protocol
The protocol the transmitter uses.
uint8_t channel_idx
The current channel index.
struct Cyrf6936 cyrf6936
The cyrf chip used.
uint32_t rx_packet_count
How many packets are received(also the invalid)
uint8_t packet_loss_bit
The packet loss indicating bit.
The chip is in synchronizing mode for channel B.
The chip is initializing transfer mode.
void superbitrf_event(void)
The superbitrf on event call.
int16_t rc_values[14]
The rc values from the packet.
void superbitrf_set_protocol(uint8_t protocol)
struct link_device device
Generic device interface.
enum dsm_resolution resolution
The resolution that the transmitter has.
enum SuperbitRFStatus status
The status of the superbitRF.
The original DSM2 protocol with 2 packets of data.
The chip is in synchronizing mode for channel A.
uint8_t channels[23]
The channels used for DSM2/DSMX.
uint32_t rc_count
How many valid RC packages are received.
The chip isn't initialized.
The transmitter has a 10 bit resolution.
uint32_t resync_count
The amount of resyncs needed during transfer.
uint32_t uplink_count
How many valid uplink packages are received.
uint8_t timeouts
The amount of timeouts.
uint8_t tx_buffer[SUPERBITRF_TX_BUFFER_SIZE]
The transmit buffer.
struct SuperbitRF superbitrf
uint8_t channel
The current channel number.
The transmitter has a 11 bit resolution.
uint32_t bind_mfg_id32
The MFG id where the receiver is bound to in uint32.
uint8_t state
The states each status can be in.
uint8_t num_channels
The number of channels the transmitter has.
uint8_t bind_mfg_id[4]
The MFG id where the receiver is bound to.
The original DSMX protocol with 2 packets of data.
Our own DSMX Paparazzi protocol.