TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
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  */
46 #ifndef ti_drivers_Camera_CameraCC3200DMA__include
47 #define ti_drivers_Camera_CameraCC3200DMA__include
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 #include <stdint.h>
54 #include <stdbool.h>
55 #include <ti/drivers/Camera.h>
56 #include <ti/drivers/ports/HwiP.h>
58 
59 /* CC3200 camera DMA transfer size */
60 #define CameraCC3200DMA_DMA_TRANSFER_SIZE 64
61 
62 /* Camera function table pointer */
64 
96 typedef struct CameraCC3200DMA_HWAttrs {
98  uint32_t baseAddr;
100  uint32_t intNum;
102  uint32_t intPriority;
104  unsigned long channelIndex;
106 
112 typedef struct CameraCC3200DMA_Object {
113  /* Camera control variables */
114  bool opened; /* Has the obj been opened */
115  Camera_CaptureMode operationMode; /* Mode of operation of Camera */
116 
117  /* Camera capture variables */
118  Camera_Callback captureCallback; /* Pointer to capture callback */
119  uint32_t captureTimeout; /* Timeout for capture semaphore */
120  void *captureBuf; /* Buffer data pointer */
121  size_t bufferlength; /* Input Buffer length*/
122  size_t frameLength; /* Captured frame length */
123 
124  bool cameraDMA_PingPongMode; /* DMA ping pong mode */
125  size_t cameraDMAxIntrRcvd; /* Number of DMA interrupts*/
126  bool inUse; /* Camera in Use */
127 
128  /* Camera OS objects */
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* ti_drivers_Camera_CameraCC3200DMA__include */
uint32_t intNum
Definition: CameraCC3200DMA.h:100
The definition of a Camera function table that contains the required set of functions to control a sp...
Definition: Camera.h:380
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:187
unsigned long channelIndex
Definition: CameraCC3200DMA.h:104
SemaphoreP_Handle captureSem
Definition: CameraCC3200DMA.h:129
HwiP_Handle hwiHandle
Definition: CameraCC3200DMA.h:130
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:119
bool inUse
Definition: CameraCC3200DMA.h:126
bool opened
Definition: CameraCC3200DMA.h:114
uint32_t baseAddr
Definition: CameraCC3200DMA.h:98
size_t bufferlength
Definition: CameraCC3200DMA.h:121
struct CameraCC3200DMA_Object * CameraCC3200DMA_Handle
CameraCC3200DMA Object.
Definition: CameraCC3200DMA.h:112
const Camera_FxnTable CameraCC3200DMA_fxnTable
void * captureBuf
Definition: CameraCC3200DMA.h:120
Camera_Callback captureCallback
Definition: CameraCC3200DMA.h:118
Camera_CaptureMode
Camera capture mode settings.
Definition: Camera.h:196
bool cameraDMA_PingPongMode
Definition: CameraCC3200DMA.h:124
Camera driver interface.
uint32_t intPriority
Definition: CameraCC3200DMA.h:102
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:66
Camera_CaptureMode operationMode
Definition: CameraCC3200DMA.h:115
size_t frameLength
Definition: CameraCC3200DMA.h:122
struct CameraCC3200DMA_HWAttrs CameraCC3200DMA_HWAttrs
CameraCC3200DMA Hardware attributes.
size_t cameraDMAxIntrRcvd
Definition: CameraCC3200DMA.h:125
Hardware Interrupt module for the RTOS Porting Interface.
struct CameraCC3200DMA_Object CameraCC3200DMA_Object
CameraCC3200DMA Object.
CameraCC3200DMA Hardware attributes.
Definition: CameraCC3200DMA.h:96
Copyright 2015, Texas Instruments Incorporated