mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 23:53:33 +08:00
Qurt platform custom icm42688p IMU driver (#20753)
- first version of IMU driver for the VOXL 2 platform (Qurt) - this is a customized version of the Invensense ICM42688P driver, it is currently in the VOXL 2 board directory
This commit is contained in:
@@ -41,9 +41,9 @@ if (${PX4_PLATFORM} STREQUAL "nuttx")
|
||||
list(APPEND SRCS_PLATFORM nuttx/SPI.cpp)
|
||||
endif()
|
||||
elseif((${PX4_PLATFORM} MATCHES "qurt"))
|
||||
list(APPEND SRCS_PLATFORM qurt/I2C.cpp)
|
||||
# list(APPEND SRCS_PLATFORM qurt/I2C.cpp)
|
||||
list(APPEND SRCS_PLATFORM qurt/SPI.cpp)
|
||||
list(APPEND SRCS_PLATFORM qurt/uart.c)
|
||||
# list(APPEND SRCS_PLATFORM qurt/uart.c)
|
||||
elseif(UNIX AND NOT APPLE) #TODO: add linux PX4 platform type
|
||||
# Linux I2Cdev and SPIdev
|
||||
list(APPEND SRCS_PLATFORM
|
||||
|
||||
@@ -37,9 +37,14 @@
|
||||
#include <string>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/spi.h>
|
||||
#include <pthread.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <lib/parameters/param.h>
|
||||
#include <px4_platform_common/px4_work_queue/WorkQueueManager.hpp>
|
||||
|
||||
#include "hrt_work.h"
|
||||
|
||||
// Definition of test to run when in muorb test mode
|
||||
static MUORBTestType test_to_run;
|
||||
@@ -230,6 +235,18 @@ int px4muorb_orb_initialize(fc_func_ptrs *func_ptrs, int32_t clock_offset_us)
|
||||
uORB::Manager::get_instance()->set_uorb_communicator(
|
||||
uORB::ProtobufChannel::GetInstance());
|
||||
|
||||
param_init();
|
||||
|
||||
px4::WorkQueueManagerStart();
|
||||
|
||||
// Configure the SPI driver function pointers
|
||||
device::SPI::configure_callbacks(muorb_func_ptrs._config_spi_bus_func_t, muorb_func_ptrs._spi_transfer_func_t);
|
||||
|
||||
// Initialize the interrupt callback registration
|
||||
register_interrupt_callback_initalizer(muorb_func_ptrs.register_interrupt_callback);
|
||||
|
||||
hrt_work_queue_init();
|
||||
|
||||
const char *argv[3] = { "slpi", "start" };
|
||||
int argc = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user