diff --git a/arch b/arch index fba93b8a0f..e81d1ea960 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit fba93b8a0fa0176c2df08835677e6f85adf75f4f +Subproject commit e81d1ea960b2da0d93dfb672bfd4d217fe688f52 diff --git a/configs b/configs index e140ddc5f4..ba676894cf 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit e140ddc5f4568a55f2f2410bf0c5e61e9abe897e +Subproject commit ba676894cfcff35cd578cd02ca93b60e6ae9a945 diff --git a/include/nuttx/board.h b/include/nuttx/board.h index f29b68cf10..d482591584 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -205,8 +205,8 @@ int board_reset(int status); * application-level touchscreen testing logic (perhaps by * apps/examples/touchscreen). If CONFIG_LIB_BOARDCTL=y and * CONFIG_BOARDCTL_TSCTEST=y, then this functions will be invoked via the - * (non-standard) boardctl() interface using the commands - * BOARDIOC_TSCTEST_SETUP command. + * (non-standard) boardctl() interface using the BOARDIOC_TSCTEST_SETUP + * command. * * Input Parameters: * minor - The input device minor number @@ -231,8 +231,8 @@ int board_tsc_setup(int minor); * application-level touchscreen testing logic (perhaps by * apps/examples/touchscreen). If CONFIG_LIB_BOARDCTL=y and * CONFIG_BOARDCTL_TSCTEST=y, then this functions will be invoked via the - * (non-standard) boardctl() interface using the commands - * BOARDIOC_TSCTEST_TEARDOWN command. + * (non-standard) boardctl() interface using the BOARDIOC_TSCTEST_TEARDOWN + * command. * * Input Parameters: * None @@ -254,8 +254,8 @@ void board_tsc_teardown(void); * This is an internal OS interface but may be invoked indirectly from * application-level graphics logic. If CONFIG_LIB_BOARDCTL=y and * CONFIG_BOARDCTL_ADCTEST=y, then this functions will be invoked via the - * (non-standard) boardctl() interface using the commands - * BOARDIOC_ADCTEST_SETUP command. + * (non-standard) boardctl() interface using the BOARDIOC_ADCTEST_SETUP + * command. * ****************************************************************************/ @@ -288,8 +288,8 @@ int board_pwm_setup(void); * This is an internal OS interface but may be invoked indirectly from * application-level graphics logic. If CONFIG_LIB_BOARDCTL=y and * CONFIG_BOARDCTL_GRAPHICS=y, then this functions will be invoked via the - * (non-standard) boardctl() interface using the commands - * BOARDIOC_GRAPHICS_SETUP command. + * (non-standard) boardctl() interface using the BOARDIOC_GRAPHICS_SETUP + * command. * ****************************************************************************/ @@ -301,6 +301,25 @@ struct fb_vtable_s; FAR struct fb_vtable_s *board_graphics_setup(unsigned int devno); #endif +/***************************************************************************** + * Name: board_can_initialize + * + * Description: + * Perform one-time CAN initialization. This is currently only needed for + * apps/examples/can. + * + * This is an internal OS interface but may be invoked indirectly from + * application-level graphics logic. If CONFIG_LIB_BOARDCTL=y and + * CONFIG_BOARDCTL_CANINIT=y, then this functions will be invoked via the + * (non-standard) boardctl() interface using the BOARDIOC_CAN_INITIALIZE + * command. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARDCTL_CANINIT +int board_can_initialize(void); +#endif + /**************************************************************************** * Name: board_ioctl * diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index 5e8adaf6d8..172f0b69f5 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -94,6 +94,12 @@ * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_PWMTEST * DEPENDENCIES: Board logic must provide board_pwm_setup() * + * CMD: BOARDIOC_CAN_INITIALIZE + * DESCRIPTION: CAN device initialization + * ARG: None + * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_CANINIT + * DEPENDENCIES: Board logic must provide board_can_initialize() + * * CMD: BOARDIOC_GRAPHICS_SETUP * DESCRIPTION: Configure graphics that require special initialization * procedures @@ -109,7 +115,8 @@ #define BOARDIOC_TSCTEST_TEARDOWN _BOARDIOC(0x0005) #define BOARDIOC_ADCTEST_SETUP _BOARDIOC(0x0006) #define BOARDIOC_PWMTEST_SETUP _BOARDIOC(0x0007) -#define BOARDIOC_GRAPHICS_SETUP _BOARDIOC(0x0008) +#define BOARDIOC_CAN_INITIALIZE _BOARDIOC(0x0008) +#define BOARDIOC_GRAPHICS_SETUP _BOARDIOC(0x0009) /* If CONFIG_BOARDCTL_IOCTL=y, then boad-specific commands will be support. * In this case, all commands not recognized by boardctl() will be forwarded @@ -118,7 +125,7 @@ * User defined board commands may begin with this value: */ -#define BOARDIOC_USER _BOARDIOC(0x0009) +#define BOARDIOC_USER _BOARDIOC(0x000a) /**************************************************************************** * Public Type Definitions