diff --git a/cmake/configs/nuttx_nxphlite-v3_default.cmake b/cmake/configs/nuttx_nxphlite-v3_default.cmake index ba63be0050fcd0452cb890b0f4a2208b16e18d13..82061c90cc0196681ba994a6ebbe0ab9dd76a5f0 100644 --- a/cmake/configs/nuttx_nxphlite-v3_default.cmake +++ b/cmake/configs/nuttx_nxphlite-v3_default.cmake @@ -1,7 +1,9 @@ px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common) -set(config_uavcan_num_ifaces 1) +set(UAVCAN_PLATFORM kinetis CACHE STRING "uavcan platform") +set(UAVCAN_TIMER 1) +set(config_uavcan_num_ifaces 2) set(config_module_list # @@ -86,7 +88,7 @@ set(config_module_list modules/load_mon modules/mavlink modules/navigator -#NO UAVCAN YET modules/uavcan + modules/uavcan modules/camera_feedback # diff --git a/platforms/nuttx/nuttx-configs/nxphlite-v3/nsh/defconfig b/platforms/nuttx/nuttx-configs/nxphlite-v3/nsh/defconfig index 683437381483fbb0fcc1a38fb8ef074e645813cc..00a611e306a6c685d3ac392dd053f96176d04713 100644 --- a/platforms/nuttx/nuttx-configs/nxphlite-v3/nsh/defconfig +++ b/platforms/nuttx/nuttx-configs/nxphlite-v3/nsh/defconfig @@ -345,7 +345,7 @@ CONFIG_ARCH_HAVE_MPU=y CONFIG_ARCH_HAVE_RESET=y # CONFIG_ARCH_HAVE_RTC_SUBSECONDS is not set # CONFIG_ARCH_USE_MPU is not set -# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set diff --git a/src/modules/uavcanesc/uavcan_driver.hpp b/src/modules/uavcanesc/uavcan_driver.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bd0d34b6be6c5eefb4cb38ff8bbed928374b129c --- /dev/null +++ b/src/modules/uavcanesc/uavcan_driver.hpp @@ -0,0 +1,45 @@ +/**************************************************************************** + * + * Copyright (C) 20158 PX4 Development Team. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name PX4 nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/** + * @author David Sidrane <david_s5@nscdgg.com> + */ + +#pragma once +#if defined(UAVCAN_KINETIS_NUTTX) +# include <uavcan_kinetis/uavcan_kinetis.hpp> +#elif defined(UAVCAN_STM32_NUTTX) +# include <uavcan_stm32/uavcan_stm32.hpp> +#else +# error "Unsupported driver" +#endif