File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,10 @@ void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
65
65
struct video_stm32_dcmi_data * dev_data =
66
66
CONTAINER_OF (hdcmi , struct video_stm32_dcmi_data , hdcmi );
67
67
struct video_buffer * vbuf ;
68
+ HAL_StatusTypeDef __maybe_unused hal_ret ;
68
69
69
- HAL_DCMI_Suspend (hdcmi );
70
+ hal_ret = HAL_DCMI_Suspend (hdcmi );
71
+ __ASSERT_NO_MSG (hal_ret == HAL_OK );
70
72
71
73
vbuf = k_fifo_get (& dev_data -> fifo_in , K_NO_WAIT );
72
74
@@ -81,7 +83,8 @@ void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
81
83
k_fifo_put (& dev_data -> fifo_out , vbuf );
82
84
83
85
resume :
84
- HAL_DCMI_Resume (hdcmi );
86
+ hal_ret = HAL_DCMI_Resume (hdcmi );
87
+ __ASSERT_NO_MSG (hal_ret == HAL_OK );
85
88
}
86
89
87
90
static void stm32_dcmi_isr (const struct device * dev )
Original file line number Diff line number Diff line change @@ -1202,12 +1202,18 @@ static int stm32_dcmipp_stream_enable(const struct device *dev)
1202
1202
if (ret < 0 ) {
1203
1203
LOG_ERR ("Failed to start the source" );
1204
1204
if (config -> bus_type == VIDEO_BUS_TYPE_PARALLEL ) {
1205
- HAL_DCMIPP_PIPE_Stop (& dcmipp -> hdcmipp , pipe -> id );
1205
+ if (HAL_DCMIPP_PIPE_Stop (& dcmipp -> hdcmipp , pipe -> id ) != HAL_OK ) {
1206
+ ret = - EIO ;
1207
+ goto out ;
1208
+ }
1206
1209
}
1207
1210
#if defined(STM32_DCMIPP_HAS_CSI )
1208
1211
else if (config -> bus_type == VIDEO_BUS_TYPE_CSI2_DPHY ) {
1209
- HAL_DCMIPP_CSI_PIPE_Stop (& dcmipp -> hdcmipp , pipe -> id ,
1210
- DCMIPP_VIRTUAL_CHANNEL0 );
1212
+ if (HAL_DCMIPP_CSI_PIPE_Stop (& dcmipp -> hdcmipp , pipe -> id ,
1213
+ DCMIPP_VIRTUAL_CHANNEL0 ) != HAL_OK ) {
1214
+ ret = - EIO ;
1215
+ goto out ;
1216
+ }
1211
1217
}
1212
1218
#endif
1213
1219
else {
You can’t perform that action at this time.
0 commit comments