apps/examples/can: Remove can_devinit(). Replace with boardctl(BOARDIOC_CAN_INITIAILIZE,0)

This commit is contained in:
Gregory Nutt 2015-08-18 13:25:30 -06:00
parent e35f64a3cf
commit bc2cf8affd
3 changed files with 5 additions and 13 deletions

View File

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

View File

@ -97,15 +97,4 @@
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: can_devinit()
*
* Description:
* Perform architecuture-specific initialization of the CAN hardware. This
* interface must be provided by all configurations using apps/examples/can
*
****************************************************************************/
int can_devinit(void);
#endif /* __APPS_EXAMPLES_CAN_CAN_H */

View File

@ -41,6 +41,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/boardctl.h>
#include <stdio.h>
#include <stdlib.h>
@ -276,10 +277,10 @@ int can_main(int argc, char *argv[])
* this test.
*/
ret = can_devinit();
ret = boardctl(BOARDIOC_CAN_INITIALIZE, 0);
if (ret != OK)
{
printf("ERROR: can_devinit failed: %d\n", ret);
printf("ERROR: BOARDIOC_CAN_INITIALIZE failed: %d\n", ret);
errval = 1;
goto errout;
}