Remove BOARDIOC_CAN_INITIALIZE. CAN initialization is now done in the board initialization logic just like every other device driver.

This commit is contained in:
Gregory Nutt 2016-12-06 08:54:38 -06:00
parent a479f9abed
commit cd6a9f8bae
4 changed files with 6 additions and 27 deletions

View File

@ -6,8 +6,7 @@
config CANUTILS_CANLIB
bool "CAN utility library"
default n
depends on CAN && LIB_BOARDCTL
select BOARDCTL_CANINIT
depends on CAN
---help---
Enable the CAN utility library

View File

@ -6,8 +6,7 @@
config EXAMPLES_CAN
bool "CAN example"
default n
depends on CAN && LIB_BOARDCTL
select BOARDCTL_CANINIT
depends on CAN
---help---
Enable the CAN example

View File

@ -41,7 +41,6 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/boardctl.h>
#include <stdio.h>
#include <stdlib.h>
@ -294,18 +293,10 @@ int can_main(int argc, FAR char *argv[])
printf("min ID: %ld max ID: %ld\n", minid, maxid);
#endif
/* Initialization of the CAN hardware is performed by logic external to
* this test.
/* Initialization of the CAN hardware is performed by board-specific,
* logic external prior to running this test.
*/
ret = boardctl(BOARDIOC_CAN_INITIALIZE, 0);
if (ret < 0)
{
printf("ERROR: BOARDIOC_CAN_INITIALIZE failed: %d\n", ret);
errval = 1;
goto errout;
}
/* Open the CAN device for reading */
fd = open(CONFIG_EXAMPLES_CAN_DEVPATH, CAN_OFLAGS);

View File

@ -43,7 +43,6 @@
* with Libcanard */
#include <sys/ioctl.h>
#include <sys/boardctl.h>
#include <sched.h>
#include <stdio.h>
@ -432,19 +431,10 @@ static int canard_daemon(int argc, char *argv[])
int errval = 0;
int ret;
/* Initialization of the CAN hardware is performed by logic external to
* this test.
/* Initialization of the CAN hardware is performed by external, board-
* specific logic to running this test.
*/
ret = boardctl(BOARDIOC_CAN_INITIALIZE, 0);
if (ret < 0)
{
printf("canard_daemon: ERROR: BOARDIOC_CAN_INITIALIZE failed: %d\n",
ret);
errval = 1;
goto errout;
}
/* Open the CAN device for reading */
ret = canardNuttXInit(&canardnuttx_instance,