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 config CANUTILS_CANLIB
bool "CAN utility library" bool "CAN utility library"
default n default n
depends on CAN && LIB_BOARDCTL depends on CAN
select BOARDCTL_CANINIT
---help--- ---help---
Enable the CAN utility library Enable the CAN utility library

View File

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

View File

@ -41,7 +41,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/boardctl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.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); printf("min ID: %ld max ID: %ld\n", minid, maxid);
#endif #endif
/* Initialization of the CAN hardware is performed by logic external to /* Initialization of the CAN hardware is performed by board-specific,
* this test. * 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 */ /* Open the CAN device for reading */
fd = open(CONFIG_EXAMPLES_CAN_DEVPATH, CAN_OFLAGS); fd = open(CONFIG_EXAMPLES_CAN_DEVPATH, CAN_OFLAGS);

View File

@ -43,7 +43,6 @@
* with Libcanard */ * with Libcanard */
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/boardctl.h>
#include <sched.h> #include <sched.h>
#include <stdio.h> #include <stdio.h>
@ -432,19 +431,10 @@ static int canard_daemon(int argc, char *argv[])
int errval = 0; int errval = 0;
int ret; int ret;
/* Initialization of the CAN hardware is performed by logic external to /* Initialization of the CAN hardware is performed by external, board-
* this test. * 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 */ /* Open the CAN device for reading */
ret = canardNuttXInit(&canardnuttx_instance, ret = canardNuttXInit(&canardnuttx_instance,