mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
uavcannode:Boards do the CAN GPIO init
This commit is contained in:
committed by
Daniel Agar
parent
b577bfc461
commit
7bdfac786d
@@ -160,18 +160,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.
|
||||
*/
|
||||
px4_arch_configgpio(GPIO_CAN1_RX);
|
||||
px4_arch_configgpio(GPIO_CAN1_TX);
|
||||
#if defined(GPIO_CAN2_RX)
|
||||
px4_arch_configgpio(GPIO_CAN2_RX | GPIO_PULLUP);
|
||||
px4_arch_configgpio(GPIO_CAN2_TX);
|
||||
#endif
|
||||
/*
|
||||
* CAN driver init
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user