apps/examples/can: Remove can_devinit(). Replace with boardctl(BOARDIOC_CAN_INITIAILIZE,0)
This commit is contained in:
parent
e35f64a3cf
commit
bc2cf8affd
@ -6,6 +6,8 @@
|
|||||||
config EXAMPLES_CAN
|
config EXAMPLES_CAN
|
||||||
bool "CAN example"
|
bool "CAN example"
|
||||||
default n
|
default n
|
||||||
|
depends on CAN && LIB_BOARDCTL
|
||||||
|
select BOARDCTL_CANINIT
|
||||||
---help---
|
---help---
|
||||||
Enable the CAN example
|
Enable the CAN example
|
||||||
|
|
||||||
|
@ -97,15 +97,4 @@
|
|||||||
* Public Function Prototypes
|
* 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 */
|
#endif /* __APPS_EXAMPLES_CAN_CAN_H */
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#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>
|
||||||
@ -276,10 +277,10 @@ int can_main(int argc, char *argv[])
|
|||||||
* this test.
|
* this test.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ret = can_devinit();
|
ret = boardctl(BOARDIOC_CAN_INITIALIZE, 0);
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
printf("ERROR: can_devinit failed: %d\n", ret);
|
printf("ERROR: BOARDIOC_CAN_INITIALIZE failed: %d\n", ret);
|
||||||
errval = 1;
|
errval = 1;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user