PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <time.h>
#include <unistd.h>
#include <fcntl.h>
#include "px4muorb_KraitRpcWrapper.hpp"
#include <rpcmem.h>
#include <px4muorb.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/shmem.h>
#include <drivers/drv_hrt.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | MUORB_KRAIT_FASTRPC_MEM_FLAGS 0 |
#define | MUORB_KRAIT_FASTRPC_HEAP_ID 22 |
#define | DSP_TIMER_FILE "/sys/kernel/boot_adsp/qdsp_qtimer" |
Functions | |
int | calc_timer_diff_to_dsp_us (int32_t *time_diff_us) |
Helper function to get timer difference between time on DSP and appsproc side. More... | |
Variables | |
static char * | _TopicNameBuffer = 0 |
static const int32_t | _MAX_TOPIC_NAME_BUFFER = 256 |
static uint8_t * | _DataBuffer = 0 |
static const uint32_t | _MAX_DATA_BUFFER_SIZE = 2048 |
static bool | _Initialized = false |
static const uint32_t | _MAX_TOPIC_DATA_BUFFER_SIZE = 1024 |
static const uint32_t | _MAX_TOPICS = 64 |
static const uint32_t | _MAX_BULK_TRANSFER_BUFFER_SIZE |
static uint8_t * | _BulkTransferBuffer = 0 |
unsigned char * | adsp_changed_index = 0 |
#define DSP_TIMER_FILE "/sys/kernel/boot_adsp/qdsp_qtimer" |
Definition at line 73 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by calc_timer_diff_to_dsp_us().
#define MUORB_KRAIT_FASTRPC_HEAP_ID 22 |
Definition at line 52 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize().
#define MUORB_KRAIT_FASTRPC_MEM_FLAGS 0 |
Definition at line 48 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize().
int calc_timer_diff_to_dsp_us | ( | int32_t * | time_diff_us | ) |
Helper function to get timer difference between time on DSP and appsproc side.
Usually the DSP gets started around 2s before the appsproc (Linux) side and therefore the clocks are not in sync. We change the clock on the DSP side but for this we need to find the offset first and then tell code on the DSP side.
time_diff_us | pointer to time offset to set. |
Definition at line 86 of file px4muorb_KraitRpcWrapper.cpp.
References DSP_TIMER_FILE, fd, and read().
Referenced by px4muorb::KraitRpcWrapper::Initialize().
|
static |
Definition at line 68 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), px4muorb::KraitRpcWrapper::ReceiveBulkData(), and px4muorb::KraitRpcWrapper::Terminate().
|
static |
Definition at line 57 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), px4muorb::KraitRpcWrapper::ReceiveData(), and px4muorb::KraitRpcWrapper::Terminate().
|
static |
Definition at line 60 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::AddSubscriber(), px4muorb::KraitRpcWrapper::Initialize(), px4muorb::KraitRpcWrapper::IsSubscriberPresent(), px4muorb::KraitRpcWrapper::ReceiveBulkData(), px4muorb::KraitRpcWrapper::ReceiveData(), px4muorb::KraitRpcWrapper::RemoveSubscriber(), px4muorb::KraitRpcWrapper::SendData(), px4muorb::KraitRpcWrapper::Terminate(), px4muorb::KraitRpcWrapper::TopicAdvertised(), px4muorb::KraitRpcWrapper::TopicUnadvertised(), and px4muorb::KraitRpcWrapper::UnblockReceiveData().
|
static |
Definition at line 66 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), and px4muorb::KraitRpcWrapper::ReceiveBulkData().
|
static |
Definition at line 58 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), and px4muorb::KraitRpcWrapper::ReceiveData().
|
static |
Definition at line 64 of file px4muorb_KraitRpcWrapper.cpp.
|
static |
Definition at line 55 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), and px4muorb::KraitRpcWrapper::ReceiveData().
|
static |
Definition at line 65 of file px4muorb_KraitRpcWrapper.cpp.
|
static |
Definition at line 54 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), px4muorb::KraitRpcWrapper::ReceiveData(), and px4muorb::KraitRpcWrapper::Terminate().
unsigned char* adsp_changed_index = 0 |
Definition at line 70 of file px4muorb_KraitRpcWrapper.cpp.
Referenced by px4muorb::KraitRpcWrapper::Initialize(), and px4muorb::KraitRpcWrapper::Terminate().