mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 00:33:33 +08:00
Qurt UART ESC driver support (#20784)
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/spi.h>
|
||||
#include <drivers/device/qurt/uart.h>
|
||||
#include <pthread.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
@@ -280,6 +281,10 @@ int px4muorb_orb_initialize(fc_func_ptrs *func_ptrs, int32_t clock_offset_us)
|
||||
// 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);
|
||||
|
||||
// Configure the UART driver function pointers
|
||||
configure_uart_callbacks(muorb_func_ptrs.open_uart_func_t, muorb_func_ptrs.write_uart_func_t,
|
||||
muorb_func_ptrs.read_uart_func_t);
|
||||
|
||||
// Initialize the interrupt callback registration
|
||||
register_interrupt_callback_initalizer(muorb_func_ptrs.register_interrupt_callback);
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <pthread.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "uORB/uORBCommunicator.hpp"
|
||||
#include "mUORBAggregator.hpp"
|
||||
@@ -196,7 +197,7 @@ typedef struct {
|
||||
// open_uart_func_t open_uart_func;
|
||||
// write_uart_func_t write_uart_func;
|
||||
// read_uart_func_t read_uart_func;
|
||||
int (*open_uart_func_t)(uint8_t, uint32_t);
|
||||
int (*open_uart_func_t)(uint8_t, speed_t);
|
||||
int (*write_uart_func_t)(int, const void *, size_t);
|
||||
int (*read_uart_func_t)(int, void *, size_t);
|
||||
int (*register_interrupt_callback)(int (*)(int, void *, void *), void *arg);
|
||||
|
||||
Reference in New Issue
Block a user