From 4b863aa108c65a81afa1ae948446a13e9b7bf895 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 25 Jul 2018 16:19:49 -0700 Subject: [PATCH] uavcan:Boards do the CAN GPIO init --- src/modules/uavcan/uavcan_main.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp index 8d767857dd..2270e82b47 100644 --- a/src/modules/uavcan/uavcan_main.cpp +++ b/src/modules/uavcan/uavcan_main.cpp @@ -533,24 +533,6 @@ int UavcanNode::start(uavcan::NodeID node_id, uint32_t bitrate) return -1; } - /* - * GPIO config. - * Forced pull up on CAN2 is required for Pixhawk v1 where the second interface lacks a transceiver. - * If no transceiver is connected, the RX pin will float, occasionally causing CAN controller to - * fail during initialization. - */ -#if defined(GPIO_CAN1_RX) - px4_arch_configgpio(GPIO_CAN1_RX); - px4_arch_configgpio(GPIO_CAN1_TX); -#endif -#if defined(GPIO_CAN2_RX) - px4_arch_configgpio(GPIO_CAN2_RX | GPIO_PULLUP); - px4_arch_configgpio(GPIO_CAN2_TX); -#endif -#if !defined(GPIO_CAN1_RX) && !defined(GPIO_CAN2_RX) -# error "Need to define GPIO_CAN1_RX and/or GPIO_CAN2_RX" -#endif - /* * CAN driver init * Note that we instantiate and initialize CanInitHelper only once, because the STM32's bxCAN driver