mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
Add OV2640 camera support to test the SAMA5 ISI peripheral
This commit is contained in:
@@ -233,3 +233,14 @@ Documents/rss.gif
|
||||
* share alike – If you alter, transform, or build upon this work,
|
||||
you may distribute the resulting work only under the same or
|
||||
similar license to this one.
|
||||
|
||||
drivers/video/ov2640
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
WARNING: Some of the information in the data tables in this file came
|
||||
from other projects with conflicting licenses: Linux and ArduCAM. Those
|
||||
both have GPL licenses. I am not sure if it is proper or not to lift the
|
||||
content of those tables and still retain this BSD license. I am guessing
|
||||
so, but I am not copyright attorney so you should use this driver in
|
||||
products at your own risk.
|
||||
|
||||
@@ -6179,4 +6179,7 @@
|
||||
(2013-12-8).
|
||||
* arch/arm/src/a1x/a1x_irq.c: A10 interrupt handling logic (partial)
|
||||
(2013-12-8).
|
||||
|
||||
* drivers/video/ov2640.c: An OV2640 camera driver that will be used to
|
||||
verify the SAMA5D3x-EK ISI peripheral (2013-1209).
|
||||
* sama5d3x-ek/ov2640 and src/sam_ov2640.c. Board logic to test the SAMA5D3
|
||||
ISI peripheral usign the OV2640 camera (2013-12-9).
|
||||
|
||||
@@ -268,12 +268,12 @@
|
||||
/* PMC Programmable Clock Register (0,1,2) */
|
||||
|
||||
#define PMC_PCK_CSS_SHIFT (0) /* Bits 0-2: Master Clock Source Selection */
|
||||
#define PMC_PCK_CSS_MASK (7 << PMC_PCK_CSS_MASK)
|
||||
# define PMC_PCK_CSS_SLOW (0 << PMC_PCK_CSS_MASK) /* Slow Clock */
|
||||
# define PMC_PCK_CSS_MAIN (1 << PMC_PCK_CSS_MASK) /* Main Clock */
|
||||
# define PMC_PCK_CSS_PLLA (2 << PMC_PCK_CSS_MASK) /* PLLA Clock */
|
||||
# define PMC_PCK_CSS_UPLL (3 << PMC_PCK_CSS_MASK) /* UPLL Clock */
|
||||
# define PMC_PCK_CSS_MCK (4 << PMC_PCK_CSS_MASK) /* Master Clock */
|
||||
#define PMC_PCK_CSS_MASK (7 << PMC_PCK_CSS_SHIFT)
|
||||
# define PMC_PCK_CSS_SLOW (0 << PMC_PCK_CSS_SHIFT) /* Slow Clock */
|
||||
# define PMC_PCK_CSS_MAIN (1 << PMC_PCK_CSS_SHIFT) /* Main Clock */
|
||||
# define PMC_PCK_CSS_PLLA (2 << PMC_PCK_CSS_SHIFT) /* PLLA Clock */
|
||||
# define PMC_PCK_CSS_UPLL (3 << PMC_PCK_CSS_SHIFT) /* UPLL Clock */
|
||||
# define PMC_PCK_CSS_MCK (4 << PMC_PCK_CSS_SHIFT) /* Master Clock */
|
||||
#define PMC_PCK_PRES_SHIFT (4) /* Bits 4-6: Programmable Clock Prescaler */
|
||||
#define PMC_PCK_PRES_MASK (7 << PMC_PCK_PRES_SHIFT)
|
||||
# define PMC_PCK_PRES_DIV1 (0 << PMC_PCK_PRES_SHIFT) /* Selected clock */
|
||||
|
||||
@@ -39,12 +39,20 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip/sam_pinmap.h"
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "sam_pio.h"
|
||||
#include "sam_isi.h"
|
||||
|
||||
#include "sam_pck.h"
|
||||
|
||||
#ifdef CONFIG_SAMA5_ISI
|
||||
|
||||
/****************************************************************************
|
||||
@@ -96,12 +104,13 @@ uint32_t sam_pck_configure(enum pckid_e pckid, uint32_t frequency)
|
||||
{
|
||||
uint32_t regval;
|
||||
uint32_t clkin;
|
||||
uint32_t actual;
|
||||
|
||||
/* Pick a clock source. Several are possible but only MCK or PLLA is
|
||||
* chosen here.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(BOARD_MCK_FREQUENCY < BOARD_PLLA_FREQUENCY)
|
||||
DEBUGASSERT(BOARD_MCK_FREQUENCY < BOARD_PLLA_FREQUENCY);
|
||||
if (frequency <= BOARD_MCK_FREQUENCY ||
|
||||
frequency < BOARD_PLLA_FREQUENCY / 64)
|
||||
{
|
||||
@@ -158,7 +167,7 @@ uint32_t sam_pck_configure(enum pckid_e pckid, uint32_t frequency)
|
||||
sdbg("ERROR: frequency cannot be realized.\n");
|
||||
sdbg(" frequency=%d MCK=%d\n",
|
||||
frequency, clkin);
|
||||
return -ERANGE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Disable the programmable clock, configure the PCK output pin, then set
|
||||
|
||||
@@ -213,4 +213,13 @@ config SAMA5D3X_EK_I2SCHAR_MINOR
|
||||
|
||||
endif # AUDIO_I2SCHAR && (SAMA5_SSC0 || SAMA5_SSC1)
|
||||
|
||||
if VIDEO_OV2640
|
||||
|
||||
config SAMA5_OV2640_DEMO
|
||||
bool "SAMA5 OV2640 camera demo"
|
||||
default n
|
||||
---help---
|
||||
Enable the SAMA5 OV2640 camera demo
|
||||
|
||||
endif # VIDEO_OV2640
|
||||
endif # ARCH_BOARD_SAMA5D3X_EK
|
||||
|
||||
@@ -2638,6 +2638,7 @@ Configurations
|
||||
It executes an exhaustive OS test to verify a correct port of NuttX
|
||||
to the SAMA5D3-EK. Since it now passes that test, the configuration
|
||||
has little further use other than for reference.
|
||||
ov2640: A test of the SAMA5 ISI using an OV2640 camera.
|
||||
|
||||
There may be issues with some of these configurations. See the details
|
||||
before of the status of individual configurations.
|
||||
@@ -3050,6 +3051,10 @@ Configurations
|
||||
STATUS:
|
||||
See the To-Do list below
|
||||
|
||||
ov2640:
|
||||
|
||||
A test of the SAMA5 ISI using an OV2640 camera.
|
||||
|
||||
To-Do List
|
||||
==========
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
############################################################################
|
||||
# configs/sama5d3x-ek/ov2640/Make.defs
|
||||
#
|
||||
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
include ${TOPDIR}$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)armv7-a$(DELIM)Toolchain.defs
|
||||
|
||||
ifeq ($(CONFIG_SAMA5_BOOT_ISRAM),y)
|
||||
LDSCRIPT = isram.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y)
|
||||
LDSCRIPT = ddram.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y)
|
||||
LDSCRIPT = norflash.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y)
|
||||
# LDSCRIPT = cs1flash.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_SAMA5_BOOT_CS2FLASH),y)
|
||||
# LDSCRIPT = cs2flash.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_SAMA5_BOOT_CS3FLASH),y)
|
||||
# LDSCRIPT = cs3flash.ld
|
||||
endif
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}"
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
|
||||
MAXOPTIMIZATION = -O2
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include -isystem $(TOPDIR)$(DELIM)include$(DELIM)cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(ARCROSSDEV)ar rcs
|
||||
NM = $(ARCROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
else
|
||||
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
ARCHDEFINES =
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_HOST_WINDOWS),y)
|
||||
HOSTEXEEXT = .exe
|
||||
else
|
||||
HOSTEXEEXT =
|
||||
endif
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native host tools
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
else
|
||||
# Linux/Cygwin-native host tools
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mkdeps$(HOSTEXEEXT)
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+76
@@ -0,0 +1,76 @@
|
||||
#!/bin/bash
|
||||
# configs/samard3x-ek/ov2640/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
if [ "$_" = "$0" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WD=`pwd`
|
||||
if [ ! -x "setenv.sh" ]; then
|
||||
echo "This script must be executed from the top-level NuttX build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${PATH_ORIG}" ]; then
|
||||
export PATH_ORIG="${PATH}"
|
||||
fi
|
||||
|
||||
# This is the Cygwin path to the location where I installed the Atmel GCC
|
||||
# toolchain under Windows. You will also have to edit this if you install
|
||||
# this toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I installed the CodeSourcery
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the CodeSourcery toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the Atollic toolchain in any other location. /usr/bin is added before
|
||||
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
|
||||
# at those locations as well.
|
||||
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
|
||||
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I build the buildroot
|
||||
# toolchain.
|
||||
#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
|
||||
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
@@ -144,6 +144,10 @@ ifeq ($(CONFIG_SAMA5_TSD),y)
|
||||
CSRCS += sam_touchscreen.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VIDEO_OV2640),y)
|
||||
CSRCS += sam_ov2640.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||
CSRCS += sam_autoleds.c
|
||||
else
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/************************************************************************************
|
||||
* configs/sama5d3x-ek/src/sam_ov2640.c
|
||||
*
|
||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "sama5d3x-ek.h"
|
||||
|
||||
#if defined(CONFIG_SAMA5_ISI) && defined(CONFIG_SAMA5_OV2640_DEMO)
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
/* Configuration ********************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: ov2640_main
|
||||
*
|
||||
* Description:
|
||||
* Entry point for the OV2640 Camera Demo
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int ov2640_main(int argc, char *argv[])
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SAMA5_ISI && CONFIG_SAMA5_OV2640_DEMO */
|
||||
+11
-1
@@ -259,7 +259,7 @@ menuconfig AUDIO_DEVICES
|
||||
bool "Audio Device Support"
|
||||
default n
|
||||
---help---
|
||||
This directory holds implementations of audio device drivers.
|
||||
Enable support for audio device drivers.
|
||||
This includes drivers for MP3, WMA and Ogg Vorbis encoding,
|
||||
decoding, as well as drivers for interfacing with external
|
||||
DSP chips to perform custom audio functions.
|
||||
@@ -268,6 +268,16 @@ if AUDIO_DEVICES
|
||||
source drivers/audio/Kconfig
|
||||
endif # AUDIO_DEVICES
|
||||
|
||||
menuconfig VIDEO_DEVICES
|
||||
bool "Video Device Support"
|
||||
default n
|
||||
---help---
|
||||
Enable support for video device drivers.
|
||||
|
||||
if VIDEO_DEVICES
|
||||
source drivers/video/Kconfig
|
||||
endif # VIDEO_DEVICES
|
||||
|
||||
menuconfig BCH
|
||||
bool "Block-to-Character (BCH) Support"
|
||||
default n
|
||||
|
||||
@@ -66,6 +66,7 @@ include spi$(DELIM)Make.defs
|
||||
include syslog$(DELIM)Make.defs
|
||||
include usbdev$(DELIM)Make.defs
|
||||
include usbhost$(DELIM)Make.defs
|
||||
include video$(DELIM)Make.defs
|
||||
include wireless$(DELIM)Make.defs
|
||||
|
||||
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
||||
|
||||
@@ -7,7 +7,7 @@ config LIS331DL
|
||||
bool "ST LIS331DL device support"
|
||||
default n
|
||||
select I2C
|
||||
|
||||
|
||||
config I2C_LM75
|
||||
bool
|
||||
default y if LM75
|
||||
@@ -22,7 +22,7 @@ config DEBUG_LM75
|
||||
bool "Enable LM-75 debug"
|
||||
default n
|
||||
depends on LM75
|
||||
|
||||
|
||||
config QENCODER
|
||||
bool "Qencoder"
|
||||
default n
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
|
||||
config VIDEO_OV2640
|
||||
bool "OV2640 camera chip"
|
||||
default n
|
||||
select I2C
|
||||
|
||||
if VIDEO_OV2640
|
||||
|
||||
config OV2640_MULTIPLE
|
||||
bool "Multiple OV2640 devices"
|
||||
default n
|
||||
---help---
|
||||
Build in support for multiple on-board OV2640 devices
|
||||
|
||||
config OV2640_I2CADDR
|
||||
hex "I2C address (7-bit)"
|
||||
default 0x21
|
||||
---help---
|
||||
OV2640 I2C address in 7-bit format
|
||||
|
||||
config OV2640_FREQUENCY
|
||||
int "I2C frequency"
|
||||
default 400000
|
||||
---help---
|
||||
OV2640 I2C frequency
|
||||
choice
|
||||
prompt "Color format"
|
||||
default OV2640_RGB565_COLORFMT
|
||||
|
||||
config OV2640_RGB565_COLORFMT
|
||||
bool "RGB565"
|
||||
|
||||
config OV2640_YUV422_COLORFMT
|
||||
bool "YUV422"
|
||||
|
||||
endchoice
|
||||
|
||||
config OV2640_JPEG
|
||||
bool "JPEG output format"
|
||||
default n
|
||||
---help---
|
||||
Select JPEG output format
|
||||
|
||||
choice
|
||||
prompt "JPEG resolution"
|
||||
default OV2640_JPEG_SVGA_RESOLUTION
|
||||
depends on OV2640_JPEG
|
||||
|
||||
config OV2640_JPEG_QCIF_RESOLUTION
|
||||
bool "QCIF (176x144)"
|
||||
|
||||
config OV2640_JPEG_QVGA_RESOLUTION
|
||||
bool "QVGA (320x240)"
|
||||
|
||||
config OV2640_JPEG_CIF_RESOLUTION
|
||||
bool "CIF (352x288)"
|
||||
|
||||
config OV2640_JPEG_VGA_RESOLUTION
|
||||
bool "VGA (640x480)"
|
||||
|
||||
config OV2640_JPEG_SVGA_RESOLUTION
|
||||
bool "SVGA (800x600)"
|
||||
|
||||
config OV2640_JPEG_XVGA_RESOLUTION
|
||||
bool "XVGA (1024x768)"
|
||||
|
||||
config OV2640_JPEG_SXVGA_RESOLUTION
|
||||
bool "SXVGA (1280x1024)"
|
||||
|
||||
config OV2640_JPEG_UXGA_RESOLUTION
|
||||
bool "UXVGA (1600x1200)"
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Output resolution"
|
||||
default OV2640_SVGA_RESOLUTION
|
||||
depends on !OV2640_JPEG
|
||||
|
||||
config OV2640_QCIF_RESOLUTION
|
||||
bool "QCIF (176x144)"
|
||||
|
||||
config OV2640_QVGA_RESOLUTION
|
||||
bool "QVGA (320x240)"
|
||||
|
||||
config OV2640_CIF_RESOLUTION
|
||||
bool "CIF (352x288)"
|
||||
|
||||
config OV2640_VGA_RESOLUTION
|
||||
bool "VGA (640x480)"
|
||||
|
||||
config OV2640_SVGA_RESOLUTION
|
||||
bool "SVGA (800x600)"
|
||||
|
||||
config OV2640_XVGA_RESOLUTION
|
||||
bool "XVGA (1024x768)"
|
||||
|
||||
config OV2640_SXGA_RESOLUTION
|
||||
bool "SXVGA (1280x1024)"
|
||||
|
||||
config OV2640_UXGA_RESOLUTION
|
||||
bool "UXVGA (1600x1200)"
|
||||
|
||||
endchoice
|
||||
|
||||
config OV2640_REGDEBUG
|
||||
bool "Register level debug output"
|
||||
default n
|
||||
depends on DEBUG
|
||||
---help---
|
||||
Enable details, register level debug output.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,56 @@
|
||||
############################################################################
|
||||
# drivers/ov2640/Make.defs
|
||||
#
|
||||
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Include video drivers
|
||||
|
||||
ifeq ($(CONFIG_VIDEO_DEVICES),y)
|
||||
|
||||
# These video drivers depend on I2C support
|
||||
|
||||
ifeq ($(CONFIG_I2C),y)
|
||||
|
||||
ifeq ($(CONFIG_VIDEO_OV2640),y)
|
||||
CSRCS += ov2640.c
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Include video driver build support
|
||||
|
||||
DEPPATH += --dep-path video
|
||||
VPATH += :video
|
||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)video}
|
||||
|
||||
endif
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user