RTEMS: bsps/arm/atsam/include/libchip/include/isi.h Source File

| RTEMS 5.4-rc2

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
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
65 typedef struct {
67 uint32_t CurrentLcdIndex;
69 volatile uint32_t DisplayCodec;
71 uint32_t nb_codec_ovf;
73 uint32_t nb_prev_ovf;
74} ISI_Descriptors;
75
77 typedef struct {
79 uint32_t Current;
81 uint32_t Control;
83 uint32_t Next;
84} ISI_FrameBufferDescriptors;
85
86
88 typedef 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
108 typedef 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
ISI_SetSensorSize
void ISI_SetSensorSize(uint32_t hSize, uint32_t vSize)
Set vertical and horizontal Size of the Image Sensor.
Definition: isi.c:213
ISI_setGrayScaleMode
void ISI_setGrayScaleMode(uint32_t wPixelFormat)
Input image is assumed to be grayscale-coded.
Definition: isi.c:269
ISI_SetFrameRate
void ISI_SetFrameRate(uint32_t frame)
Set frame rate.
Definition: isi.c:142
ISI_StatusRegister
uint32_t ISI_StatusRegister(void)
Return ISI status register.
Definition: isi.c:122
ISI_DmaChannelEnable
void ISI_DmaChannelEnable(uint32_t channel)
Enable ISI Dma channel.
Definition: isi.c:72
ISI_Reset
void ISI_Reset(void)
Reset ISI.
Definition: isi.c:179
ISI_DisableInterrupt
void ISI_DisableInterrupt(uint32_t flag)
Disable ISI interrupt.
Definition: isi.c:113
ISI_setDmaInCodecPath
void ISI_setDmaInCodecPath(uint32_t baseFrameBufDesc, uint32_t dmaCtrl, uint32_t frameBufferStartAddr)
Configure DMA for Codec path.
Definition: isi.c:339
ISI_DmaChannelDisable
void ISI_DmaChannelDisable(uint32_t channel)
Disable ISI Dma channel.
Definition: isi.c:81
ISI_BytesForOnePixel
uint8_t ISI_BytesForOnePixel(uint8_t bmpRgb)
Get the number of byte per pixels.
Definition: isi.c:156
ISI_Enable
void ISI_Enable(void)
Enable ISI.
Definition: isi.c:61
ISI_EnableInterrupt
void ISI_EnableInterrupt(uint32_t flag)
Enable ISI interrupt.
Definition: isi.c:104
ISI_setDmaInPreviewPath
void ISI_setDmaInPreviewPath(uint32_t baseFrameBufDesc, uint32_t dmaCtrl, uint32_t frameBufferStartAddr)
Configure DMA for preview path.
Definition: isi.c:325
ISI_SetMatrix4Yuv2Rgb
void ISI_SetMatrix4Yuv2Rgb(ISI_Y2R *yuv2rgb)
ISI set matrix for YUV to RGB color space for preview path.
Definition: isi.c:351
ISI_RgbPixelMapping
void ISI_RgbPixelMapping(uint32_t wRgbPixelMapping)
Defines RGB pattern when RGB_MODE is set to 1.
Definition: isi.c:233
ISI_SetBlank
void ISI_SetBlank(uint8_t hBlank, uint8_t vBlank)
Set the windows blank.
Definition: isi.c:202
ISI_calcScalerFactor
void ISI_calcScalerFactor(void)
calculate scaler factor automatically.
Definition: isi.c:307
ISI_setInputStream
void ISI_setInputStream(uint32_t wStreamMode)
Set data stream format.
Definition: isi.c:281
ISI_Disable
void ISI_Disable(void)
Disable ISI.
Definition: isi.c:89
ISI_YCrCbFormat
void ISI_YCrCbFormat(uint32_t wYuvSwapMode)
Defines YCrCb swap format.
Definition: isi.c:259
ISI_CodecPathFull
void ISI_CodecPathFull(void)
Enable Codec path for capture next frame.
Definition: isi.c:130
ISI_SetMatrix4Rgb2Yuv
void ISI_SetMatrix4Rgb2Yuv(ISI_R2Y *rgb2yuv)
ISI set matrix for RGB to YUV color space for codec path.
Definition: isi.c:368
ISI_RgbSwapMode
void ISI_RgbSwapMode(uint32_t swapMode)
Enables RGB swap.
Definition: isi.c:248
ISI_setPreviewSize
void ISI_setPreviewSize(uint32_t hSize, uint32_t vSize)
Set preview size.
Definition: isi.c:293
ISI_Descriptors
Definition: isi.h:65
ISI_Descriptors::CurrentLcdIndex
uint32_t CurrentLcdIndex
Definition: isi.h:67
ISI_Descriptors::nb_codec_ovf
uint32_t nb_codec_ovf
Definition: isi.h:71
ISI_Descriptors::nb_prev_ovf
uint32_t nb_prev_ovf
Definition: isi.h:73
ISI_Descriptors::DisplayCodec
volatile uint32_t DisplayCodec
Definition: isi.h:69
ISI_FrameBufferDescriptors
Definition: isi.h:77
ISI_FrameBufferDescriptors::Next
uint32_t Next
Definition: isi.h:83
ISI_FrameBufferDescriptors::Control
uint32_t Control
Definition: isi.h:81
ISI_FrameBufferDescriptors::Current
uint32_t Current
Definition: isi.h:79
ISI_R2Y
Definition: isi.h:108
ISI_R2Y::Goff
uint8_t Goff
Definition: isi.h:124
ISI_R2Y::C8
uint8_t C8
Definition: isi.h:130
ISI_R2Y::C5
uint8_t C5
Definition: isi.h:122
ISI_R2Y::C6
uint8_t C6
Definition: isi.h:126
ISI_R2Y::C0
uint8_t C0
Definition: isi.h:110
ISI_R2Y::C2
uint8_t C2
Definition: isi.h:114
ISI_R2Y::Boff
uint8_t Boff
Definition: isi.h:132
ISI_R2Y::C1
uint8_t C1
Definition: isi.h:112
ISI_R2Y::Roff
uint8_t Roff
Definition: isi.h:116
ISI_R2Y::C4
uint8_t C4
Definition: isi.h:120
ISI_R2Y::C7
uint8_t C7
Definition: isi.h:128
ISI_R2Y::C3
uint8_t C3
Definition: isi.h:118
ISI_Y2R
Definition: isi.h:88
ISI_Y2R::C2
uint8_t C2
Definition: isi.h:94
ISI_Y2R::C4
uint16_t C4
Definition: isi.h:104
ISI_Y2R::C1
uint8_t C1
Definition: isi.h:92
ISI_Y2R::C0
uint8_t C0
Definition: isi.h:90
ISI_Y2R::Yoff
uint8_t Yoff
Definition: isi.h:102
ISI_Y2R::C3
uint8_t C3
Definition: isi.h:96
ISI_Y2R::Cboff
uint8_t Cboff
Definition: isi.h:100
ISI_Y2R::Croff
uint8_t Croff
Definition: isi.h:98
_isi_Video
Definition: video.h:44