Merged in alinjerpelea/nuttx (pull request #1033)

boards: spresense: Add board initialization for isx012

Add isx012 initialization to the board and include the needed headers

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Alin Jerpelea 2019-09-18 11:42:35 +00:00 committed by Gregory Nutt
parent 2154a02fa1
commit 54ef3efc35
4 changed files with 20 additions and 2 deletions

View File

@ -41,6 +41,8 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/video/isx012.h>
#include <nuttx/video/video.h>
/**************************************************************************** /****************************************************************************
* Public Types * Public Types

View File

@ -47,6 +47,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/board.h> #include <nuttx/board.h>
#include <nuttx/board.h>
#include <arch/board/board.h> #include <arch/board/board.h>
#ifdef CONFIG_RNDIS #ifdef CONFIG_RNDIS
@ -326,6 +327,21 @@ int cxd56_bringup(void)
} }
#endif #endif
#ifdef CONFIG_VIDEO_ISX012
ret = board_isx012_initialize(IMAGER_I2C);
if (ret < 0)
{
_err("ERROR: Failed to initialize ISX012 board. %d\n", errno);
}
g_video_devops = isx012_initialize();
if (g_video_devops == NULL)
{
_err("ERROR: Failed to populate ISX012 devops. %d\n", errno);
ret = ERROR;
}
#endif /* CONFIG_VIDEO_ISX012 */
/* In order to prevent Hi-Z from being input to the SD Card controller, /* In order to prevent Hi-Z from being input to the SD Card controller,
* Initialize SDIO pins to GPIO low output with internal pull-down. * Initialize SDIO pins to GPIO low output with internal pull-down.
*/ */

View File

@ -236,8 +236,6 @@ static const struct file_operations g_video_fops =
0 /* unlink */ 0 /* unlink */
}; };
static FAR const struct video_devops_s *g_video_devops;
static bool is_initialized = false; static bool is_initialized = false;
/**************************************************************************** /****************************************************************************

View File

@ -618,6 +618,8 @@ struct v4l2_ext_controls
struct v4l2_ext_control *controls; /* each control information */ struct v4l2_ext_control *controls; /* each control information */
}; };
FAR const struct video_devops_s *g_video_devops;
/**************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/