TI-RTOS Drivers  tidrivers_full_2_20_00_08
CameraCC3200DMA.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
48 #ifndef ti_drivers_Camera_CameraCC3200DMA__include
49 #define ti_drivers_Camera_CameraCC3200DMA__include
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 #include <stdint.h>
56 #include <stdbool.h>
57 #include <ti/drivers/Camera.h>
58 #include <ti/drivers/ports/HwiP.h>
60 
71 /* Add CameraCC3200DMA_STATUS_* macros here */
72 
85 /* Add CameraCC3200DMA_CMD_* macros here */
86 
89 /* CC3200 camera DMA transfer size */
90 #define CameraCC3200DMA_DMA_TRANSFER_SIZE 64
91 
92 /* Camera function table pointer */
94 
126 typedef struct CameraCC3200DMA_HWAttrs {
128  uint32_t baseAddr;
130  uint32_t intNum;
132  uint32_t intPriority;
134  unsigned long channelIndex;
136 
142 typedef struct CameraCC3200DMA_Object {
143  /* Camera control variables */
144  bool opened; /* Has the obj been opened */
145  Camera_CaptureMode operationMode; /* Mode of operation of Camera */
146 
147  /* Camera capture variables */
148  Camera_Callback captureCallback; /* Pointer to capture callback */
149  uint32_t captureTimeout; /* Timeout for capture semaphore */
150  void *captureBuf; /* Buffer data pointer */
151  size_t bufferlength; /* Input Buffer length*/
152  size_t frameLength; /* Captured frame length */
153 
154  bool cameraDMA_PingPongMode; /* DMA ping pong mode */
155  size_t cameraDMAxIntrRcvd; /* Number of DMA interrupts*/
156  bool inUse; /* Camera in Use */
157 
158  /* Camera OS objects */
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif /* ti_drivers_Camera_CameraCC3200DMA__include */
uint32_t intNum
Definition: CameraCC3200DMA.h:130
The definition of a Camera function table that contains the required set of functions to control a sp...
Definition: Camera.h:405
void(* Camera_Callback)(Camera_Handle, void *buf, size_t bufferLength)
The definition of a callback function used by the Camera driver when used in Camera_MODE_CALLBACK.
Definition: Camera.h:212
unsigned long channelIndex
Definition: CameraCC3200DMA.h:134
SemaphoreP_Handle captureSem
Definition: CameraCC3200DMA.h:159
HwiP_Handle hwiHandle
Definition: CameraCC3200DMA.h:160
void * SemaphoreP_Handle
Opaque client reference to an instance of a SemaphoreP.
Definition: SemaphoreP.h:96
Semaphore module for the RTOS Porting Interface.
uint32_t captureTimeout
Definition: CameraCC3200DMA.h:149
bool inUse
Definition: CameraCC3200DMA.h:156
bool opened
Definition: CameraCC3200DMA.h:144
uint32_t baseAddr
Definition: CameraCC3200DMA.h:128
size_t bufferlength
Definition: CameraCC3200DMA.h:151
struct CameraCC3200DMA_Object * CameraCC3200DMA_Handle
CameraCC3200DMA Object.
Definition: CameraCC3200DMA.h:142
const Camera_FxnTable CameraCC3200DMA_fxnTable
void * captureBuf
Definition: CameraCC3200DMA.h:150
Camera_Callback captureCallback
Definition: CameraCC3200DMA.h:148
Camera_CaptureMode
Camera capture mode settings.
Definition: Camera.h:221
bool cameraDMA_PingPongMode
Definition: CameraCC3200DMA.h:154
Camera driver interface.
uint32_t intPriority
Definition: CameraCC3200DMA.h:132
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:66
Camera_CaptureMode operationMode
Definition: CameraCC3200DMA.h:145
size_t frameLength
Definition: CameraCC3200DMA.h:152
struct CameraCC3200DMA_HWAttrs CameraCC3200DMA_HWAttrs
CameraCC3200DMA Hardware attributes.
size_t cameraDMAxIntrRcvd
Definition: CameraCC3200DMA.h:155
Hardware Interrupt module for the RTOS Porting Interface.
struct CameraCC3200DMA_Object CameraCC3200DMA_Object
CameraCC3200DMA Object.
CameraCC3200DMA Hardware attributes.
Definition: CameraCC3200DMA.h:126
Copyright 2016, Texas Instruments Incorporated