]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/libchip_samv7/include/isi.h
Final V8.2.1 release ready for tagging:
[freertos] / FreeRTOS / Demo / CORTEX_M7_SAMV71_Xplained_IAR_Keil / libchip_samv7 / include / isi.h
1 /* ----------------------------------------------------------------------------\r
2  *         SAM Software Package License \r
3  * ----------------------------------------------------------------------------\r
4  * Copyright (c) 2013, Atmel Corporation\r
5  *\r
6  * All rights reserved.\r
7  *\r
8  * Redistribution and use in source and binary forms, with or without\r
9  * modification, are permitted provided that the following conditions are met:\r
10  *\r
11  * - Redistributions of source code must retain the above copyright notice,\r
12  * this list of conditions and the disclaimer below.\r
13  *\r
14  * Atmel's name may not be used to endorse or promote products derived from\r
15  * this software without specific prior written permission.\r
16  *\r
17  * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR\r
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE\r
20  * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,\r
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
23  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
24  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
25  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
26  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
27  * ----------------------------------------------------------------------------\r
28  */\r
29 \r
30 /** \file */\r
31 \r
32 /** \addtogroup isi_module\r
33  * @{\r
34  * \section gmac_usage Usage\r
35  * - ISI_Init: initialize ISI with default parameters\r
36  * - ISI_EnableInterrupt: enable one or more interrupts\r
37  * - ISI_DisableInterrupt: disable one or more interrupts\r
38  * - ISI_Enable: enable isi module\r
39  * - ISI_Disable: disable isi module\r
40  * - ISI_CodecPathFull: enable codec path\r
41  * - ISI_SetFrame: set frame rate\r
42  * - ISI_BytesForOnePixel: return number of byte for one pixel\r
43  * - ISI_StatusRegister: return ISI status register\r
44  * - ISI_Reset: make a software reset\r
45  */\r
46 /**@}*/\r
47 \r
48 #ifndef ISI_H\r
49 #define ISI_H\r
50 \r
51 \r
52 /*----------------------------------------------------------------------------\r
53  *        Types\r
54  *----------------------------------------------------------------------------*/\r
55 \r
56 /** ISI descriptors */\r
57 typedef struct\r
58 {\r
59     /** Current LCD index, used with AT91C_ISI_MAX_PREV_BUFFER */\r
60     uint32_t CurrentLcdIndex;\r
61     /** set if Fifo Codec Empty is present */\r
62     volatile uint32_t DisplayCodec;\r
63     /** upgrade for each Fifo Codec Overflow (statistics use) */\r
64     uint32_t nb_codec_ovf;\r
65     /** upgrade for each Fifo Preview Overflow (statistics use) */\r
66     uint32_t nb_prev_ovf;\r
67 }ISI_Descriptors;\r
68 \r
69 /** Frame Buffer Descriptors */\r
70 typedef struct\r
71 {\r
72     /** Address of the Current FrameBuffer */\r
73     uint32_t Current;\r
74     /** Address of the Control */\r
75     uint32_t Control;\r
76     /** Address of the Next FrameBuffer */\r
77     uint32_t Next;\r
78 }ISI_FrameBufferDescriptors;\r
79 \r
80 \r
81 /*----------------------------------------------------------------------------\r
82  *         Exported functions\r
83  *----------------------------------------------------------------------------*/\r
84 extern void ISI_Enable(void);\r
85 extern void ISI_Disable(void);\r
86 extern void ISI_EnableInterrupt(uint32_t flag);\r
87 extern void ISI_DisableInterrupt(uint32_t flag);\r
88 extern void ISI_CodecPathFull(void);\r
89 extern void ISI_SetFrame(uint32_t frate);\r
90 extern uint8_t ISI_BytesForOnePixel(uint8_t bmpRgb);\r
91 extern void ISI_Reset(void);\r
92 extern void ISI_Init(pIsi_Video pVideo);\r
93 extern uint32_t ISI_StatusRegister(void);\r
94 \r
95 #endif //#ifndef ISI_H\r
96 \r