RTEMS 6.3
Loading...
Searching...
No Matches
isi.h
Go to the documentation of this file.
1/* ---------------------------------------------------------------------------- */
2/* Atmel Microcontroller Software Support */
3/* SAM Software Package License */
4/* ---------------------------------------------------------------------------- */
5/* Copyright (c) 2015, Atmel Corporation */
6/* */
7/* All rights reserved. */
8/* */
9/* Redistribution and use in source and binary forms, with or without */
10/* modification, are permitted provided that the following condition is met: */
11/* */
12/* - Redistributions of source code must retain the above copyright notice, */
13/* this list of conditions and the disclaimer below. */
14/* */
15/* Atmel's name may not be used to endorse or promote products derived from */
16/* this software without specific prior written permission. */
17/* */
18/* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28/* ---------------------------------------------------------------------------- */
29
31
47
48#ifndef ISI_H
49#define ISI_H
50
51
52
53/*----------------------------------------------------------------------------
54 * Definition
55 *----------------------------------------------------------------------------*/
56#define YUV_INPUT 0
57#define RGB_INPUT 1
58#define GRAYSCALE_INPUT 2
59
60/*----------------------------------------------------------------------------
61 * Types
62 *----------------------------------------------------------------------------*/
63
65typedef struct {
69 volatile uint32_t DisplayCodec;
71 uint32_t nb_codec_ovf;
73 uint32_t nb_prev_ovf;
75
77typedef struct {
79 uint32_t Current;
81 uint32_t Control;
83 uint32_t Next;
85
86
88typedef struct {
90 uint8_t C0;
92 uint8_t C1;
94 uint8_t C2;
96 uint8_t C3;
98 uint8_t Croff;
100 uint8_t Cboff;
102 uint8_t Yoff;
104 uint16_t C4;
105} ISI_Y2R;
106
108typedef struct {
110 uint8_t C0;
112 uint8_t C1;
114 uint8_t C2;
116 uint8_t Roff;
118 uint8_t C3;
120 uint8_t C4;
122 uint8_t C5;
124 uint8_t Goff;
126 uint8_t C6;
128 uint8_t C7;
130 uint8_t C8;
132 uint8_t Boff;
133} ISI_R2Y;
134
135/*----------------------------------------------------------------------------
136 * Exported functions
137 *----------------------------------------------------------------------------*/
138extern void ISI_Enable(void);
139
140extern void ISI_Disable(void);
141
142void ISI_DmaChannelEnable(uint32_t channel);
143
144void ISI_DmaChannelDisable(uint32_t channel);
145
146extern void ISI_EnableInterrupt(uint32_t flag);
147
148extern void ISI_DisableInterrupt(uint32_t flag);
149
150extern void ISI_CodecPathFull(void);
151
152extern void ISI_SetFrameRate(uint32_t frame);
153
154extern uint8_t ISI_BytesForOnePixel(uint8_t bmpRgb);
155
156extern void ISI_Reset(void);
157
158extern void ISI_Init(pIsi_Video pVideo);
159
160extern uint32_t ISI_StatusRegister(void);
161
162extern void ISI_SetBlank(
163 uint8_t hBlank,
164 uint8_t vBlank);
165
166extern void ISI_SetSensorSize(
167 uint32_t hSize,
168 uint32_t vSize);
169
170extern void ISI_RgbPixelMapping(uint32_t wRgbPixelMapping);
171
172extern void ISI_RgbSwapMode(uint32_t swapMode);
173
174extern void ISI_YCrCbFormat(uint32_t wYuvSwapMode);
175
176extern void ISI_setGrayScaleMode(uint32_t wPixelFormat);
177
178extern void ISI_setInputStream(uint32_t wStreamMode);
179
180extern void ISI_setPreviewSize(
181 uint32_t hSize,
182 uint32_t vSize);
183
184extern void ISI_calcScalerFactor(void);
185
186extern void ISI_setDmaInPreviewPath(
187 uint32_t baseFrameBufDesc,
188 uint32_t dmaCtrl,
189 uint32_t frameBufferStartAddr);
190
191extern void ISI_setDmaInCodecPath(
192 uint32_t baseFrameBufDesc,
193 uint32_t dmaCtrl,
194 uint32_t frameBufferStartAddr);
195
196extern void ISI_SetMatrix4Yuv2Rgb (ISI_Y2R *yuv2rgb);
197extern void ISI_SetMatrix4Rgb2Yuv (ISI_R2Y *rgb2yuv);
198
199#endif //#ifndef ISI_H
200
Definition isi.h:65
uint32_t CurrentLcdIndex
Definition isi.h:67
uint32_t nb_codec_ovf
Definition isi.h:71
uint32_t nb_prev_ovf
Definition isi.h:73
volatile uint32_t DisplayCodec
Definition isi.h:69
Definition isi.h:77
uint32_t Next
Definition isi.h:83
uint32_t Control
Definition isi.h:81
uint32_t Current
Definition isi.h:79
Definition isi.h:108
uint8_t Goff
Definition isi.h:124
uint8_t C8
Definition isi.h:130
uint8_t C5
Definition isi.h:122
uint8_t C6
Definition isi.h:126
uint8_t C0
Definition isi.h:110
uint8_t C2
Definition isi.h:114
uint8_t Boff
Definition isi.h:132
uint8_t C1
Definition isi.h:112
uint8_t Roff
Definition isi.h:116
uint8_t C4
Definition isi.h:120
uint8_t C7
Definition isi.h:128
uint8_t C3
Definition isi.h:118
Definition isi.h:88
uint8_t C2
Definition isi.h:94
uint16_t C4
Definition isi.h:104
uint8_t C1
Definition isi.h:92
uint8_t C0
Definition isi.h:90
uint8_t Yoff
Definition isi.h:102
uint8_t C3
Definition isi.h:96
uint8_t Cboff
Definition isi.h:100
uint8_t Croff
Definition isi.h:98