• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /*
17  * 该文件为helloworld主函数文件,打通了从视频输入->视频处理子系统->视频输出->显示屏整个媒体通路,
18  * ./可执行文件即可运行helloworld媒体通路。运行成功即可在mipi屏上查看实时视频流。
19  *
20  * This file is the main function file of helloworld, which opens up the entire media channel from
21  * VI->VPSS->VO->MIPI,./Executable file can run the helloworld media channel.
22  * After running successfully, you can view the real-time video stream on the mipi screen.
23  */
24 
25 #include "mpi_sys.h"
26 #include "sample_lcd.h"
27 #include "sdk.h"
28 
29 #ifdef __cplusplus
30 #if __cplusplus
31 extern "C" {
32 #endif
33 #endif /* End of #ifdef __cplusplus */
34 
35 /*
36  * 函数    : main()
37  * function: main()
38  */
main(void)39 int main(void)
40 {
41     HI_S32 s32Ret;
42     sdk_init();
43     /*
44      * MIPI为GPIO55,开启液晶屏背光
45      * MIPI is GPIO55, Turn on the backlight of the LCD screen
46      */
47     system("cd /sys/class/gpio/;echo 55 > export;echo out > gpio55/direction;echo 1 > gpio55/value");
48     s32Ret = SampleVioVpssVoMipi();
49     sdk_exit();
50     SAMPLE_PRT("\nsdk exit success\n");
51     return s32Ret;
52 }
53 
54 #ifdef __cplusplus
55 #if __cplusplus
56 }
57 #endif
58 #endif /* End of #ifdef __cplusplus */