3434#define STM32_DCMIPP_HAS_PIXEL_PIPES
3535#endif
3636
37+ #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES )
3738/* Weak function declaration in order to interface with external ISP handler */
3839void __weak stm32_dcmipp_isp_vsync_update (DCMIPP_HandleTypeDef * hdcmipp , uint32_t Pipe )
3940{
@@ -53,6 +54,7 @@ int __weak stm32_dcmipp_isp_stop(void)
5354{
5455 return 0 ;
5556}
57+ #endif
5658
5759LOG_MODULE_REGISTER (stm32_dcmipp , CONFIG_VIDEO_LOG_LEVEL );
5860
@@ -171,11 +173,13 @@ void HAL_DCMIPP_PIPE_VsyncEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t
171173 struct stm32_dcmipp_pipe_data * pipe = dcmipp -> pipe [Pipe ];
172174 int ret ;
173175
176+ #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES )
174177 /*
175178 * Let the external ISP handler know that a VSYNC happened a new statistics are
176179 * thus available
177180 */
178181 stm32_dcmipp_isp_vsync_update (hdcmipp , Pipe );
182+ #endif
179183
180184 if (pipe -> state != STM32_DCMIPP_RUNNING ) {
181185 return ;
@@ -1029,13 +1033,13 @@ static int stm32_dcmipp_stream_enable(const struct device *dev)
10291033 goto out ;
10301034 }
10311035 }
1032- #endif
10331036
10341037 /* Initialize the external ISP handling stack */
10351038 ret = stm32_dcmipp_isp_init (& dcmipp -> hdcmipp , config -> source_dev );
10361039 if (ret < 0 ) {
10371040 goto out ;
10381041 }
1042+ #endif
10391043
10401044 /* Enable the DCMIPP Pipeline */
10411045 if (config -> bus_type == VIDEO_BUS_TYPE_PARALLEL ) {
@@ -1082,11 +1086,13 @@ static int stm32_dcmipp_stream_enable(const struct device *dev)
10821086 }
10831087 }
10841088
1089+ #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES )
10851090 /* Start the external ISP handling */
10861091 ret = stm32_dcmipp_isp_start ();
10871092 if (ret < 0 ) {
10881093 goto out ;
10891094 }
1095+ #endif
10901096
10911097 pipe -> state = STM32_DCMIPP_RUNNING ;
10921098 pipe -> is_streaming = true;
@@ -1112,11 +1118,13 @@ static int stm32_dcmipp_stream_disable(const struct device *dev)
11121118 goto out ;
11131119 }
11141120
1121+ #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES )
11151122 /* Stop the external ISP handling */
11161123 ret = stm32_dcmipp_isp_stop ();
11171124 if (ret < 0 ) {
11181125 goto out ;
11191126 }
1127+ #endif
11201128
11211129 /* Disable the DCMIPP Pipeline */
11221130 if (config -> bus_type == VIDEO_BUS_TYPE_PARALLEL ) {
0 commit comments