Added missig can_devinit prototype

The Nuttx CAN driver is not used with UAVCAN. However to
facilitate compilation to allow the Nuttx CAN Example to be
compiled and linked, the missing proto type was needed.

Futhermore to include the NuttX CAN eaxample the following changes
are needed:

1 ) In cmake/configs/<target>.cmake
Add can to config_extra_builtin_cmds as:

set(config_extra_builtin_cmds
        serdis
        sercon
        can
        )

Add:
add_custom_target(can)
set_target_properties(can PROPERTIES
       PRIORITY "SCHED_PRIORITY_DEFAULT"
       MAIN "can" STACK_MAIN "2048"
       COMPILE_FLAGS "-Os")

2) Update the nuttx-configs/<target>/nsh/defconfig

Run make oldconfig and make menuconfig and set the follwoing:
CONFIG_CAN=y
CONFIG_STM32_CAN1=y or CONFIG_STM32_CAN2=y
CONFIG_CAN_EXTID=y
CONFIG_CAN1_BAUD=250000
CONFIG_CAN_FIFOSIZE=8
CONFIG_CAN_NPENDINGRTR=4
CONFIG_EXAMPLES_CAN=y
This commit is contained in:
David Sidrane
2016-10-06 05:42:13 -10:00
committed by Lorenz Meier
parent 1c766aef12
commit 248cd45503
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -96,7 +96,7 @@
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
int can_devinit(void);
/************************************************************************************ /************************************************************************************
* Name: can_devinit * Name: can_devinit
* *
@@ -96,6 +96,7 @@
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
int can_devinit(void);
/************************************************************************************ /************************************************************************************
* Name: can_devinit * Name: can_devinit
@@ -96,6 +96,7 @@
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
int can_devinit(void);
/************************************************************************************ /************************************************************************************
* Name: can_devinit * Name: can_devinit