dRonin
adbada4
dRonin firmware
|
Data Structures | |
struct | RadioComBridgeData |
Macros | |
#define | STACK_SIZE_BYTES 600 |
#define | TASK_PRIORITY PIOS_THREAD_PRIO_LOW |
#define | MAX_RETRIES 2 |
#define | MAX_PORT_DELAY 200 |
#define | COMSTATS_INJECT 400 |
#define | RETRY_TIMEOUT_MS 150 |
#define | USB_ACTIVITY_TIMEOUT_MS 6000 |
#define | MetaObjectId(x) (x+1) |
Functions | |
static void | telemetryRxTask (void *parameters) |
static void | radioRxTask (void *parameters) |
static int32_t | UAVTalkSendHandler (void *ctx, uint8_t *buf, int32_t length) |
Transmit data buffer to the com port. More... | |
static int32_t | RadioSendHandler (void *ctx, uint8_t *buf, int32_t length) |
static void | ProcessLocalStream (UAVTalkConnection inConnectionHandle, UAVTalkConnection outConnectionHandle, uint8_t rxbyte) |
Process a byte of data received on the telemetry stream. More... | |
static void | ProcessRadioStream (UAVTalkConnection inConnectionHandle, UAVTalkConnection outConnectionHandle, uint8_t rxbyte) |
Process a byte of data received on the radio data stream. More... | |
static void | NewReceiverData (const UAVObjEvent *ev, void *ctx, void *obj, int len) |
static uintptr_t | getComPort () |
static int32_t | RadioComBridgeStart (void) |
Start the module. More... | |
static int32_t | RadioComBridgeInitialize (void) |
Initialise the module. More... | |
MODULE_INITCALL (RadioComBridgeInitialize, RadioComBridgeStart) | |
static void | updateRadioComBridgeStats () |
static void | radioRxTask (__attribute__((unused)) void *parameters) |
Radio rx task. Receive data packets from the radio and pass them on. More... | |
static void | telemetryRxTask (__attribute__((unused)) void *parameters) |
Receive telemetry from the USB/COM port. More... | |
Variables | |
struct pios_thread * | RadioComBridgeData::telemetryRxTaskHandle |
struct pios_thread * | RadioComBridgeData::radioRxTaskHandle |
UAVTalkConnection | RadioComBridgeData::telemUAVTalkCon |
UAVTalkConnection | RadioComBridgeData::radioUAVTalkCon |
volatile bool | RadioComBridgeData::have_port |
static RadioComBridgeData * | data |
#define COMSTATS_INJECT 400 |
Definition at line 72 of file radiocombridge.c.
#define MAX_PORT_DELAY 200 |
Definition at line 71 of file radiocombridge.c.
#define MAX_RETRIES 2 |
Definition at line 70 of file radiocombridge.c.
#define MetaObjectId | ( | x | ) | (x+1) |
Definition at line 457 of file radiocombridge.c.
#define RETRY_TIMEOUT_MS 150 |
Definition at line 73 of file radiocombridge.c.
#define STACK_SIZE_BYTES 600 |
Definition at line 68 of file radiocombridge.c.
#define TASK_PRIORITY PIOS_THREAD_PRIO_LOW |
Definition at line 69 of file radiocombridge.c.
#define USB_ACTIVITY_TIMEOUT_MS 6000 |
Definition at line 74 of file radiocombridge.c.
|
static |
Determine input/output com port as highest priority available
Definition at line 159 of file radiocombridge.c.
MODULE_INITCALL | ( | RadioComBridgeInitialize | , |
RadioComBridgeStart | |||
) |
|
static |
Definition at line 111 of file radiocombridge.c.
|
static |
Process a byte of data received on the telemetry stream.
[in] | inConnectionHandle | The UAVTalk connection handle on the telemetry port |
[in] | outConnectionHandle | The UAVTalk connection handle on the radio port. |
[in] | rxbyte | The received byte. |
Definition at line 465 of file radiocombridge.c.
|
static |
Process a byte of data received on the radio data stream.
[in] | inConnectionHandle | The UAVTalk connection handle on the radio port. |
[in] | outConnectionHandle | The UAVTalk connection handle on the telemetry port. |
[in] | rxbyte | The received byte. |
Definition at line 509 of file radiocombridge.c.
|
static |
Initialise the module.
Definition at line 224 of file radiocombridge.c.
|
static |
Start the module.
Definition at line 190 of file radiocombridge.c.
|
static |
|
static |
Radio rx task. Receive data packets from the radio and pass them on.
[in] | parameters | The task parameters |
Definition at line 305 of file radiocombridge.c.
|
static |
Transmit data buffer to the com port.
[in] | buf | Data buffer to send |
[in] | length | Length of buffer |
Definition at line 442 of file radiocombridge.c.
|
static |
|
static |
Receive telemetry from the USB/COM port.
[in] | parameters | The task parameters |
Definition at line 358 of file radiocombridge.c.
|
static |
Transmit data buffer to the com port.
[in] | buf | Data buffer to send |
[in] | length | Length of buffer |
Definition at line 417 of file radiocombridge.c.
|
static |
Update telemetry statistics
Definition at line 261 of file radiocombridge.c.
|
static |
Definition at line 109 of file radiocombridge.c.
volatile bool RadioComBridgeData::have_port |
Definition at line 88 of file radiocombridge.c.
struct pios_thread* RadioComBridgeData::radioRxTaskHandle |
Definition at line 82 of file radiocombridge.c.
UAVTalkConnection RadioComBridgeData::radioUAVTalkCon |
Definition at line 86 of file radiocombridge.c.
struct pios_thread* RadioComBridgeData::telemetryRxTaskHandle |
Definition at line 81 of file radiocombridge.c.
UAVTalkConnection RadioComBridgeData::telemUAVTalkCon |
Definition at line 85 of file radiocombridge.c.